Oauth2 configuration behind a corporate proxy #2397
-
I am configuring OAuth2 using Okta. But specifically we are having issues because I know that the server needs to reach out to the issuer-uri. In order to do that in our environment we need to configure a proxy. I have tried adding httpsProxy settings in JAVA_OPTS but it is still failing. I have tried the following:
I think the rest is configured correctly because I got a proper error when I did not add a redirect URI in the Okta config.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
@amalagaura Hey, could you please share the full config? The first one looks like an env variable, but the second part is application.yml. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Haarolean Yes the first one is the env var JAVA_OPTS which I set in our Kubernetes Deployment config. It only has JAVA_OPTS and SPRING_CONFIG_LOCATION which is set to the below file:
|
Beta Was this translation helpful? Give feedback.
-
I enabled trace logging but I am unable to see any oauth2 related logging when the failed request is made. The error is "Invalid credentials" and it shows the issuer-uri URL on the page. The URL it redirects to is |
Beta Was this translation helpful? Give feedback.
-
OK we got it working. Somehow we thought we needed a proxy to reach Okta, but that appears incorrect. We were missing the Scopes. We saw the error on the URL when we went to the Chrome network tab. Please close this. Thank you. |
Beta Was this translation helpful? Give feedback.
OK we got it working. Somehow we thought we needed a proxy to reach Okta, but that appears incorrect.
We were missing the Scopes. We saw the error on the URL when we went to the Chrome network tab. Please close this. Thank you.