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

Add maxLength to passwordcomplexity policy #7927

Closed
2 tasks done
Yberion opened this issue May 7, 2024 · 1 comment
Closed
2 tasks done

Add maxLength to passwordcomplexity policy #7927

Yberion opened this issue May 7, 2024 · 1 comment

Comments

@Yberion
Copy link

Yberion commented May 7, 2024

Preflight Checklist

  • I could not find a solution in the existing issues, docs, nor discussions
  • I have joined the ZITADEL chat

Describe your problem

Hello,

Checking https://zitadel.com/docs/apis/resources/user_service/user-service-set-password, we can see that there's a maxLength on the password of 200 chars.

However, there's no maxLength in the passwordcomplexity policy:

So if we want to properly create "validators" when we create our own UI for a reset password for example, we'll need to hardcode that maxLength of 200 chars if we use v2 api.

I don't know from where that limit come from, it seems not to be there for v1 api (https://zitadel.com/docs/apis/resources/auth/auth-service-update-my-password), it seems that all string fields when using new APIs are limited to 200 chars.

I did not test, but if we're allowed to set a password > 200 chars in the console, we won't be able to use the new APIs, for example change password on v2 api, because the current password will be limited to 200 chars and therefore don't match (https://zitadel.com/docs/apis/resources/user_service/user-service-set-password)

Describe your ideal solution

Add maxLength (same as minLength) for the passwordcomplexity policy as it will anyway be limited by the API.

Version

2.51.1

Environment

Self-hosted

Additional Context

No response

@livio-a
Copy link
Member

livio-a commented May 22, 2024

Since there can be further restrictions depending on the hashing algorithm, e.g. bcrypt only is able to handle 72bytes we'll close this issue in favor of: #4993

@livio-a livio-a closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants