You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "MirtoBusico (via GitHub)" <gi...@apache.org> on 2023/06/06 08:37:47 UTC
[GitHub] [apisix] MirtoBusico opened a new issue, #9609: help request: OpenID plugin error: "equest to the redirect_uri path but there's no session state found"
MirtoBusico opened a new issue, #9609:
URL: https://github.com/apache/apisix/issues/9609
### Description
Hi all,
I'm trying to redo the Apisix-dashboard access through Apisix, authenticated by Keycloak, as I have done in the past. See this [blog post](https://apisix.apache.org/blog/2023/01/02/accessing_apisix-dashboard_from_everywhere_with_keycloak_authentication/#apisix-api-gateway) and issue #8452
When I try to access the Apisix-dashboard I'm redirected to keycloak but, after a successful login (I see the session in Keycloak) I receive an error from apisix.
Looking at the apisix pod logs I see:
```
2023/06/06 07:59:53 [error] 53#53: *353631 [lua] openidc.lua:1475: authenticate(): request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=a046501da761a44531b9e4788ae4b36d&session_state=65557156-414d-468e-85ca-beac29fd3d63&code=1d8b512d-5062-4dae-82d3-f88b048545b5.65557156-414d-468e-85ca-beac29fd3d63.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 07:59:53 [error] 53#53: *353631 [lua] openid-connect.lua:359: phase_func(): OIDC authentication failed: request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=a046501da761a44531b9e4788ae4b36d&session_state=65557156-414d-468e-85ca-beac29fd3d63&code=1d8b512d-5062-4dae-82d3-f88b048545b5.65557156-414d-468e-85ca-beac29fd3d63.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 07:59:53 [warn] 53#53: *353631 [lua] plugin.lua:1102: run_plugin(): openid-connect exits with http status code 500, client: 127.0.0.6, server: _, request: "GET /*?state=a046501da761a44531b9e4788ae4b36d&session_state=65557156-414d-468e-85ca-beac29fd3d63&code=1d8b512d-5062-4dae-82d3-f88b048545b5.65557156-414d-468e-85ca-beac29fd3d63.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 07:59:53 [alert] 53#53: *353631 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /*?state=a046501da761a44531b9e4788ae4b36d&session_state=65557156-414d-468e-85ca-beac29fd3d63&code=1d8b512d-5062-4dae-82d3-f88b048545b5.65557156-414d-468e-85ca-beac29fd3d63.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
```
The route definition is:
```
{
"uri": "/*",
"name": "apisix-dashboard",
"desc": "apisix.h.net primary route",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE",
"PURGE"
],
"host": "apisix.h.net",
"plugins": {
"openid-connect": {
"_meta": {
"disable": false
},
"access_token_in_authorization_header": true,
"bearer_only": false,
"client_id": "hcadmins",
"client_secret": "08Xq1Av0txM0L06d0xdBTTjqgKica5C6",
"discovery": "https://k6k.h.net/realms/hcluster_admins/.well-known/openid-configuration",
"introspection_endpoint_auth_method": "client_secret_post",
"realm": "hcluster_admins",
"redirect_uri": "https://apisix.h.net/*",
"scope": "openid profile"
},
"redirect": {
"http_to_https": true
}
},
"upstream_id": "462214514335548089",
"status": 1
}
```
I'm using different Apisix and Keycloak versions from the past working configuration.
Any hint?
### Environment
- APISIX version (run `apisix version`): `/usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua version
3.3.0
apis`
- Operating system (run `uname -a`): `Linux apisix-58f6bf8c79-zcw2v 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux`
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): `3.5.0`
- APISIX Dashboard version, if relevant: `3.0.0`
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "Snap252 (via GitHub)" <gi...@apache.org>.
Snap252 commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-2876583547
> For anyone struggling with this problem like I was after an entire days wasted:
>
> There is an undocumented configuration field "session.secret". As soon as I set this to a random value the problem went away. See below for an example:
>
> ```
> "plugins": {
> "openid-connect": {
> "bearer_only": false,
> "client_id": "whatever",
> "client_secret": "whatever-else",
> "discovery": "http://i.am.the.keycloak/auth/realms/myrealm/.well-known/openid-configuration",
> "realm": "myrealm",
> "session": {
> "secret": "MjMzZDFlYzAtN2Y3OC00M2MyLTg1OGYtZTk1NGVkZDEyZjZhCg=="
> }
> }
> }
> ```
>
> You can generate the secret string however you like, I used `uuidgen|base64`.
you are our man! :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] MirtoBusico commented on issue #9609: help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found"
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1579276529
Found the comment in [#8068](https://github.com/apache/apisix/pull/8068#issuecomment-1578349554) I tried:
Before change
```
httpEnd: |
httpSrv: |
set $session_secret 0123456789a5bac9bb3c868ec8b202e93;
httpAdmin: |
```
Modified as in the comment
```
httpEnd: |
httpSrv: |
set $session_redis_password 0123456789a5bac9bb3c868ec8b202e93;
httpAdmin: |
```
And without changing defaults
```
httpEnd: |
httpSrv: |
httpAdmin: |
```
All the three settings generate the same error.
For the last attempt the logs are:
```
127.0.0.6 - - [06/Jun/2023:18:31:14 +0000] k8s.h.net "GET /api/v1/namespace HTTP/1.0" 200 870 0.005 "https://k8s.h.net/" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0" 10.43.216.96:443 200 0.003 "https://k8s.h.net"
2023/06/06 18:31:18 [error] 52#52: *66525 [lua] openidc.lua:1475: authenticate(): request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [error] 52#52: *66525 [lua] openid-connect.lua:359: phase_func(): OIDC authentication failed: request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [warn] 52#52: *66525 [lua] plugin.lua:1102: run_plugin(): openid-connect exits with http status code 500, client: 127.0.0.6, server: _, request: "GET /*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [alert] 52#52: *66525 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [alert] 54#54: *66526 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /favicon.ico HTTP/1.0", host: "apisix.h.net", referrer: "https://apisix.h.net/*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6"
2023/06/06 18:31:18 [error] 50#50: *66529 [lua] openidc.lua:1475: authenticate(): request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=ee307974c532bcdac329234db7ad2ff1&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=71dd5a3a-bb0b-473b-a6a8-db3c741b6491.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [error] 50#50: *66529 [lua] openid-connect.lua:359: phase_func(): OIDC authentication failed: request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /*?state=ee307974c532bcdac329234db7ad2ff1&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=71dd5a3a-bb0b-473b-a6a8-db3c741b6491.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [warn] 50#50: *66529 [lua] plugin.lua:1102: run_plugin(): openid-connect exits with http status code 500, client: 127.0.0.6, server: _, request: "GET /*?state=ee307974c532bcdac329234db7ad2ff1&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=71dd5a3a-bb0b-473b-a6a8-db3c741b6491.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/06 18:31:18 [alert] 50#50: *66529 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /*?state=ee307974c532bcdac329234db7ad2ff1&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=71dd5a3a-bb0b-473b-a6a8-db3c741b6491.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
127.0.0.6 - - [06/Jun/2023:18:31:18 +0000] apisix.h.net "GET /*?state=a4f1ad7b2fda86f3159f6a4bb06617e3&session_state=16f1fd39-cb5b-471b-b7f3-985e60ac88e8&code=15556f4a-643d-47ef-a662-d3e4ed181d3a.16f1fd39-cb5b-471b-b7f3-985e60ac88e8.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0" 500 651 0.000 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" - - - "http://apisix.h.net"
```
What can I do?
BTW Apisix was updated, after changing the apisix-values-yaml file with
```
helm upgrade apisix apisix/apisix -f apisix-values.yaml \
--set ingress-controller.config.apisix.serviceNamespace=apisix \
--set ingress-controller.config.apisix.serviceName=apisix-admin \
--set ingress-controller.config.kubernetes.apisixRouteVersion=apisix.apache.org/v2beta3 \
--namespace apisix
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835321474
Given that https://github.com/apache/apisix/issues/9628 is closed (and another bug issue was opened), should this issue remain open? also cc: @Sn0rt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1853742005
> @MirtoBusico I'm impressed with what you've done.
Well, I'm writing a book about the complete project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] MirtoBusico commented on issue #9609: help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found"
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1581216485
I've found #2426 and tried to set the redirect uri (https://apisix.h.net/routes/list) to a value different from the original uri (https://apisix.h.net)
I receive the same error
```
2023/06/07 16:53:56 [alert] 50#50: *5523592 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET / HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [error] 51#51: *5523593 [lua] openidc.lua:1475: authenticate(): request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /routes/list?state=496456c39132fe790d2a7a70ad0f46b6&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=4522876b-9268-4cc9-a723-d144552bba08.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [error] 51#51: *5523593 [lua] openid-connect.lua:359: phase_func(): OIDC authentication failed: request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /routes/list?state=496456c39132fe790d2a7a70ad0f46b6&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=4522876b-9268-4cc9-a723-d144552bba08.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [warn] 51#51: *5523593 [lua] plugin.lua:1102: run_plugin(): openid-connect exits with http status code 500, client: 127.0.0.6, server: _, request: "GET /routes/list?state=496456c39132fe790d2a7a70ad0f46b6&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=4522876b-9268-4cc9-a723-d144552bba08.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [alert] 51#51: *5523593 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /routes/list?state=496456c39132fe790d2a7a70ad0f46b6&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=4522876b-9268-4cc9-a723-d144552bba08.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [alert] 53#53: *5523602 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /favicon.ico HTTP/1.0", host: "apisix.h.net", referrer: "https://apisix.h.net/routes/list?state=496456c39132fe790d2a7a70ad0f46b6&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=4522876b-9268-4cc9-a723-d144552bba08.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6"
2023/06/07 16:53:56 [error] 54#54: *5523605 [lua] openidc.lua:1475: authenticate(): request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /routes/list?state=dccba95430444e7ef8a0e32c466751d8&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=5d6163f6-4109-416d-8b22-de5b406eb9c5.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [error] 54#54: *5523605 [lua] openid-connect.lua:359: phase_func(): OIDC authentication failed: request to the redirect_uri path but there's no session state found, client: 127.0.0.6, server: _, request: "GET /routes/list?state=dccba95430444e7ef8a0e32c466751d8&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=5d6163f6-4109-416d-8b22-de5b406eb9c5.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [warn] 54#54: *5523605 [lua] plugin.lua:1102: run_plugin(): openid-connect exits with http status code 500, client: 127.0.0.6, server: _, request: "GET /routes/list?state=dccba95430444e7ef8a0e32c466751d8&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=5d6163f6-4109-416d-8b22-de5b406eb9c5.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
2023/06/07 16:53:56 [alert] 54#54: *5523605 ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt), client: 127.0.0.6, server: _, request: "GET /routes/list?state=dccba95430444e7ef8a0e32c466751d8&session_state=d8fb92ad-255f-4766-a447-4e79d1b50fc5&code=5d6163f6-4109-416d-8b22-de5b406eb9c5.d8fb92ad-255f-4766-a447-4e79d1b50fc5.89cb3945-8ba7-449d-bec4-b5a668a090d6 HTTP/1.0", host: "apisix.h.net"
```
Now the openid-connect plugin is defined as
```
{
"client_id":"hcadmins",
"client_secret":"08Xq1Av0txM0L06d0xdBTTjqgKica5C6",
"discovery":"https://k6k.h.net/realms/hcluster_admins/.well-known/openid-configuration",
"bearer_only":false,
"realm":"hcluster_admins",
"introspection_endpoint_auth_method":"client_secret_post",
"redirect_uri":"https://apisix.h.net/routes/list",
"set_access_token_header":true,
"access_token_in_authorization_header":true,
"scope":"openid profile",
"timeout":10
}
```
I don't know what else to try.
BTW with these values the user is redirected to the keycloak server an is asked to login; but If I remove the redirect_uri field I receive an error an I never reach the keycloak login page
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835693594
Hi @kayx23 and @Sn0rt,
I think that all the pending issues related to this problem can be closed:
#9609 (this one), #9628 (alrady closed) and #9935
Today I have a working configuration using Keycloak, kubernetes, Apisix and Istio (all using the HTTPS protocol)
Thanks to all
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835314728
Hi there, could you check the first half of the following doc to see if it resolves your issue? It covers authorization code flow with key cloak.
https://docs.api7.ai/apisix/how-to-guide/authentication/set-up-sso-with-keycloak#configure-apisix
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "mbuotidem (via GitHub)" <gi...@apache.org>.
mbuotidem commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835702691
@MirtoBusico please would you be open to sharing a sanitized version of your working configs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 closed issue #9609: help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found"
URL: https://github.com/apache/apisix/issues/9609
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835755542
Hi @kayx23 and @Sn0rt,
I'll report here https://github.com/apache/apisix/issues/9609 (this issue) and quoting https://github.com/apache/apisix/issues/9628 and https://github.com/apache/apisix/issues/9935 to maintain the link between issues
I'll post the information about what worked.
Please give me some time because I have to extract the issue related informations from a more than 300 pages manual
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1853308318
@MirtoBusico I'm impressed with what you've done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "trueg (via GitHub)" <gi...@apache.org>.
trueg commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-2057140878
For anyone struggling with this problem like I was after an entire days wasted:
There is an undocumented configuration field "session.secret". As soon as I set this to a random value the problem went away. See below for an example:
```
"plugins": {
"openid-connect": {
"bearer_only": false,
"client_id": "whatever",
"client_secret": "whatever-else",
"discovery": "http://i.am.the.keycloak/auth/realms/myrealm/.well-known/openid-configuration",
"realm": "myrealm",
"session": {
"secret": "MjMzZDFlYzAtN2Y3OC00M2MyLTg1OGYtZTk1NGVkZDEyZjZhCg=="
}
}
}
```
You can generate the secret string however you like, I used `uuidgen|base64`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1836527016
Hi @kayx23 and @Sn0rt,
Attached here https://github.com/apache/apisix/issues/9609 (and quoting https://github.com/apache/apisix/issues/9628 and https://github.com/apache/apisix/issues/9935 ) are pages extracted fom my project
[1_keycloak-setup.pdf](https://github.com/apache/apisix/files/13530548/1_keycloak-setup.pdf)
[2_keycloak-realm-users.pdf](https://github.com/apache/apisix/files/13530549/2_keycloak-realm-users.pdf)
[3_routes-openid-authz.pdf](https://github.com/apache/apisix/files/13530569/3_routes-openid-authz.pdf)
Hope this helps
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1835714999
Closing the issue as completed, but feel free to continue the conversation re. what worked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] MirtoBusico commented on issue #9609: help request: OpenID plugin error: "request to the redirect_uri path but there's no session state found"
Posted by "MirtoBusico (via GitHub)" <gi...@apache.org>.
MirtoBusico commented on issue #9609:
URL: https://github.com/apache/apisix/issues/9609#issuecomment-1580266691
UPDATE
Trying to delete and recreate the Openid-connect plugin I see this warning in the apisix pod:
```
2023/06/07 09:04:48 [warn] 52#52: *518838 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 53#53: *518825 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 51#51: *518829 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 54#54: *518843 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 57#57: *518827 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 49#49: *518821 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
2023/06/07 09:04:48 [warn] 50#50: *518837 [lua] openid-connect.lua:155: check_schema(): when bearer_only = false, you'd better complete the session configuration manually, context: ngx.timer
```
The route definition is:
```
{
"uri": "/*",
"name": "apisix-dashboard",
"desc": "apisix.h.net primary route",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE",
"PURGE"
],
"host": "apisix.h.net",
"plugins": {
"openid-connect": {
"_meta": {
"disable": false
},
"access_token_in_authorization_header": true,
"bearer_only": false,
"client_id": "hcadmins",
"client_secret": "08Xq1Av0txM0L06d0xdBTTjqgKica5C6",
"discovery": "https://k6k.h.net/realms/hcluster_admins/.well-known/openid-configuration",
"introspection_endpoint_auth_method": "client_secret_post",
"realm": "hcluster_admins",
"redirect_uri": "https://apisix.h.net/",
"scope": "openid profile"
},
"redirect": {
"http_to_https": true
}
},
"upstream_id": "462214514335548089",
"status": 1
}
```
Seems that something is not correct in the plugin definition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org