Repository navigation
KC-SERVICES0013: Failed authentication: org.keycloak.models.ModelDuplicateException: Duplicate resource error #41866
Unanswered
eduhakim10
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I’m trying to set up auto-login in Keycloak using SPNEGO, but I’m facing the following error.
It seems that Keycloak is trying to insert a user that already exists in the database (imported from LDAP).
KC-SERVICES0013: Failed authentication: org.keycloak.models.ModelDuplicateException: Duplicate resource error
Caused by: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PUBLIC.UK_RU8TT6T700S9V50BU18WS5HA6_INDEX_B ON PUBLIC.USER_ENTITY(REALM_ID NULLS FIRST, USERNAME NULLS FIRST) VALUES ( /* key:14 */ '0ac32dd4-e24c-4eaf-844e-b0c50b378a0e', 'drogba')"; SQL statement:
insert into USER_ENTITY (CREATED_TIMESTAMP,EMAIL,EMAIL_CONSTRAINT,EMAIL_VERIFIED,ENABLED,FEDERATION_LINK,FIRST_NAME,LAST_NAME,NOT_BEFORE,REALM_ID,SERVICE_ACCOUNT_CLIENT_LINK,USERNAME,ID) values (?,?,?,?,?,?,?,?,?,?,?,?,?)
My setup:
-Kerberos/SPNEGO is enabled for auto-login.
What I’ve tried:
syncRegistrations=false
editMode=READ_ONLY
LDAP import mode = READ_ONLY
How can I configure Keycloak so that SPNEGO/Kerberos will log in an existing LDAP user without attempting to insert it again? or any solution for this topic?
Any guidance would be greatly appreciated.
All reactions