Repository navigation
Callback API returns 401 after login after keycloak upgrade to 26.2.5 #40823
Unanswered
abhishek-shrivastava-netspi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am trying to upgrade Keycloak from 24 -> 26.
After the upgrade, my login journey has started to break. Once the login happens and the call comes back to my backend using the callback api, I get 401.
the callback api looks something like this.
https://myhostname.ai/api/auth/callback?state=https%3A%2F%2Fmyhostname.ai%2Flanding?back%3D&session_state=c253a8e7-1015-47f2-a56b-780f68098d16&iss=https%3A%2F%2Fmyhostname.ai%2Fauth%2Frealms%2Fdemo&code=1aebdc91-404a-4805-aae0-5583137b17f6.c253a8e7-1015-47f2-a56b-780f68098d16.b7c4c5b0-39b8-4d5d-9132-1d4a76fa8e5fAfter investigating it further, I realised the token exchange api is breaking.
It should typically return JSON with access token. interestingly when I remove the whole callback and just call
https://myhostname.ai/I am able to successfully login. and if I just retry on 401 page the response changes to400 Bad Request: "{"error":"invalid_grant","error_description":"Code not valid"}"dockerfile
entrypoint to start
a couple of configs that might help understand the issue
cache_owners_count: 2 kc_cache_config_file: "cache-ispn-jdbc-ping.xml" jgroups_discovery_protocol: "JDBC_PING" kc_proxy: "edge" kc_ui_admin: "netspiadm" kc_db: "postgres" kc_log_level: "ERROR" kc_hostname: "myhostname.ai" kc_hostname_relative_path: "/auth" kc_hostname_admin: "myhostname-auth.ai" kc_realm_name: "platformdemo" kc_features_disabled: "admin,admin-fine-grained-authz,account,ciba,impersonation,kerberos,par,step-up-authentication,web-authn" backend_db_user: "user_backend"there are some variables that I provide directly to ecs task. I can attach it if it is required.
I dont have any reverse proxy configured but I do have ALB thats in place
All reactions