Repository navigation
Keycloak setup for ID Austria (with transient sub) #51873
|
(I asked this on the forum before seeing the wind down notice, hope you don't mind I copy and paste it here too) Hello, I have not yet figured out from the docs and various bits of information online if Keycloak will work out of the box with ID Austria as an external IdP. I have seen some discussions with people writing their own plugins for it but not sure if any of this has been integrated into Keycloak or if features have been added that would solve the problem so maybe some of you can help me. I am very new to Keycloak and have only been playing with it in a local docker container and do not yet have an ID Austria setup to really test with and I am just trying to figure out if it can do what we need. The main point that seems to be causing issue is the fact that ID Austria uses a transient sub claim in their id token which changes with every login. The static id used to identify the user is the “bPK” located at “urn:pvpgvat:oidc.bpk” in the id token. I have seen that you can configure mappers to map different claims to solve this but I still have not seen any definitive proof that this will solve the problem. Here there is mention of using the Attribute Mapper but also no proof that it worked (the opposite actually): sd-f/keycloak-custom-attribute-idp-linking#3 and also more talk around writing custom plugins for it: So that is the first point to clear up. The second is the fact that there is no user info endpoint in ID Austria. I found that when configuring an IdP you can check the “Disable user info” option which looks to me to disable the use of the user info endpoint, I am guessing in favor of just using the token (from the info hover): “Disable usage of User Info service to obtain additional user information? Default is to use this OIDC service.” I think the rest of the configuration is simple and clear but if I can’t solve the above then I guess it is not an out of the box solution. Thanks for any help! |
Replies: 1 comment 4 replies
|
Hi @ThriceGood, Assuming, ID Austria is a more or less regular OIDC IdP... (I don't know ID Austria details) I've not tested it, but with a transient For the |
To get the bPK as the userId (will yield as
subin the KC issued tokens), you must use theUsername Template Importer, not a regularAttribute Importer. The mapper might look like this:(I haven't tested this specific usecase, just deriving from other cases)
If your attribute
urn:pvpgvat:oidc.bpkalso has a friendly name, e.g.bPK, the template also could beATTRIBUTE.bPKFrom the helptext of the template field: