cloudfoundry / cloudfoundry/uaa

Fix length limitation of secrets and passwords

Open
#3,333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
844
Avg merge
2d 5h
Merged PRs (30d)
27

Description

Articel describes the limitation of bcrypt. If a secret (or password) in UAA has more than 72 characters, then these
characters are not used, e.g.
https://sendoh-daten.medium.com/using-bcrypt-as-password-encoder-can-be-problematic-when-passwords-are-non-ascii-characters-a5ac0478aeed

Example with dev. UAA:
uaac client add test --name test --authorized_grant_types client_credentials -s 'this-is-a-secret-which-is-not-longer-then-what-bcrypt-can-handle-matches'

uaac client client get test -s 'this-is-a-secret-which-is-not-longer-then-what-bcrypt-can-handle-matches'
works but also
uaac client client get test -s 'this-is-a-secret-which-is-not-longer-then-what-bcrypt-can-handle-matchesXXXXXXXXXX'
uaac client client get test -s 'this-is-a-secret-which-is-not-longer-then-what-bcrypt-can-handle-matches-more-than-wanted'

In this generator another weakness gets visible. UAA uses by default factor 10, but 12 is now the recommended one
https://bcrypt-generator.com/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the client-secret examples against a development UAA and trace the password and secret encoding configuration that uses bcrypt. Determine how longer secrets should be handled and whether the cost factor should change; done means added coverage demonstrates that extra characters affect authentication and the agreed bcrypt strength is applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.