-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Facing issue with redirected uri #374
Comments
The URI that is checked by Keycloak is passed to it by the application (in this case Apicurio). The first step the app takes when the user is not yet authenticated, is to redirect the browser to Keycloak. When it does this, it passes whatever URL was used to access the application as part of the request to Keycloak. So my guess is that when you are accessing Apicurio, somehow you have the port number in the URL. Perhaps haproxy is adding the port? Or perhaps in your browser you simply have the port as part of the URL? It's hard to say without more information. Of course, you can also simply add |
I have changed the keycloak redirected uri to http://apicurio-0-2-15-gitlab-apicurio.haproxy.project.example.com:80/* 12:02:48,597 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-43) failed to turn code into token |
I'm thinking specifically this comment: #356 (comment) |
I have changed the keycloak redirected uri to http://apicurio-0-2-15-gitlab-apicurio.haproxy.project.example.com:80/* ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-43) failed to turn code into token |
I think the problem is with the redirected uri, as we added 80 port in keycloak. |
Did you try what @gigaga suggested?
|
If that doesn't work, you'll need to provide some details about your OpenShift environment and the various configuration settings you're using. E.g. the system properties you have in standalone-apicurio.xml, the keycloak realm settings, and any other standalone-apicurio.xml changes you may have made. Finally, if you're interested in running Apicurio in OpenShift, I might suggest you try this: It's the official Apicurio openshift template, and it's what we use to run the studio.apicur.io instance (with a few minor changes such as running postgresql in AWS). |
Any progress or updates on this? |
After changing proxy-address-forwarding="true" to false, it's work, I was able to deploy on openshift. |
Great! |
When accessing the application I get the following error:
The redirected uri in keycloak is:
http://apicurio-0-2-15-gitlab-apicurio.haproxy.project.example.com
but when i checked the logs of keycloak the redirected uri is:
WARN [org.keycloak.events] (default task-45) type=LOGIN_ERROR, realmId=apicurio, clientId=apicurio-studio, userId=null, ipAddress=10.125.176.50, error=invalid_redirect_uri, redirect_uri=http://apicurio-0-2-15-gitlab-apicurio.haproxy.project.example.com:80/studio/
By default it is taking port as 80, but my application route does not need a port, it is accessed with route only(http://apicurio-0-2-15-gitlab-apicurio.haproxy.project.example.com).
Could you please help me out.
The text was updated successfully, but these errors were encountered: