Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User update without groups deletes previously set groups from user #1132

Open
juthilo opened this issue Sep 16, 2024 · 3 comments · Fixed by #1189
Open

User update without groups deletes previously set groups from user #1132

juthilo opened this issue Sep 16, 2024 · 3 comments · Fixed by #1189
Assignees
Labels

Comments

@juthilo
Copy link

juthilo commented Sep 16, 2024

Current Behavior

When I include an existing user in my import file and don't list any groups, the CLI removes all of the previously set groups for that user.

Expected Behavior

For lower levels as well, the CLI should only update and delete resources or attributes if a certain key is set at all. I.e., if no groups key is set on a user, the import should leave the existing user's groups untouched.

(This assumption according to the behavior listed in docs/MANAGED.md )

Steps To Reproduce

1. Create a user `[email protected]`.
2. Add the user to the import file, leave out groups key
3. Run import
4. Groups will be deleted even though no groups key was present:

Environment

  • Keycloak Version: 25.0.2
  • keycloak-config-cli Version: v6.1.5
  • Java Version: 21

Anything else?

Example user yaml without groups:

- username: [email protected]
 enabled: true
 emailVerified: true
 firstName: User
 lastName: Example
 email: [email protected]
 realmRoles:
   - ...

Example log statements showing deletion of previously assigned group:

No need to update user '[email protected]' in realm 'realm'
Remove groups [/xyz] from user '[email protected]' in realm 'realm'
@Motouom
Copy link
Collaborator

Motouom commented Oct 25, 2024

Hello @juthilo please I would like you to give the specific patch of keycloak-config-cli Version: v6.1.5 that you used and had the problem so that it can ease the problem fixing. If you check well on the versions, you will see different patches of the same image that you are using (eg: 6.1.5-23, 6.1.5-23.0.7, 6.1.5-24)

@Calebasah Calebasah self-assigned this Nov 6, 2024
@AssahBismarkabah AssahBismarkabah linked a pull request Nov 13, 2024 that will close this issue
1 task
@github-project-automation github-project-automation bot moved this from Review to Done in os-competence-center-board Nov 15, 2024
@juthilo
Copy link
Author

juthilo commented Nov 19, 2024

Hi @Motouom sorry for the delay. We use v6.1.5-25.0.1, pulled from GitHub Releases.

@Motouom
Copy link
Collaborator

Motouom commented Nov 19, 2024

Hi @Motouom sorry for the delay. We use v6.1.5-25.0.1, pulled from GitHub Releases.

Okay thanks you @juthilo.

The work is in progress. It will be solved soon.

Thanks for your response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants