华为云UCS-请求认证:案例

时间:2023-12-15 11:48:40

案例

请求令牌自定义属性认证。

apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: detailed-jwt
spec:
  action: ALLOW
  rules:
    - from:
        - source:
            requestPrincipals: ["weather@cloudnative-istio.book/weather"]
      when:
        - key: request.auth.claims[role]
          values: ["editor"]
support.huaweicloud.com/usermanual-ucs/ucs_02_0047.html