Skip to content

OIDC error with Authelia #1619

@Helvio88

Description

@Helvio88

I tried setting up OIDC with Authelia (it works on some other applications). Receiving this error in Docker logs:

today at 11:22:01 AM2022.07.01 15:22:01:0000 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 GET /api/v1/open/auth/openid/authelia
today at 11:22:01 AM2022.07.01 15:22:01:0001 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 302 Found
today at 11:22:01 AM2022.07.01 15:22:01:0000 [io-comp...] [INFO ] docspell.oidc.CodeFlowRoutes.userInfo:70 - Resume OAuth/OIDC flow for authelia
today at 11:22:01 AM2022.07.01 15:22:01:0001 [io-comp...] [WARN ] docspell.oidc.CodeFlowRoutes.applyOrElse:95 - Error resuming code flow from 'authelia': invalid_state (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.)
today at 11:22:01 AM2022.07.01 15:22:01:0002 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 GET /api/v1/open/auth/openid/authelia/resume?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.&state=
today at 11:22:01 AM2022.07.01 15:22:01:0003 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 307 Temporary Redirect
today at 11:22:01 AM2022.07.01 15:22:01:0002 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 GET /app/login?openid=1
today at 11:22:01 AM2022.07.01 15:22:01:0003 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 200 OK

My OpenID settings in docspell.conf:

{
        enabled = true,
        display = "Authelia"
        provider = {
            provider-id = "authelia",
            client-id = "docspell",
            client-secret = "<REDACTED>",
            scope = "profile openid email groups",
            authorize-url = "https://<REDACTED>/api/oidc/authorization",
            token-url = "https://<REDACTED>/api/oidc/token",
            user-url = "https://<REDACTED>/api/oidc/userinfo",
            sign-key = ""
            sig-algo = "RS256"
        },
        collective-key = "fixed:<REDACTED>",
        user-key = "preferred_username"
      }

Any ideas?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or in unexpected waysrestserverAffects the rest server.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions