type: OPAPolicy mesh: default name: opa-1 selectors: - match: kuma.io/service: backend conf: policy: inlineString: | package envoy.authz import input.attributes.request.http as http_request default allow = false token = {“valid”: valid, “payload”: payload} { [_, encoded] = split(http_request.headers.authorization, ” “) [valid, _, payload] = io.jwt.decode_verify(encoded, {“secret”: “secret” }) } allow { is_token_valid action_allowed }
:
:
@gamussa | @DevoxxPl | @thekonginc