Created
May 27, 2022 18:56
-
-
Save incfly/134deac9918ef380eb95f1608f26f082 to your computer and use it in GitHub Desktop.
conditional-authservice
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
apiVersion: security.istio.io/v1beta1 | |
kind: RequestAuthentication | |
metadata: | |
name: httpbin | |
namespace: foo | |
spec: | |
selector: | |
matchLabels: | |
app: httpbin | |
jwtRules: | |
- issuer: "issuer-foo" | |
jwksUri: https://oidc-idp-url.com/.well-known/jwks.json | |
--- | |
apiVersion: security.istio.io/v1beta1 | |
kind: AuthorizationPolicy | |
metadata: | |
name: httpbin | |
namespace: foo | |
spec: | |
selector: | |
matchLabels: | |
app: httpbin | |
rules: | |
- from: | |
- source: | |
requestPrincipals: ["*"] |
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
apiVersion: security.istio.io/v1beta1 | |
kind: AuthorizationPolicy | |
metadata: | |
name: ext-authz | |
namespace: foo | |
spec: | |
selector: | |
matchLabels: | |
app: httpbin | |
action: CUSTOM | |
provider: | |
name: authz-exter-authz | |
rules: | |
# The rules specify when to trigger the external authorizer. | |
- from: | |
- source: | |
notPrincipals: ["spiffe://trust-domain.com/ns/machine-ns/sa/machine-sa"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment