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

OIDC login via Authelia fails: "The state is missing or does not have enough characters and is therefore considered too weak." #2138

Closed
ginkel opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels
needs-investigation Potential bug. Needs investigation

Comments

@ginkel
Copy link

ginkel commented Nov 4, 2024

Version:

  • listmonk: v4.0.1
  • OS: Docker on Ubuntu 22.04

Description of the bug and steps to reproduce:
Hi there,

I tried to integrate v4.0.1 with our OIDC IdP: Authelia. Unfortunately, the login fails with the following error:

The state is missing or does not have enough characters and is therefore considered too weak. Request parameter "state" must be at least be 8 characters long to ensure sufficient entropy.

In the Developer Tool's Network tab I can see the following choreography:

https://listmonk.<domain>/auth/oidc
https://sso.<domain>/api/oidc/authorization?client_id=listmonk&nonce=2xk25q4uKTY*****&redirect_uri=https%3A%2F%2Flistmonk.<domain>%2Fauth%2Foidc&response_type=code&scope=openid+profile+email&state=%2Fadmin
https://listmonk.<domain>/auth/oidc?error=invalid_state&error_description=The+state+is+missing+or+does+not+have+enough+characters+and+is+therefore+considered+too+weak.+Request+parameter+%27state%27+must+be+at+least+be+8+characters+long+to+ensure+sufficient+entropy.&iss=https%3A%2F%2Fsso.<domain>&state=%2Fadmin

Any ideas?

Thanks,
Thilo

Edit: Some googling later it seems that seeding the state parameter with a secure random is considered a best-practice.

@knadh knadh self-assigned this Nov 4, 2024
@knadh knadh added the needs-investigation Potential bug. Needs investigation label Nov 4, 2024
@knadh knadh closed this as completed in abe09d6 Nov 10, 2024
@kosssi
Copy link
Contributor

kosssi commented Nov 12, 2024

I have the same error, thanks @knadh to have already corrected it 👏 (how can I test it? Do you release 4.1.0 soon as?). When is it release I post the configuration on Authelia website ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation Potential bug. Needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants