Skip to content

fix(openid-connect): return userinfo when use_jwks is true#8135

Closed
lovepocky wants to merge 1 commit into
apache:masterfrom
lovepocky:fix/openid-connect-return-userinfo
Closed

fix(openid-connect): return userinfo when use_jwks is true#8135
lovepocky wants to merge 1 commit into
apache:masterfrom
lovepocky:fix/openid-connect-return-userinfo

Conversation

@lovepocky

Copy link
Copy Markdown

Description

Fixes #8133

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)

@juststillthinking

Copy link
Copy Markdown
Contributor

Test case is needed

@juststillthinking

Copy link
Copy Markdown
Contributor

@lovepocky use this command to run openidc test env docker run -p 8090:8080 -p 8443:8443 --restart unless-stopped -d --env="KEYCLOAK_USER=admin" --env="KEYCLOAK_PASSWORD=123456" sshniro/keycloak-apisix:1.0.0, and add the test case to openid-connect.t

@lovepocky

Copy link
Copy Markdown
Author

Thank you, i will try that later

@tzssangglass tzssangglass changed the title fix(plugin/oidc): return userinfo when use_jwks is true fix(openid-connect): return userinfo when use_jwks is true Oct 21, 2022
@lovepocky

Copy link
Copy Markdown
Author

Could you suggest a way to check request header like x-userinfo ?

@lovepocky
lovepocky force-pushed the fix/openid-connect-return-userinfo branch from f3e4715 to 355ea90 Compare October 22, 2022 14:07
@tokers

tokers commented Oct 23, 2022

Copy link
Copy Markdown
Contributor

Could you suggest a way to check request header like x-userinfo ?

There are some upstreams in apisix test cases which echo request headers from apisix.

@g-javi

g-javi commented Oct 24, 2022

Copy link
Copy Markdown

Could you suggest a way to check request header like x-userinfo ?

@lovepocky Check this test case and it's expected response

--- response_body_like
uri: /uri
cookie: .*
host: 127.0.0.1:1984
user-agent: .*
x-access-token: ey.*
x-id-token: ey.*
x-real-ip: 127.0.0.1
x-refresh-token: ey.*
x-userinfo: ey.*

@juststillthinking

Copy link
Copy Markdown
Contributor

@lovepocky it looks like that your test cases don't pass

@juststillthinking

Copy link
Copy Markdown
Contributor

@lovepocky Do you have time to fix the failed ci test before merged ?

@lovepocky

Copy link
Copy Markdown
Author

@lovepocky Do you have time to fix the failed ci test before merged ?

sorry, i am busy with work recently.

@moonming

Copy link
Copy Markdown
Member

@monkeyDluffy6017 is #8347 cover this PR? should we close this PR?

@juststillthinking

Copy link
Copy Markdown
Contributor

@moonming this PR should be closed, i fixed this in #8347

@moonming moonming closed this Dec 21, 2022
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.

bug: plugin(openid-connect): when set use_jwks: true, userinfo is not set

5 participants