Questions tagged [keycloak-spi]
32 questions
5
votes
0 answers
Keycloak user storage SPI, not listing users in keycload admin console
I have created a user storage SPI, exactly as defined in the documentation: https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi, a literal copy/paste.
I have implemented the interface UserQueryProvider correctly, but…

monzonj
- 3,659
- 2
- 32
- 27
4
votes
0 answers
Implement KeyCloak Role Storage and Role Mapping over external Database
I have a requirement of implementing KeyCloak over external Database and should be able to CRUD users and roles and along with mapping/assigning them.
I also able to develop CRUD Users using User Storage SPI, but was unable to find any content…

KNDheeraj
- 834
- 8
- 23
4
votes
5 answers
Implementing a SPI to extend Keycloak API - Could not find resource
I'm trying to create a custom resource on my Keycloak server to extend its rest API. So i'm implementing a SPI. Starting with a hello world.
At the moment my goal is to obtain a "hello" + name through a GET on…

The Deep
- 73
- 1
- 8
4
votes
3 answers
Keycloak - Custom SPI does not appear in list
I made a custom SPI for my keycloak server and now I have to configure it on the Admin console.
I added the SPI as a module, with manual installation, so I have it on modules/{package-name}/main, with the module.xml; I have also put the on…

ourobor93
- 372
- 1
- 7
- 21
4
votes
1 answer
Getting the current users access token in a Keycloak SPI/Provider (at initial login)
How do i get access to the currently authenticated users access token in a Keycloak Service Provider Interface when the user has just logged in?
Current situation:
I am doing a manual Password Grant with Apache HttpClient inside a custom User…

sunnydandrum
- 51
- 3
3
votes
1 answer
Keycloak custom identity provider configuration page
In older versions of Keycloak (<= 19.0.3) it was possible to create your own HTML templates for custom identity providers by packaging them under theme-resources/resources/partials and providing them as part of the identity provider jar.
Keycloak…

lazyneuron
- 537
- 5
- 12
3
votes
3 answers
Why does Keycloak keep redeploying the same .jar file?
I have a custom SPI javascript provider, packaged in the .jar file, as described in the official Keycloak docs.
For the local development, I'm using jboss/keycloak docker image via docker-compose file with the volume mapping to the…

st.lovas
- 81
- 7
1
vote
1 answer
Pass configuration to Keycloak SPI Provider?
I am trying to create an EventListenerProvider implementation in Keycloak 22.x for the purposes of listening to user account creation events. I've written the provider code itself and it is working without issue. Now I am trying to allow for the…

Shadowman
- 11,150
- 19
- 100
- 198
1
vote
0 answers
Keycloak SPI access realmProvider.getRealmsStream() | Usage of transactions
I'm working on a Keycloak SPI that publishes changes to Realms and Clients in Keycloak via RabbitMQ and handles RabbitMQ RPC requests to receive Keycloak specific configuration. The first part is already functioning.
The second part is causing…

finwes
- 13
- 4
1
vote
0 answers
Force login after password reset in Keycloak 18.0.2
I am using Keyclaok 18.0.2 and when a user clicks on "Forgot Password?" it receives an email for the password update. The problem is that after the new password is created, the user is automatically being login. I am trying to avoid that and try to…

Nikola Yankov
- 11
- 1
1
vote
1 answer
How to configure KeyCloak with External User Provider so that it does not immediately call getUserByUsername method after addUser method
We are using KeyCloak for Identity and Access Management for our website. I have also implemented the UserStorageProvider interface for authenticating the user from an external user provider. Now, I am trying to implement the…

Awais Memon
- 56
- 4
1
vote
1 answer
How to programmatically create keycloak user session from SPI?
I need to get access/refresh pair (or at least access) tokens from a custom REST endpoint.
So in general I need programmatically create a user session from SPI by user ID(without a user password)
Could you please suggest a better way or any…

M.Surnyk
- 33
- 4
1
vote
0 answers
Duplcated of How to access the original case sensitive username input in custom user storage provider of keycloak?
I developed a service provider interface (SPI) for User Federation in keycloak.
When I try to login with an existing case sensitive user, keycloak converts it to lower case, so at the end, the sent username was not found in my user API.
I am using…

Alex Sepulveda
- 11
- 2
1
vote
2 answers
KEYCLOAK: OTP using a custom user storage SPI
Good day, I was wondering if any anyone has information on how to implement 2fa using OTP in keycloak with a custom user storage SPI.
I already have an extension for my SQL Server database, and I can login using their password (BCrypt). But, I can't…

RedArcCoder
- 101
- 8
1
vote
0 answers
How to create an Access Token inside Keycloak SPI (custom event listener) with grant_type `client_credentials`
There is a need to have an access token in custom SPI to call the other microservices in the system.
It is possible to have client_id and client_secret.
Can you suggest any variants?

Oleksandr Kazimirov
- 31
- 3