-
Notifications
You must be signed in to change notification settings - Fork 3
Add OAuth 2.0 Protected Resource Metadata endpoint to Connect API #92
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,7 @@ data: | |
| filter_chain_match: | ||
| application_protocols: | ||
| - h2 | ||
| - http/1.1 | ||
| server_names: | ||
| - connect.{{ .Values.connect.urlBase }} | ||
| transport_socket: | ||
|
|
@@ -96,6 +97,7 @@ data: | |
| common_tls_context: | ||
| alpn_protocols: | ||
| - h2 | ||
| - http/1.1 | ||
| tls_certificates: | ||
| - certificate_chain: | ||
| filename: /etc/envoy/tls/tls.crt | ||
|
|
@@ -128,6 +130,27 @@ data: | |
| allow_credentials: true | ||
| max_age: "7200" | ||
| routes: | ||
| - match: | ||
| path: "/.well-known/oauth-protected-resource" | ||
| direct_response: | ||
| status: 200 | ||
| body: | ||
| inline_string: | | ||
| { | ||
| "resource": "https://connect.{{ .Values.connect.urlBase }}", | ||
| "authorization_servers": ["{{ .Values.envoy.auth.issuer }}"], | ||
| "scopes_supported": ["openid", "profile", "offline_access"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The list of supported scopes is currently hardcoded. To improve flexibility and maintainability, consider making this list configurable through For example, you could introduce a "scopes_supported": {{ .Values.envoy.auth.scopesSupported | default (list "openid" "profile" "offline_access") | toJson }},
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 (and likely add |
||
| "bearer_methods_supported": ["header"] | ||
| } | ||
| response_headers_to_add: | ||
| - header: | ||
| key: "content-type" | ||
| value: "application/json" | ||
| # Explicitly disable JWT auth for this public discovery endpoint | ||
| typed_per_filter_config: | ||
| envoy.filters.http.jwt_authn: | ||
| "@type": type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.PerRouteConfig | ||
| disabled: true | ||
| - match: | ||
| prefix: /proto.connect | ||
| route: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.