Skip to content

'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured #8981

@christaikobo

Description

@christaikobo

Version

v4.39.0

Deployment Method

Docker

Reverse Proxy

Caddy

Reverse Proxy Version

2.8.0

Description

It seems that the authn_strategies scheme has to be 'basic' instead of 'Basic'.

Reproduction

Run authelia using the configuration listed below.

Expectations

Authelia is able to start.

Configuration (Authelia)

server:
  address: 'tcp://:9091/auth'
  # disable_healthcheck: false
  endpoints:
    authz:
      forward-auth:
        implementation: 'ForwardAuth'
        authn_strategies:
          - name: 'CookieSession'
      basic-auth:
        implementation: 'ForwardAuth'
        authn_strategies:
          - name: 'HeaderAuthorization'
            schemes:
              - 'Basic'
            scheme_basic_cache_lifespan: 1h

Build Information

Last Tag: v4.39.0
State: tagged clean
Branch: v4.39.0
Commit: bbfa41712ce1b3e39b4798b18bd5f78e68470720
Build Number: 41111
Build OS: linux
Build Arch: amd64
Build Compiler: gc
Build Date: Sun, 16 Mar 2025 21:05:57 +1100
Extra:

Go:
    Version: go1.24.1
    Module Path: github.com/authelia/authelia/v4
    Executable Path: github.com/authelia/authelia/v4/cmd/authelia

Logs (Authelia)

time="2025-03-16T14:29:54-07:00" level=error msg="Configuration: server: endpoints: authz: basic-auth: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured"
time="2025-03-16T14:29:54-07:00" level=fatal msg="Can't continue due to the errors loading the configuration" stack="github.com/authelia/authelia/v4/internal/commands/context.go:157 NewRootCmd.(*CmdCtx).ChainRunE.func1\ngithub.com/spf13/cobra@v1.9.1/command.go:1000                    (*Command).execute\ngithub.com/spf13/cobra@v1.9.1/command.go:1148                    (*Command).ExecuteC\ngithub.com/spf13/cobra@v1.9.1/command.go:1071                    (*Command).Execute\ngithub.com/authelia/authelia/v4/cmd/authelia/main.go:10          main\ninternal/runtime/atomic/types.go:194                             (*Uint32).Load\nruntime/asm_amd64.s:1700                                         goexit"
time="2025-03-16T14:29:54-07:00" level=error msg="Configuration: server: endpoints: authz: basic-auth: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured"
time="2025-03-16T14:29:54-07:00" level=fatal msg="Can't continue due to the errors loading the configuration" stack="github.com/authelia/authelia/v4/internal/commands/context.go:157 NewRootCmd.(*CmdCtx).ChainRunE.func1\ngithub.com/spf13/cobra@v1.9.1/command.go:1000                    (*Command).execute\ngithub.com/spf13/cobra@v1.9.1/command.go:1148                    (*Command).ExecuteC\ngithub.com/spf13/cobra@v1.9.1/command.go:1071                    (*Command).Execute\ngithub.com/authelia/authelia/v4/cmd/authelia/main.go:10          main\ninternal/runtime/atomic/types.go:194                             (*Uint32).Load\nruntime/asm_amd64.s:1700                                         goexit"
time="2025-03-16T14:29:55-07:00" level=error msg="Configuration: server: endpoints: authz: basic-auth: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured"
time="2025-03-16T14:29:55-07:00" level=fatal msg="Can't continue due to the errors loading the configuration" stack="github.com/authelia/authelia/v4/internal/commands/context.go:157 NewRootCmd.(*CmdCtx).ChainRunE.func1\ngithub.com/spf13/cobra@v1.9.1/command.go:1000                    (*Command).execute\ngithub.com/spf13/cobra@v1.9.1/command.go:1148                    (*Command).ExecuteC\ngithub.com/spf13/cobra@v1.9.1/command.go:1071                    (*Command).Execute\ngithub.com/authelia/authelia/v4/cmd/authelia/main.go:10          main\ninternal/runtime/atomic/types.go:194                             (*Uint32).Load\nruntime/asm_amd64.s:1700                                         goexit"
time="2025-03-16T14:29:55-07:00" level=error msg="Configuration: server: endpoints: authz: basic-auth: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured"
time="2025-03-16T14:29:55-07:00" level=fatal msg="Can't continue due to the errors loading the configuration" stack="github.com/authelia/authelia/v4/internal/commands/context.go:157 NewRootCmd.(*CmdCtx).ChainRunE.func1\ngithub.com/spf13/cobra@v1.9.1/command.go:1000                    (*Command).execute\ngithub.com/spf13/cobra@v1.9.1/command.go:1148                    (*Command).ExecuteC\ngithub.com/spf13/cobra@v1.9.1/command.go:1071                    (*Command).Execute\ngithub.com/authelia/authelia/v4/cmd/authelia/main.go:10          main\ninternal/runtime/atomic/types.go:194                             (*Uint32).Load\nruntime/asm_amd64.s:1700                                         goexit"
time="2025-03-16T14:29:56-07:00" level=error msg="Configuration: server: endpoints: authz: basic-auth: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'Basic' schemes are configured"
time="2025-03-16T14:29:56-07:00" level=fatal msg="Can't continue due to the errors loading the configuration" stack="github.com/authelia/authelia/v4/internal/commands/context.go:157 NewRootCmd.(*CmdCtx).ChainRunE.func1\ngithub.com/spf13/cobra@v1.9.1/command.go:1000                    (*Command).execute\ngithub.com/spf13/cobra@v1.9.1/command.go:1148                    (*Command).ExecuteC\ngithub.com/spf13/cobra@v1.9.1/command.go:1071                    (*Command).Execute\ngithub.com/authelia/authelia/v4/cmd/authelia/main.go:10          main\ninternal/runtime/atomic/types.go:194                             (*Uint32).Load\nruntime/asm_amd64.s:1700                                         goexit"

Logs (Proxy / Application)

There is no related proxy logs because authelia simply refuse to start.

Documentation

No response

Generative AI

No

Pre-Submission Checklist

  • I agree to follow the Code of Conduct

  • This is a bug report and not a support request

  • I have read the security policy and this bug report is not a security issue or security related issue

  • I have either included the complete configuration file or I am sure it's unrelated to the configuration

  • I have either included the complete debug / trace logs or the output of the build-info command if the logs are not relevant

  • I have provided all of the required information in full with the only alteration being reasonable sanitization in accordance with the Troubleshooting Sanitization reference guide

  • I have checked for related proxy or application logs and included them if available

  • I have checked for related issues and checked the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/4/normalNormal priority itemsstatus/resolvedIssue is resolved either by user action or a fixtype/bugConfirmed Bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions