Constraints and Properties

This page lists the supported keys that could be used in Constraints and Properties. Constraints are used to specify additional custom conditions in a ServiceRole, Properties are used to specify additional custom conditions in a ServiceRoleBinding. For more information, please refer to authorization concept page.

Constraints

The following table lists the currently supported keys in Constraints:

NameDescriptionKey ExampleValues Example
destination.ipDestination workload instance IP address, supports single IP or CIDRdestination.ip["10.1.2.3", "10.2.0.0/16"]
destination.portThe recipient port on the server IP address, must be in the range [0, 65535]destination.port["80", "443"]
destination.labelsA map of key-value pairs attached to the server instancedestination.labels[version]["v1", "v2"]
destination.nameDestination workload instance namedestination.name["productpage*", "*-test"]
destination.namespaceDestination workload instance namespacedestination.namespace["default"]
destination.userThe identity of the destination workloaddestination.user["bookinfo-productpage"]
request.headersHTTP request headers, The actual header name is surrounded by bracketsrequest.headers[X-Custom-Token]["abc123"]

Properties

The following table lists the currently supported keys in Properties:

NameDescriptionKey ExampleValue Example
source.ipSource workload instance IP address, supports single IP or CIDRsource.ip"10.1.2.3"
source.namespaceSource workload instance namespacesource.namespace"default"
source.principalThe identity of the source workloadsource.principal"cluster.local/ns/default/sa/productpage"
request.headersHTTP request headers. The actual header name is surrounded by bracketsrequest.headers[User-Agent]"Mozilla/*"
request.auth.principalThe authenticated principal of the request.request.auth.principal"accounts.my-svc.com/104958560606"
request.auth.audiencesThe intended audience(s) for this authentication informationrequest.auth.audiences"my-svc.com"
request.auth.presenterThe authorized presenter of the credentialrequest.auth.presenter"123456789012.my-svc.com"
request.auth.claimsClaims from the origin JWT. The actual claim name is surrounded by bracketsrequest.auth.claims[iss]"*@foo.com"