Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support insecure Remote JWKS endpoint #2327

Closed
ardikabs opened this issue Dec 20, 2023 · 1 comment
Closed

Support insecure Remote JWKS endpoint #2327

ardikabs opened this issue Dec 20, 2023 · 1 comment
Assignees
Labels
kind/enhancement New feature or request

Comments

@ardikabs
Copy link
Contributor

ardikabs commented Dec 20, 2023

Description:

Follow up from #1930, regarding support for insecure remote JWKS endpoint.

Currently, JWT policy only supports secure endpoints through HTTPS for the remote JWKS endpoint. For particular reasons such as when the JWKS endpoint is expected to be internally accessible within the Kubernetes cluster, in that case adding a secure layer might not needed.

The workaround that we have done so far was to patch the code to add support when the JWKS endpoint uses http://..., thus it will omit the tls socket config under the cluster config. The example patch can be seen here.

With the above patch, you can apply the below configuration.

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
  name: sp-any-endpoint
  namespace: envoy-gateway-system
spec:
  jwt:
    providers:
      - claimToHeaders:
          - claim: userId
            header: x-user-id
          - claim: email
            header: x-username
          - claim: sessionId
            header: x-session-id
        name: internal
        remoteJWKS:
          uri: http://auth-service.auth-service-ns.svc.cluster.local/.well-known/jwks
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: hr-any-endpoint
    namespace: envoy-gateway-system

[optional Relevant Links:]

Any extra documentation required to understand the issue.

@ardikabs ardikabs added kind/enhancement New feature or request triage labels Dec 20, 2023
@zhaohuabing
Copy link
Member

zhaohuabing commented Dec 20, 2023

@ardikabs Thanks for the feedback. I think it's reasonable to support plain HTTP jwks and ext auth servers, but OIDC servers should stick to HTTPS. WDYT @arkodg ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants