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 cannot update profile when some invalid attribute invisible to him is present on his profile #24697

Closed
1 task done
Tracked by #23905
mposolda opened this issue Nov 13, 2023 · 0 comments · Fixed by #24712
Closed
1 task done
Tracked by #23905
Assignees
Labels
area/user-profile kind/bug Categorizes a PR related to a bug
Milestone

Comments

@mposolda
Copy link
Contributor

mposolda commented Nov 13, 2023

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

user-profile

Describe the bug

User cannot update his profile (in "Update profile" required action or in account console) when there is some attribute, which is hidden to him (according to user-profile definition) and which has invalid value according to user-profile validation.

User should not be stucked because attribute is invisible to him and hence he should be allowed to proceed as he cannot update the attribute

Version

nightly

Expected behavior

Allow user to continue login (or update his account in account console) when there is some invisible attribute on him with invalid value (invalid value according to user profile validations)

Actual behavior

User is stucked when updating profile when there is some invisible attribute on him with invalid value (invalid value according to user profile validations)

How to Reproduce?

  1. Enable user-profile feature, but don't enable yet user-profile for the realm
  2. Create user john with password john
  3. Add attribute foo with value abc
  4. Add required action Update profile to user john
  5. Enable user-profile in the realm
  6. Add definition for user-profile attribute foo with length to be between 5 and 15 characters (So attribute foo on user john is invalid now according to this defined validation). Make sure that attribute is visible and editable only for administrator
  7. In different browser tab, login as user john. User needs to update his profile. Attribute foo is not shown on the update-profile screen, which is correct.
  8. Try to update firstName and lastname and continue login. But I cannot continue login. After confirm update-profile, server returns 200 and it returns me back to the update-profile screen with not any message displayed to the user. So user cannot continue login, which is incorrect behaviour
  9. In different browser tab, login as admin console and update attribute foo on user john to have valid value like abcdef.
  10. Go back to the browser tab with user login (step 8) and confirm login again. Now it works and user can continue login.

User is not able to update his attributes in account console as well when he has invalid value of some attribute, which is not visible to him.

So it is clear that the issue is caused by the fact that user john has invalid value of attribute foo on his profile. However since it is not attribute editable for him, and he did not updated it in this request, he should be allowed to login.

Anything else?

No response

@mposolda mposolda added kind/bug Categorizes a PR related to a bug status/triage labels Nov 13, 2023
@mposolda mposolda added this to the 24.0.0 milestone Nov 13, 2023
@rmartinc rmartinc self-assigned this Nov 13, 2023
rmartinc added a commit to rmartinc/keycloak that referenced this issue Nov 13, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
pedroigor pushed a commit that referenced this issue Nov 14, 2023
…ng and read-only in the context

Closes #24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
@stianst stianst modified the milestones: 24.0.0, 23.0.0 Nov 15, 2023
sschu pushed a commit to bosch-io/keycloak that referenced this issue Nov 15, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
Yang-Xie-OSS pushed a commit to Hitachi/keycloak that referenced this issue Nov 21, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
jonkoops pushed a commit to jonkoops/keycloak that referenced this issue Nov 21, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
Yang-Xie-OSS pushed a commit to Hitachi/keycloak that referenced this issue Nov 22, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
jonkoops pushed a commit to jonkoops/keycloak that referenced this issue Nov 22, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
srose pushed a commit to srose/keycloak that referenced this issue Dec 20, 2023
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
kamontat pushed a commit to kamontat/keycloak that referenced this issue Jan 20, 2024
…ng and read-only in the context

Closes keycloak#24697

Signed-off-by: rmartinc <rmartinc@redhat.com>
Signed-off-by: Kamontat Chantrachirathumrong <14089557+kamontat@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-profile kind/bug Categorizes a PR related to a bug
Projects
None yet
3 participants