Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycloak: Do not create local user while identity brokering

Tags:

java

keycloak

I am using keycloak as an identity broker to SAML identity provider in order to login to web application.

To get it work I have created new authentication flow which looks like: "Create User If Unique", "Automatically Link Brokered Account".

Keycloak redirects correctly to the identity provider with the login page. After login identity provider redirects as expected to keycloak and then to my web application but keycloak also creates local user.

Is it possible to use external IDP without local users creation?

The problem with local users : I have "custom user federation" implementation which fetch users from my application and if local user created it's not possible login to keycloak using "custom user federation". Keycloak will just try login like with local user.

like image 517
Petro Mykhailyshyn Avatar asked Jun 07 '19 10:06

Petro Mykhailyshyn


People also ask

Does Keycloak create local user?

Keycloak redirects correctly to the identity provider with the login page. After login identity provider redirects as expected to keycloak and then to my web application but keycloak also creates local user. Is it possible to use external IDP without local users creation?

How to use Keycloak as an identity broker to SAML identity provider?

I am using keycloak as an identity broker to SAML identity provider in order to login to web application. To get it work I have created new authentication flow which looks like: "Create User If Unique", "Automatically Link Brokered Account". Keycloak redirects correctly to the identity provider with the login page.

How to create a demo user in Keycloak-Odic?

In the Identity Providers: select “Keycloak-odic”. I have updated the Alias & Display Name as per our use-case. Client Secret: Copy from the Broker client. (Keycloak Internal: 127.0.0.1:8080) That’s all you need. Create a demo user from the user's section in Keycloak Internal (127.0.0.1:8080).

Can Foo’s Keycloak import bar claims from the identity broker?

In other words, a researcher from Bar can have these claims in their ID Token from Bar’s IdP, which can be consumed by Foo’s IdP and further by Foo’s service. Keycloak provides a way to import these claims from the Identity Broker. In our case, Foo’s Keycloak should be able to import Bar’s claims, if they exist.


1 Answers

Unfortunately, it is currently not possible to skip the creation of local user account. According to the Keycloak team, they are deferring the support "as we are planning on some larger work to the storage layer which will make it possible to deliver on this capabiltiy". See Feature Request https://issues.jboss.org/browse/KEYCLOAK-4429.

like image 90
Stefmeister Avatar answered Oct 02 '22 20:10

Stefmeister