仓库指标
- Star
- (34,398 star)
- PR 合并指标
- (平均合并 6天 19小时) (30 天内合并 384 个 PR)
描述
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
saml
Describe the bug
I setup Google as an IDP in Keycloak. Signing in works fine.
However, IDP initiated signin does not work. That one is triggered by visiting https://workspace.google.com/dashboard and clicking on Keycloak.
The error reported by Keycloak is:
SAML RelayState parameter was null when it should be returned by the IDP
Google allows setting the RelayState to a static value. However RelayState in Keycloak is made of a state, tab and clientId.
Manually setting the Relay state to ..client_id gives the error:
error="expired_code", restart_after_timeout="true"
The RelayState is parsed here: https://github.com/keycloak/keycloak/blob/main/server-spi-private/src/main/java/org/keycloak/broker/provider/util/IdentityBrokerState.java#L72
I think allowing a static RelayState would solve this problem. There is no state when the login is IDP initiated.
Version
26.3.4
Regression
- The issue is a regression
Expected behavior
IDP-initiated signing works. Supporting a null RelayState seems the best option.
Actual behavior
An error occurs.
How to Reproduce?
- Setup Google as an IDP via SAML
- Go to https://workspace.google.com/dashboard and click on Keycloak
Anything else?
Related issues:
Related code: