Provide user info in Remote-* headers. Caddy configuration improved.

This commit is contained in:
Leo Vasanko
2025-09-25 18:12:40 -06:00
parent b0a1bb72dc
commit e514ae010d
9 changed files with 109 additions and 51 deletions

17
caddy/auth/require Normal file
View File

@@ -0,0 +1,17 @@
# Permission to use within your endpoints that need authentication/authorization, that
# is different depending on the route (otherwise use auth/all).
forward_auth {$AUTH_UPSTREAM:localhost:4401} {
uri /auth/api/forward?{args[0]}
copy_headers {
Remote-User
Remote-Name
Remote-Groups
Remote-Org
Remote-Org-Name
Remote-Role
Remote-Role-Name
Remote-Session-Expires
Remote-Session-Type
Remote-Credential
}
}