Ravinou / borgwarehouse

A fast and modern WebUI for a BorgBackup's central repository server.
https://borgwarehouse.com
GNU Affero General Public License v3.0
362 stars 21 forks source link

OIDC / OAuth Support #183

Open speatzle opened 6 months ago

speatzle commented 6 months ago

Hi, i recently found BorgWarehouse and have been liking it so far.

I run BorgWarehouse behind Caddy as my Reverse Proxy and am using Authelia for Central User management and Reducing the Attack Surface (only Users logged into Authelia can send HTTP(s) Requests to BorgWarehouse and my other services preventing scanning and potential exploitation).

The only Problem i have is that this means i have to log in twice (once into Authelia and once into BorgWarehouse).

With other services i host i can use OIDC (OAuth) to Login using Authelia's session automatically or by pressing a Dedicated Button on the Login Page.

Alternatively Authelia also Supports Trusted Header SSO where the Service gets HTTP headers from the Proxy containing the Username and Group of the Currently logged in user (in Authelia) completely eliminating the necessity for session management by the Service, here is a introduction: https://www.authelia.com/integration/trusted-header-sso/introduction/

It would be much appreciated if you could support either of these options.

rpirsc13 commented 5 months ago

I don't believe that Next-Auth has support built for Authelia but a custom OIDC config can easily be made following the guide at https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider

Menschomat commented 1 week ago

This would be really cool.