nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
454 stars 320 forks source link

Getting timeout while calling discovery URL #77

Open ayan1207 opened 5 years ago

ayan1207 commented 5 years ago

@Trojan295 We are using same plugin for KONG-OIDC-ADFS .Then we create one api and added OIDC plugin and there we configured below details for the same.

config.discovery: https://xxxx/adfs/.well-known/openid-configuration Client-ID=xxx Client-secret=xxx

But while hitting we are getting below log in kong. But above discovery is working fine when hitting using curl from the same machine.

Logs:

.144.20.240:8006" 10.51.201.6 - - [26/Oct/2018:07:11:11 +0000] "POST /imapi HTTP/1.1" 500 117 "-" "Apache-HttpClient/4.1.1 (java 1.5)" 10.141.127.244 - - [26/Oct/2018:07:12:30 +0000] "GET /plugins/schema/oidc HTTP/1.1" 200 1073 "-" "-" 10.141.127.244 - - [26/Oct/2018:07:12:44 +0000] "PATCH /plugins/87e238e9-cfa7-451a-b8d5-0128275aada9 HTTP/1.1" 200 560 "-" "-" 10.141.127.244 - - [26/Oct/2018:07:12:44 +0000] "GET /plugins?api_id=f8b3e3db-3a99-4484-873f-5332ff864996 HTTP/1.1" 200 581 "-" "-" 2018/10/26 07:13:49 [error] 28#0: *13042 [lua] openidc.lua:483: openidc_discover(): accessing discovery url (https://xxx/adfs/.well-known/openid-configuration) failed: timeout, client: 10.51.201.6, server: kong, request: "POST /imapi HTTP/1.1", host: "10.144.20.240:8006" 10.51.201.6 - - [26/Oct/2018:07:13:49 +0000] "POST /imapi HTTP/1.1" 500 122 "-" "Apache-HttpClient/4.1.1 (java 1.5)"

ronaldxl commented 5 years ago

I have the same error in some installation. @ayan1207: How did you solve it?

philbarr commented 4 years ago

If you're hitting ADFS4 I created kong-oidc-adfs for this reason as I was having problems with it and ADFS4 expects more than the usual parameters. Sample config is here: https://github.com/philbarr/kong-oidc-adfs/wiki/Sample-Configuration-for-Kong-OIDC-ADFS