Description:
What I want to aeheive is the following:
- Setup OIDC Authentication at the Gateway Level
- Setup Authorization at the Route Level
Here the example:
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: oidc
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: gateway
oidc:
provider:
issuer: https://login.microsoftonline.com/-/v2.0
clientID: -
clientSecret:
name: envoy-client-secret
forwardAccessToken: false
redirectURL: https://oidc.example.com/oauth2/callback
cookieDomain: example.com
cookieNames:
accessToken: EnvoyAccessToken
idToken: EnvoyIdToken
jwt:
providers:
- name: entra
issuer: https://login.microsoftonline.com/-/v2.0
remoteJWKS:
uri: https://login.microsoftonline.com/-/discovery/v2.0/keys
extractFrom:
cookies:
- EnvoyIdToken
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: argocd
spec:
mergeType: StrategicMerge
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: argocd
authorization:
defaultAction: Deny
rules:
- name: "allow-jwt-claim"
action: Allow
principal:
jwt:
provider: entra
claims:
- name: roles
valueType: "StringArray"
values:
- "argocd"
I assume that a the end the resulting security policy should be
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: argocd
spec:
mergeType: StrategicMerge
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: argocd
authorization:
defaultAction: Deny
rules:
- name: "allow-jwt-claim"
action: Allow
principal:
jwt:
provider: entra
claims:
- name: roles
valueType: "StringArray"
values:
- "argocd"
oidc:
provider:
issuer: https://login.microsoftonline.com/-/v2.0
clientID: -
clientSecret:
name: envoy-client-secret
forwardAccessToken: false
redirectURL: https://oidc.example.com/oauth2/callback
cookieDomain: example.com
cookieNames:
accessToken: EnvoyAccessToken
idToken: EnvoyIdToken
jwt:
providers:
- name: entra
issuer: https://login.microsoftonline.com/-/v2.0
remoteJWKS:
uri: https://login.microsoftonline.com/-/discovery/v2.0/keys
extractFrom:
cookies:
- EnvoyIdToken
However it's not working.
Description:
What I want to aeheive is the following:
Here the example:
I assume that a the end the resulting security policy should be
However it's not working.