Skip to content

Passwords, changed via Keycloak, are not hashed in LDAP #102

Closed
opencloud-eu/opencloud
#1707

Description

@schweigisito

Users' passwords which have been created or changed via Keycloak don't get hashed in LDAP.

How to reproduce

  • set up OpenCloud to use Keycloak and LDAP using docker-compose
  • create a user schweigi in Keycloak
  • set a password demo

Current behaviour

The userPassword contains the base64 encoded plain text password

$ ldapsearch -x -LLL -h localhost:389 -b dc=opencloud,dc=eu uid=schweigi userPassword| grep 'userPassword'|cut -f2 -d" "|base64 -D
demo

Expected behaviour

The password must be hashed

Activity

  1. self-assigned this
    on Sep 30, 2025
  2. schweigisito commented on Sep 30, 2025

    @schweigisito
    MemberAuthor

    "usePasswordModifyExtendedOp": [
    "false"

    defaults to false which results in not telling LDAP server to encrypt the plain text password received from Keycloak.

    This fix changes the value to true to have LDAP server sided password hashing enabled.

  3. schweigisito commented on Sep 30, 2025

    @schweigisito
    MemberAuthor

    After changing the usePasswordModifyExtendedOp from false to true:

    $ ldapsearch -x -LLL -h localhost:389 -b dc=opencloud,dc=eu uid=schweigi userPassword| grep 'userPassword'|cut -f2 -d" "|base64 -D
    {SSHA}6gKC/YLEAgtMg69aS3XPjjpIiHa5y5rY
    
  4. changed the title [-]Passwords changed via Keycloak are not hashed in LDAP[/-] [+]Passwords, changed via Keycloak, are not hashed in LDAP[/+] on Sep 30, 2025
  5. micbar commented on Sep 30, 2025

    @micbar
    Member

    Fixed by #103

  6. added a commit that references this issue on Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions