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

impl for setting OIDC token cookie domain #4102

Merged
merged 10 commits into from
Sep 7, 2024

Conversation

zhaohuabing
Copy link
Member

@zhaohuabing zhaohuabing commented Aug 26, 2024

This PR introduces the ability to set a domain for OAuth2 filter token cookies. By configuring the domain, these token cookies can be shared across multiple subdomains, enabling users to remain logged in while navigating between mulitple subdomains without the need for repeated logins.

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
  name: oidc-example
  namespace: default
spec:
  oidc:
    clientID: 758469837151-2tchi5dn2sh7o5kcc3m974nsfdvjlfpr.apps.googleusercontent.com
    clientSecret:
      group: ""
      kind: Secret
      name: my-app-client-secret
    cookieDomain: example.com
    logoutPath: /myapp/logout
    provider:
      issuer: https://accounts.google.com
    redirectURL: https://www.example.com:8443/myapp/oauth2/callback
  targetRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: eg

Related issue: #3919
Envoy PRs: envoyproxy/envoy#35491 envoyproxy/envoy#35845

@zhaohuabing zhaohuabing requested a review from a team as a code owner August 26, 2024 02:47
@zhaohuabing zhaohuabing marked this pull request as draft August 26, 2024 02:47
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.99%. Comparing base (5998980) to head (342efd9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4102      +/-   ##
==========================================
+ Coverage   67.95%   67.99%   +0.04%     
==========================================
  Files         189      189              
  Lines       23103    23106       +3     
==========================================
+ Hits        15699    15711      +12     
+ Misses       6281     6277       -4     
+ Partials     1123     1118       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
@zhaohuabing zhaohuabing marked this pull request as ready for review September 4, 2024 00:17
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg requested review from a team September 6, 2024 19:08
@zirain zirain merged commit 3584271 into envoyproxy:main Sep 7, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants