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

Keycloak 22 integration with Kong (2.8.3) oidcrp plugin having issue with Integration tests using groovy code. #85

Open
alokrbl opened this issue Nov 1, 2023 · 0 comments

Comments

@alokrbl
Copy link

alokrbl commented Nov 1, 2023

Issue - redirect to oidcrp plugin not successful.

Kong (version 2.8.3) returns status code 400 with {"error":"invalid_grant","error_description":"Incorrect redirect_uri"} and

Keyclaok ( version 22.0.4) errors - "error":"invalid_code","grant_type":"authorization_code","code_id":"xxx","client_auth_method":"client-secret"},"name":"CODE_TO_TOKEN_ERROR"}

Steps:
1-Navigating initial UI page : https://api-gateway:443/oidcrp-to-https. status - 302 Found.

2- RedirectToKeyCloak with https://id-provider:443/auth/realms/realmTestOidcrpPlugin1/protocol/openid-connect/auth?response_type=code&client_id=testKong&scope=openid%20profile&redirect_uri=https%3A%2F%2Fapi-gateway%3A443%2Foidcrp-to-https%2Fsecure&state=xxx&nonce=yyy returns status 200

3- PostLoginAndPassword with -> https://id-provider:443/auth/realms/realmTestOidcrpPlugin1/login-actions/authenticate?session_code=xxx&execution=yyy&client_id=testKong&tab_id=zzz returns- status 302

4- RedirectToOidcRP fails and redirect to logout with https://api-gateway/oidcrp-to-https/secure?state=aaa&session_state=xxx&code=ccc returns 302 Found redirecting to /oidcrp-to-https/logout.
At 4th step kong errors 400 with "error":"invalid_grant","error_description":"Incorrect redirect_uri" and keycloak returns CODE_TO_TOKEN_ERROR.

Pls note - this works fine if using keycloak version 17

Any suggestions or help will be highly appreciated.

Thanks - Alok

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

No branches or pull requests

1 participant