Caddy配置CloudBeaver使用Authelia认证

Cloudbeaver反向代理认证配置文档:https://github.com/dbeaver/cloudbeaver/wiki/Reverse-proxy-header-authentication

每个地方单独设置账号就太麻烦了,这里记录Caddy配置Cloudbeaver使用Authelia认证的方式。重点其实就是传递到后端时添加X-User和X-Team两个请求头,caddy推荐的authelia配置使用的是Remote-User和Remote-Groups。

forward_auth authelia:9091 {
    uri /api/authz/forward-auth
    
    ## The following commented line is for configuring the Authelia URL in the proxy. We strongly suggest
    ## this is configured in the Session Cookies section of the Authelia configuration.
    # uri /api/authz/forward-auth?authelia_url=https://auth.example.com/
    copy_headers {
        # Remote-User Remote-Groups Remote-Email Remote-Name
        Remote-User>X-User
        Remote-Groups>X-Team
    }
}
forward_auth authelia:9091 {
    uri /api/authz/forward-auth
    
    ## The following commented line is for configuring the Authelia URL in the proxy. We strongly suggest
    ## this is configured in the Session Cookies section of the Authelia configuration.
    # uri /api/authz/forward-auth?authelia_url=https://auth.example.com/
    copy_headers {
        # Remote-User Remote-Groups Remote-Email Remote-Name
        Remote-User>X-User
        Remote-Groups>X-Team
    }
}

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注