You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/10 09:12:15 UTC

[GitHub] [apisix-dashboard] liuxiran opened a new issue #548: bug:enable openid-connect plugin without redirect_uri got 500 error

liuxiran opened a new issue #548:
URL: https://github.com/apache/apisix-dashboard/issues/548


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ ] Bug
   - [ ] Requirements
   - [ ] Feature or performance improvement
   - [ ] Other
   
   ### Bug
   - Which version of Apache APISIX Dashboard, OS, and Browser?
   
   1. create a route, enable openid-connect plugin, configs:
   ```json
   {
   	"name": "api2",
   	"route_group_id": "de45ec14-317f-4177-8a22-10ab95bd45f7",
   	"route_group_name": "group1",
   	"status": true,
   	"desc": "",
   	"protocols": ["http"],
   	"paths": ["/get1"],
   	"methods": ["GET"],
   	"upstream_protocol": "https",
   	"type": "roundrobin",
   	"plugins": {
   		"openid-connect": {
   			"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
   			"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
   			"discovery": "https://samples.auth0.com/.well-known/openid-configuration"
   		}
   	},
   	"script": {},
   	"uris": ["/get1"],
   	"vars": [],
   	"upstream": {
   		"type": "roundrobin",
   		"nodes": {
   			"httpbin.org:443": 1
   		},
   		"timeout": {
   			"connect": 6000,
   			"send": 6000,
   			"read": 6000
   		}
   	},
   	"upstream_header": {},
   	"upstream_path": {
   		"to": "/get"
   	}
   }
   ```
   
   2. visit this route via chrome, got 500 error
   
   ![2020-10-10 14-52-43屏幕截图](https://user-images.githubusercontent.com/2561857/95648250-53e39600-0b08-11eb-806f-4e74a05b7532.png)
   
   
   3. got the error log in apisix error.log:
   ```shell
   2020/10/10 06:47:45 [error] 26#26: *6045490 [lua] openidc.lua:1378: authenticate(): request to the redirect_uri path but there's no session state found, client: 192.168.1.145, server: , request: "GET /get HTTP/1.1", host: "192.168.1.145:9
   2020/10/10 06:47:45 [error] 26#26: *6045490 [lua] openid-connect.lua:163: phase_func(): failed to authenticate in openidc: request to the redirect_uri path but there's no session state found, client: 192.168.1.145, server: , request: "GET
   2020/10/10 06:47:45 [error] 25#25: *6045493 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/echo.lua:96: attempt to index local 'conf' (a userdata value)
   stack traceback:                                                                                                                                            
   coroutine 0:                                                                                                                                             
           /usr/local/apisix/apisix/plugins/echo.lua: in function 'phase_fun'                                                                                     
           [string "route#41ee9eef-564e-4208-86e6-fc6834bd7178"]:17: in function 'phase_func'                                                                  
           /usr/local/apisix/apisix/script.lua:52: in function 'run'                                                                                                 
           /usr/local/apisix/apisix/init.lua:508: in function 'http_access_phase'                                                                                 
           access_by_lua(nginx.conf:173):2: in main chunk, client: 192.168.1.145, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.145:9080", referrer: "http://192.168.1.145:9080/get"
   ```
   **`redirect_uri` should be a reqired param in openid-connect plugin**


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #548: bug:enable openid-connect plugin without redirect_uri got 500 error

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #548:
URL: https://github.com/apache/apisix-dashboard/issues/548#issuecomment-706555989


   Here is the doc for openid-connect, cc @membphis 
   
   https://github.com/apache/apisix/blob/master/doc/plugins/openid-connect.md


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #548: bug:enable openid-connect plugin without redirect_uri got 500 error

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #548:
URL: https://github.com/apache/apisix-dashboard/issues/548#issuecomment-706635768


   @nic-chen need your help to confirm a mini case


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org