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

feat(openid-connect plugin): support configuring session name and path #11286

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

damoshushu
Copy link

@damoshushu damoshushu commented May 24, 2024

Description

In some case, we need to provide different identity providers for different paths within the same host, however apisix uses the name "session" to store the cookie, which will cause the cookie be overwritten by the following authentication action.

for example,

  • uri: /web/app1 use oidc with client_id_a
  • uri: /web/app2 use another oidc with client_id_b

if we access /web/app1, after authentication, the auth cookie will be stored as "session", then we access /web/app2, after authentication, the auth cookie will be overwritten with client_id_b. Now we access /web/app1, the client_id_b's token will be passed to app1.

Fixes # (issue)

#11229
#9834

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@damoshushu damoshushu changed the title support configuring session name and path fix(openid-connect plugin): support configuring session name and path May 24, 2024
@damoshushu damoshushu changed the title fix(openid-connect plugin): support configuring session name and path feat(openid-connect plugin): support configuring session name and path May 30, 2024
Copy link
Contributor

@shreemaan-abhishek shreemaan-abhishek left a comment

Choose a reason for hiding this comment

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

instead of configuring name of the cookie for all plugins, can we append the path to the cookie name?

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.

None yet

2 participants