Created
January 26, 2018 02:05
-
-
Save galo/3cd6f46cf4411283eb13b84a80125872 to your computer and use it in GitHub Desktop.
Revisions
-
galo created this gist
Jan 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ apiVersion: config.istio.io/v1alpha2 kind: EndUserAuthenticationPolicySpec metadata: name: meme-auth-policy namespace: default spec: jwts: - issuer: https://hpcorp-cwp-dev.apigee.net jwks_uri: https://hpcorp-cwp-dev.apigee.net/hpid-oauth-meme-apiproxy/v1/jwks --- apiVersion: config.istio.io/v1alpha2 kind: EndUserAuthenticationPolicySpecBinding metadata: name: meme-auth-policy-binding namespace: default spec: policies: - name: meme-auth-policy namespace: default services: - name: meme namespace: default # See - https://groups.google.com/forum/#!topic/istio-security/DzLR6Gqqjxk --- apiVersion: "config.istio.io/v1alpha2" kind: denier metadata: name: handler namespace: default spec: status: code: 16 message: Not Authorized --- apiVersion: "config.istio.io/v1alpha2" kind: checknothing metadata: name: denyrequest namespace: default spec: --- apiVersion: "config.istio.io/v1alpha2" kind: rule metadata: name: denymeme namespace: default spec: match: destination.service == "meme.default.svc.cluster.local" && request.headers["authorization"] == "unauthorized" actions: - handler: handler.denier instances: [ denyrequest.checknothing]