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

Can't set unmanagedAttributePolicy in userProfile #1016

Closed
Tracked by #1178
VictorGFM opened this issue May 8, 2024 · 1 comment · Fixed by #1100
Closed
Tracked by #1178

Can't set unmanagedAttributePolicy in userProfile #1016

VictorGFM opened this issue May 8, 2024 · 1 comment · Fixed by #1100
Labels

Comments

@VictorGFM
Copy link

Current Behavior

When trying to add unmanagedAttributePolicy to the userProfile configuration (see config example below), the keycloak-config-cli throws an error.
Config:

realm: realm-test
displayName: "Realm Test"
enabled: true
userProfile:
  - name: username
    displayName: "${username}"
    validations:
      length:
        min: 3
        max: 255
      username-prohibited-characters: { }
  unmanagedAttributePolicy: "ENABLED"

Error:

2024-05-08 22:33:45.306 ERROR 408 --- [           main] d.a.k.config.KeycloakConfigRunner        : Unable to parse file 'file:/opt/keycloak/data/import/realm.yaml': Cannot deserialize value of type `java.util.ArrayList<java.util.Map<java.lang.String,java.lang.Object>>` from String value (token `JsonToken.VALUE_STRING`)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: de.adorsys.keycloak.config.model.RealmImport["userProfile"]->java.util.LinkedHashMap["unmanagedAttributePolicy"])

Expected Behavior

The keycloak-config-cli should be able to configure the unmanagedAttributePolicy with the corresponding value set (e.g. ENABLED, DISABLED, ADMIN_EDIT, ETC) and no error should be thrown.

Steps To Reproduce

Call the keycloak-config-cli using a config that contains the `userProfile.unmanagedAttributePolicy`, as provided in the example above.

Environment

  • Keycloak Version: [24.0.3]
  • keycloak-config-cli Version: [5.12.0]
  • Java Version: [17]

Anything else?

No response

@VictorGFM VictorGFM added the bug label May 8, 2024
@antikalk
Copy link
Contributor

Facing the same issue.

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.

2 participants