-
-
Save ashutosh-narkar/b4980d3745ab18984324773c97c15d9d to your computer and use it in GitHub Desktop.
This file contains 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 characters
package authz | |
default allow = false | |
# allow Frontend service to access Database service | |
allow { | |
input.method == "GET" | |
input.path = "/claims" | |
svc_spiffe_id == "spiffe://acme.com/frontend" | |
} | |
svc_spiffe_id := client_id { | |
[_, _, uri_type_san] := split(input.headers["x-forwarded-client-cert"], ";") | |
[_, client_id] := split(uri_type_san, "=") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment