Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[cetic/fadi] keycloak redirect_uri is always localhost:3000 #39

Closed
AyadiAmen opened this issue May 19, 2021 · 1 comment
Closed

[cetic/fadi] keycloak redirect_uri is always localhost:3000 #39

AyadiAmen opened this issue May 19, 2021 · 1 comment

Comments

@AyadiAmen
Copy link
Contributor

Describe the bug

The bug is about keyloack: https://github.com/cetic/helm-fadi/tree/feature/keycloak .

I deployed keycloak and link it with grafana ( following: https://www.techrunnr.com/how-to-setup-oauth-for-grafana-using-keycloak/ , https://www.lars-fischer.me/posts/2021/grafana-sso-integration-with-keycloak/ and https://janikvonrotz.ch/2020/08/27/grafana-oauth-with-keycloak-and-how-to-validate-a-jwt-token/ ) i always get the error Invalid parameter: redirect_uri

when i check keycloak's logs i find:

05:46:02,301 WARN [org.keycloak.events] (default task-12) type=LOGIN_ERROR, realmId=devops, clientId=Grafana, userId=null, ipAddress=172.17.0.1, error=invalid_redirect_uri, redirect_uri=http://localhost:3000/login/generic_oauth

what seems to be the problem is that in the logs redirect_uri=http://localhost:3000 which is the default value for redirect_uri, whereas the redirect_uri is an option in keycloak where i pass a valid redirect_uri which is grafana's ip and port with a wildcard but no matter what i do in the keycloak side the redirect_uri is always localhost:3000 while it should be grafana's ip adress and port.

Version of Helm and Kubernetes:

helm: version.BuildInfo{Version:"v3.5.2", GitCommit:"167aac70832d3a384f65f9745335e9fb40169dc2", GitTreeState:"dirty", GoVersion:"go1.15.7"}

kubernetes: Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-21T20:23:45Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Clone the branch feature/keycloak: https://github.com/cetic/helm-fadi/tree/feature/keycloak.

  • install that version of FADI
  • go to keycloak and create the realm, client etc ( you can follow this https://www.techrunnr.com/how-to-setup-oauth-for-grafana-using-keycloak/ )
  • in the config map /templates/keycloak.yaml configure grafana accordingly.
  • upgrade FADI using " helm upgrade --install fadi " so that grafana restarts with the new configuration
  • access grafana and try to sign in with Oauth

Anything else we need to know:

@AyadiAmen
Copy link
Contributor Author

solved with aff8f55

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant