Add support for perm=foo+bar to specify multiple scopes that are required. Multiple perm args are acceptable too. Pretty logging of permission denied errors.

This commit is contained in:
Leo Vasanko
2026-01-29 21:11:29 +00:00
parent ac85379779
commit 8749067da7
3 changed files with 38 additions and 10 deletions
+5 -2
View File
@@ -78,7 +78,7 @@ async def validate_token(
try:
ctx = await authz.verify(
auth,
perm,
" ".join(perm).split(),
host=request.headers.get("host"),
max_age=max_age,
)
@@ -131,7 +131,10 @@ async def forward_authentication(
"""
try:
ctx = await authz.verify(
auth, perm, host=request.headers.get("host"), max_age=max_age
auth,
" ".join(perm).split(),
host=request.headers.get("host"),
max_age=max_age,
)
# Build permission scopes for Remote-Groups header
role_permissions = (