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

New user form requires password #2174

Open
johnaohara opened this issue Nov 18, 2024 · 1 comment · May be fixed by #2222
Open

New user form requires password #2174

johnaohara opened this issue Nov 18, 2024 · 1 comment · May be fixed by #2222
Labels
area/UI type/bug Something isn't working

Comments

@johnaohara
Copy link
Member

Describe the bug

The "Create New User" form requires a password to be set, but for the OIDC (keycloak) backend, this is not a required field as the password in this use case is not managed via Horreum

image

@johnaohara johnaohara added type/bug Something isn't working area/UI labels Nov 18, 2024
@lampajr
Copy link
Member

lampajr commented Dec 19, 2024

Hi @johnaohara,
I was looking at this as I had to create a new User when using SSO as keycloak backen service and I have a couple of comments:

but for the OIDC (keycloak) backend, this is not a required field as the password in this use case is not managed via Horreum

That's not actually true because it depends on the horreum.roles.provider configuration and keycloak url, i.e.,,

  • OIDC enabled, horreum.roles.provider=keycloak --> we are sending the provided temporary pwd to the backend keycloak when creating the user there (so here Horreum is actually using the provided pwd)
  • OIDC enabled, horreum.roles.provider=database --> we are not creating the user on the Keycloak, so the pwd is not used
  • OIDC disabled, horreum.roles.provider=database (basic auth) --> here the pwd is required, but it is not actually temporary as there is no way to change it from UI

Proposal

  • If OIDC is enabled, let's mark the pwd as NOT required - then it would be up to the admin to decide whether set it or not in according to the real configuration (based on horreum.roles.provider) - then the backend when creating the user (if provider set to keycloak) will create the pwd if and only if is is not null/empty.
  • If OIDC disabled, let's keep the pwd as required

Created this #2222 for the proposal

Alternative solution
Expose the horreum.roles.provider in the /api/config/keycloak and rely on that value as well to mark the pwd as required or completely remove it

wdyt @johnaohara @barreiro ?

@lampajr lampajr linked a pull request Dec 19, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UI type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants