opensingular / singular-keycloak-database-federation

Keycloak User Storage SPI for Relational Databases (Keycloak User Federation, supports postgresql, mysql, oracle and mysql)
Apache License 2.0
120 stars 57 forks source link

Feature/pbkdf2 validation #21

Closed rohit-uf closed 2 years ago

rohit-uf commented 2 years ago

Database Used: PostgreSQL

Application using keycloak: Django 4.0.4

Closes #20

I could not figure out how to use the existing factory class, so I wrote my own logic for this purpose.

  1. Added a setting in configurations for pbkdf2-sha256 algorithm.
  2. Added a class PBKDF2SHA256HashingUtil in org.opensingular.dbuserprovider.util package to verify the hashed password
  3. Assuming the incoming password hash is coming from django in the format algo$no_of_iterations$salt$hash_base64_encoded

I used this repository for my personal project. If this section of code adds to the existing functionality of this repo, then you can consider this pull request. I'd be happy to make changes as required.

Thanks

viniciusuriel commented 2 years ago

Thank you for your contribution @rohit-uf and for you review @dla-c-box!