keycloak/keycloak

Duplicates in unmanaged attributes

Open

#40.929 aperta il 4 lug 2025

Vedi su GitHub
 (14 commenti) (15 reazioni) (0 assegnatari)Java (8346 fork)batch import
area/admin/apiarea/user-profilehelp wantedkind/bugpriority/normalstatus/auto-bumpteam/core-iamteam/core-shared

Metriche repository

Star
 (34.398 star)
Metriche merge PR
 (Merge medio 6g 19h) (384 PR mergiate in 30 g)

Descrizione

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/api

Describe the bug

Identity has multiple duplicated unmanaged attributes, same key, same value.

Version

26.3.0

Regression

  • The issue is a regression

Expected behavior

When we call REST API for user update many times, where we send attributes, we expect that the user will have only the attributes that we send.

Image

Actual behavior

When we call REST API for user update many times. Attributes are duplicated.

Image

How to Reproduce?

  • Set up Keycloak 26.3.0 via docker-composue with PostgreDB. Keycloak start with "start-dev", "--debug"
  • Enable Unmanaged Attributes in Realm settings.
  • Create a new user test-user.
  • Obtain a token from Keycloak with manage-realm claim. I use OAuth2.0 authorisation via the admin-cli client and the admin user.
  • Set the token to attached force_attribute_update_KC, attribute token.
  • Set the test-users ID to force_attribute_update_KC, attribute userId.
  • Remove suffix .txt from force_attribute_update_KC.js.txt
  • Run script k6 run --insecure-skip-tls-verify .\force_attribute_update_KC.js

force_attribute_update_KC.js.txt

Anything else?

No response

Guida contributor