keycloak-config-cli icon indicating copy to clipboard operation
keycloak-config-cli copied to clipboard

Error when creating new realm role without mentioning default role

Open plachta11b opened this issue 2 years ago • 1 comments

Current Behavior

Error when creating new realm role due to keycloak-config-cli trying to remove default realm role.

Using test resource to add role to realm produced:

ERROR 1 --- [           main] d.a.k.config.KeycloakConfigRunner        : HTTP 400 Bad Request

Before the error:

DEBUG 1 --- [           main] d.a.k.config.service.RoleImportService   : Delete realm-level role 'default-roles-my-realm' in realm 'my-realm'

Expected Behavior

Keycloak does not touch the default role. And adds new roles to the currently configured.

Steps To Reproduce

No response

Environment

  • Keycloak Version: [21.1.1]
  • keycloak-config-cli Version: [5.6.1]
  • Java Version: [17.0.6]

Anything else?

I need a general solution that could configure multiple Keycloak instances where I have no control over basic/default/starting configuration.

plachta11b avatar Jun 13 '23 08:06 plachta11b

Hi @st3v0rr,

this issue should be solved now 😉

jonasvoelcker avatar Dec 15 '23 20:12 jonasvoelcker

@jonasvoelcker It works now. Thank you.

plachta11b avatar Feb 24 '24 08:02 plachta11b