-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: openid foward original id token #12439
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: master
Are you sure you want to change the base?
fix: openid foward original id token #12439
Conversation
I need to check the original issue before reviewing this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new configuration option set_id_token_original_header
to the OpenID Connect plugin that allows forwarding the original ID token (with JWS signature and headers) in a new X-ID-Token-Original
header. This addresses downstream use cases requiring the original token for operations like token exchange.
- Adds
set_id_token_original_header
boolean configuration option (defaults to true) - Implements logic to set
X-ID-Token-Original
header with the encrypted ID token from session data - Updates documentation and tests to reflect the new functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
apisix/plugins/openid-connect.lua | Adds schema definition and header-setting logic for the new set_id_token_original_header option |
docs/en/latest/plugins/openid-connect.md | Documents the new configuration parameter in the plugin attributes table |
t/plugin/openid-connect.t | Adds test coverage for the new header functionality and updates expected responses |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Hi @cgmEdi, there is a conflicting file that needs to be resolved. |
Hi @Baoyuantop, the conflict is resolved now :). |
Hi @cgmEdi, please fix failed ci. |
Hi @cgmEdi, any updates? |
Description
Issue: #10275 #12438
Summary: add a config option "set original id token header" so that the original id_token that was stored in the sesssion (enc_id_token) gets fowarded as the new header "X-Id-Token-Original".
In my company, we have a use case, where the donwstream needs the original id_token so that it can perform a token exchange.
Which issue(s) this PR fixes:
Fixes #10275 #12438
Checklist