[keycloak-dev] SerializedBrokeredIdentityContext ProviderID is filled with IdP alias

Chris Brandhorst Chris.Brandhorst at topicus.nl
Fri Nov 9 13:11:26 EST 2018


Hi all,

Redirect by Bruno from https://issues.jboss.org/browse/KEYCLOAK-8773:

We came across the following. In SerializedBrokeredIdentityContext#serialize, the identityProviderId property is filled with the alias of the IdentityProviderModel, instead of (what we would expect) its providerId.

Relevant line:
https://github.com/keycloak/keycloak/blob/b478472b3578b8980d7b5f1642e91e75d1e78d16/services/src/main/java/org/keycloak/authentication/authenticators/broker/util/SerializedBrokeredIdentityContext.java#L300

We feel this behaviour is semantically incorrect: we were checking against this property in one of our authenticators, but our code did not work for another identity provider of the same type. After some digging we thus found that we were expecting the providerId (coded value) but were actually reading the alias (configured value).

Simply throwing this in as a possible improvement. What do you think?

Regards,
Chris Brandhorst


More information about the keycloak-dev mailing list