- Resource: EndpointPolicy
- EndpointPolicyType
- EndpointMatcher
- MetadataLabelMatcher
- MetadataLabelMatchCriteria
- MetadataLabels
- TrafficPortSelector
- Methods
Resource: EndpointPolicy
EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply "authentication config" an all endpoints that serve on port 8080.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "type": enum ( |
Fields | |
---|---|
name |
Required. Name of the EndpointPolicy resource. It matches pattern |
createTime |
Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp when the resource was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Optional. Set of label tags associated with the EndpointPolicy resource. An object containing a list of |
type |
Required. The type of endpoint policy. This is primarily used to validate the configuration. |
authorizationPolicy |
Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint. |
endpointMatcher |
Required. A matcher that selects endpoints to which the policies should be applied. |
trafficPortSelector |
Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports. |
description |
Optional. A free-text description of the resource. Max length 1024 characters. |
serverTlsPolicy |
Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint. |
clientTlsPolicy |
Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY. |
EndpointPolicyType
The type of endpoint policy.
Enums | |
---|---|
ENDPOINT_POLICY_TYPE_UNSPECIFIED |
Default value. Must not be used. |
SIDECAR_PROXY |
Represents a proxy deployed as a sidecar. |
GRPC_SERVER |
Represents a proxyless gRPC backend. |
EndpointMatcher
A definition of a matcher that selects endpoints to which the policies should be applied.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field matcher_type . Specifies type of the matcher used for this endpoint matcher. matcher_type can be only one of the following: |
|
metadataLabelMatcher |
The matcher is based on node metadata presented by xDS clients. |
MetadataLabelMatcher
The matcher that is based on node metadata presented by xDS clients.
JSON representation |
---|
{ "metadataLabelMatchCriteria": enum ( |
Fields | |
---|---|
metadataLabelMatchCriteria |
Specifies how matching should be done. Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>. If a client with label <A:1> connects, the config from P1 will be selected. If a client with label <A:1,B:1> connects, the config from P2 will be selected. If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected. If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), pick up the one with older creation time. |
metadataLabels[] |
The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client). |
MetadataLabelMatchCriteria
Possible criteria values that define logic of how matching is made.
Enums | |
---|---|
METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED |
Default value. Should not be used. |
MATCH_ANY |
At least one of the Labels specified in the matcher should match the metadata presented by xDS client. |
MATCH_ALL |
The metadata presented by the xDS client should contain all of the labels specified here. |
MetadataLabels
Defines a name-pair value for a single label.
JSON representation |
---|
{ "labelName": string, "labelValue": string } |
Fields | |
---|---|
labelName |
Required. Label name presented as key in xDS Node Metadata. |
labelValue |
Required. Label value presented as value corresponding to the above key, in xDS Node Metadata. |
TrafficPortSelector
Specification of a port-based selector.
JSON representation |
---|
{ "ports": [ string ] } |
Fields | |
---|---|
ports[] |
Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected. |
Methods |
|
---|---|
|
Creates a new EndpointPolicy in a given project and location. |
|
Deletes a single EndpointPolicy. |
|
Gets details of a single EndpointPolicy. |
|
Lists EndpointPolicies in a given project and location. |
|
Updates the parameters of a single EndpointPolicy. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |