Skip to content

feat: add PKCE support to the openid-connect plugin#7370

Merged
spacewander merged 8 commits intoapache:masterfrom
qihaiyan:fix-7052
Jul 6, 2022
Merged

feat: add PKCE support to the openid-connect plugin#7370
spacewander merged 8 commits intoapache:masterfrom
qihaiyan:fix-7052

Conversation

@qihaiyan
Copy link
Copy Markdown
Contributor

@qihaiyan qihaiyan commented Jul 2, 2022

Description

As a User, I want to be able to use oAuth2 with PKCE

Fixes #7052

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)

@qihaiyan qihaiyan changed the title Fix 7052 feat: add PKCE support to the openid-connect plugin Jul 3, 2022
Copy link
Copy Markdown
Member

@spacewander spacewander left a comment

Choose a reason for hiding this comment

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

@soulbird
Copy link
Copy Markdown
Contributor

soulbird commented Jul 4, 2022

Need more test cases to show the effect of use_pkce set to true and false.

@qihaiyan
Copy link
Copy Markdown
Contributor Author

qihaiyan commented Jul 5, 2022

# Failed test 't/plugin/openid-connect.t TEST 9: Access route w/o bearer token and go through the full OIDC Relying Party authentication process. - pattern "[error]" should not match any line in error.log but matches line "2022/07/04 20:45:31 [error] 2009\#2009: *32 [lua] openid-connect.lua:315: phase_func(): OIDC authentication failed: accessing discovery url (http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration) failed: connection refused, client: 127.0.0.1, server: localhost, request: \"GET /uri HTTP/1.1\", host: \"127.0.0.1:1984\"" (req 0)

why this error occurs when i run the openid-connect.t unit test, how to resolve it? @spacewander

@tzssangglass
Copy link
Copy Markdown
Member

hi @qihaiyan ,pls merge master branch to your develop branch and fix resolve conflics.

@spacewander
Copy link
Copy Markdown
Member

# Failed test 't/plugin/openid-connect.t TEST 9: Access route w/o bearer token and go through the full OIDC Relying Party authentication process. - pattern "[error]" should not match any line in error.log but matches line "2022/07/04 20:45:31 [error] 2009\#2009: *32 [lua] openid-connect.lua:315: phase_func(): OIDC authentication failed: accessing discovery url (http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration) failed: connection refused, client: 127.0.0.1, server: localhost, request: \"GET /uri HTTP/1.1\", host: \"127.0.0.1:1984\"" (req 0)

why this error occurs when i run the openid-connect.t unit test, how to resolve it? @spacewander

I am glad to see your question has been answered in #7052.

@qihaiyan
Copy link
Copy Markdown
Contributor Author

qihaiyan commented Jul 5, 2022

@qihaiyan qihaiyan closed this Jul 6, 2022
@qihaiyan qihaiyan reopened this Jul 6, 2022
@spacewander spacewander merged commit 6157037 into apache:master Jul 6, 2022
@qihaiyan qihaiyan deleted the fix-7052 branch July 7, 2022 08:01
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 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.

feat: As a User, I want to be able to use oAuth2 with PKCE

5 participants