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

bug: not getting the authorization token in header using openid-connect plugin #11220

Open
saurabhconcentrix opened this issue May 2, 2024 · 4 comments

Comments

@saurabhconcentrix
Copy link

Current Behavior

i am using openid-connect plugin,
it setting up the cookies into headers
expecting the authorization token in headers but its not setting it

{
bearer_only: false,
client_id: "XXXX",
client_secret: "SSSS",
discovery: "https://login.microsoftonline.com/xxxxxxxxxxx/v2.0/.well-known/openid-configuration", introspection_endpoint_auth_method: "client_secret_post",
realm: "master",
scope: "openid profile email",
set_access_token_header: true
}

let me know if i am missing anything

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

create a route
add the plugin openid-connect into the route
expecting the headers into the authorization

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@juzhiyuan
Copy link
Member

What do you mean expecting the authorization token in headers but its not setting it?

I'm trying to understand this issue, can you list details step by step?

@saurabhconcentrix
Copy link
Author

how we can get the user-information or jwt token from AD using openid-connect plugin

it is setting the cookie in header but not setting the jwt token with this configuration
{
bearer_only: false,
client_id: "XXXX",
client_secret: "SSSS",
discovery: "https://login.microsoftonline.com/xxxxxxxxxxx/v2.0/.well-known/openid-configuration", introspection_endpoint_auth_method: "client_secret_post",
realm: "master",
scope: "openid profile email",
set_access_token_header: true
}

@saurabhconcentrix
Copy link
Author

i used the above config
it allows me to do the sso
and after that i see its set the cookie as well in my browser

but i am expecting the usetdetails and. token as well in my header

please let me know if i am doing anything wrong

@saurabhconcentrix
Copy link
Author

saurabhconcentrix commented May 6, 2024

as per this docs it should come in header
https://docs.api7.ai/apisix/how-to-guide/authentication/set-up-sso-with-azure-ad#authenticate-with-user-credentials

not sure what i am doing wrong @juzhiyuan
we are stuck please need help asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants