debug: log userinfo keys and groups claim in OIDC callback
All checks were successful
Build containers when image tags change / build-if-image-changed (backend, shorefront-backend, shorefront backend, backend/Dockerfile, git.baumann.gr/adebaumann/shorefront-backend, .backend.image) (push) Successful in 45s
Build containers when image tags change / build-if-image-changed (frontend, shorefront-frontend, shorefront frontend, frontend/Dockerfile, git.baumann.gr/adebaumann/shorefront-frontend, .frontend.image) (push) Successful in 1m31s
All checks were successful
Build containers when image tags change / build-if-image-changed (backend, shorefront-backend, shorefront backend, backend/Dockerfile, git.baumann.gr/adebaumann/shorefront-backend, .backend.image) (push) Successful in 45s
Build containers when image tags change / build-if-image-changed (frontend, shorefront-frontend, shorefront frontend, frontend/Dockerfile, git.baumann.gr/adebaumann/shorefront-frontend, .frontend.image) (push) Successful in 1m31s
This commit is contained in:
@@ -25,6 +25,12 @@ async def oidc_callback(request: Request, db: Session = Depends(get_db)) -> Redi
|
||||
|
||||
userinfo = token.get("userinfo") or {}
|
||||
groups = userinfo.get("groups", [])
|
||||
import logging as _logging
|
||||
_logging.getLogger("shorefront.auth").warning(
|
||||
"OIDC callback — userinfo keys: %s | groups claim: %r",
|
||||
list(userinfo.keys()),
|
||||
groups,
|
||||
)
|
||||
if FIREWALL_ADMINS_GROUP not in groups:
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Not in firewall admins group")
|
||||
|
||||
|
||||
@@ -42,4 +42,4 @@ keycloak:
|
||||
redirectUri: https://shorefront.baumann.gr/api/auth/oidc/callback
|
||||
|
||||
containers:
|
||||
version: "0.005"
|
||||
version: "0.006"
|
||||
|
||||
Reference in New Issue
Block a user