-
Notifications
You must be signed in to change notification settings - Fork 335
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
Authorization code is not getting passed to kong when client app is sending authorization <<>> in header instead of getting upstream server response #83
Comments
Is the |
Can you please help to get this close. ** "client_id": "7db76fea-f48d-4396-89da-632625c6a435", when we hit (https://test.pocad.com/adfs/.well-known/openid-configuration) URL from browser we are getting below response. Response Questtion 1: Is issuer URL and discovery URL is case sensitive and should match URL String? Question 2: We change discovery URL in kong plugin same with Issuer URL( i mentioned URL of Issuer as TEST.pocad.com/adfs. and configured discovery URL in kong plugin https://TEST.pocad.com/adfs/.well-known/openid-configuration) and hit to kong proxy we are getting some Login page in response. ** <title>Error</title> <script type="text/javascript">// function Errors(){this.reportSubject = 'Error Report'; } //</script> <style type="text/css">.illustrationClass {background-image:url(/adfs/portal/illustration/illustration.png?id=183128A3C941EDE3D9199FA37D6AA90E0A7DFE101B37D10B4FEDA0CF35E11AFD);}</style>JavaScript requiredJavaScript is required. This web browser does not support JavaScript or JavaScript in this web browser is not enabled. To find out if your web browser supports JavaScript or to enable JavaScript, see web browser help. POCADFS Login Page
An error occurred
An error occurred. Contact your administrator for more information.
Error details
// Copyright (c) Microsoft Corporation. All rights reserved. // This file contains several workarounds on inconsistent browser behaviors that administrators may customize. // iPhone email friendly keyboard does not include "" key, use regular keyboard instead. Thanks in advance!! |
The Besides, updating lua-resty-oidc to 1.9.0 in this plugin would solve also the problem, cause they remvoed checking this field. zmartzone/lua-resty-openidc#219 |
We have configured below details in kong-oidc plugin. And now issuer URL issue got resolved. We are now getting some "session_secret" not found for writing; maybe it is a built-in variable that is not changeable or you forgot to use "set $session_secret '';" in the config file to define it first. We gone through #1 and set session_secret (encoded password) in plugin but still we are facing below issue. Can you please help to get this close. Config we did for plugin ** DEBUG LOGS** Then we tried to set set $session_secret '';" in /usr/local/kong/nginx-kong.conf file and restarted kong. But after restarting kong same property is getting deleted automatically. Hence we are getting same issue. 2018/11/23 15:42:07 [debug] 23699#0: *37353 [lua] cluster_events.lua:222: [cluster_events] polling events from: 1542966130.61 to: 1542967927.558 So we tried below scenario to set session_secret but all cases we received same error log .
|
Can you provide details about:
|
Pfb details for your reference.
After giving decode value to session_secret in kong-oidc plugin that error goes away. Does it mean that we are successfully connected to adfs? Error.log below 018/11/26 16:04:33 [debug] 30516#0: *2321 [lua] cluster_events.lua:222: [cluster_events] polling events from: 1543227998.025 to: 1543228473.506 We have below question. Can you please help to get this clarified?
plugin config { Error.log 018/11/26 16:04:33 [debug] 30516#0: *2321 [lua] cluster_events.lua:222: [cluster_events] polling events from: 1543227998.025 to: 1543228473.506 Not getting much info in this error. Could you please help us where we can check plugin related logs. Below logs from SOAP-UI. Mon Nov 26 17:40:10 IST 2018:DEBUG:>> "POST /imapi HTTP/1.1[\r][\n]" Regards |
The logs look good now. The header needs to be: "Authorization: Bearer <>". I haven't tested this plugin against ADSF 3.0. |
we are not able to get response from upstream url after send Authorization: Bearer <>". But if we diable oidc plugin upstream url works fine. No error getting printed in error log. Regards |
You would need to set the |
We are not trying to pass Authorization header directly to upstream api. we are going As per your design diagram. We are not able to get the point where actually we stopped to reach to upstream Api. As per your previous comment kong and adfs connection is good. Can you please help to get answer for below point?
Now client application is sending Authorization Code<<>> in header to kong proxy but they are getting below response where as upstream API is working fine. **HTTP/1.1 500 Internal Server Error An unexpected error occurred** |
can you please update on this? |
any news for this issue ? |
@Trojan295
We are getting below issue. we installed plugin successfully and then configured one api with oidc plugin. After than when we hit from kong proxy to that api we are getting below issue.
LOG 2018/11/21 16:14:22 [error] 15837#0: *35 [lua] openidc.lua:492: openidc_discover(): issuer field in Discovery data does not match URL, client: 10.51.204.125, server: kong, request: "POST /imapi HTTP/1.1", host: "10.144.20.240:8118"
Config we did.
},
The text was updated successfully, but these errors were encountered: