You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #743 / #745, which made error messages value-free and moved rejected values to DEBUG. The PR listed log lines that still write values of clients at INFO; this issue covers three of them, for log hygiene and privacy:
Request traffic log (foca.utils.logging.log_traffic): logs the full request line, including the concrete path with its path parameters, e.g., Incoming request: "PUT /api/tasks/1/permissions/users/<subject> HTTP/1.1". Log the route template instead (e.g., /ga4gh/tes/v1/tasks/{id}), and the concrete path at DEBUG only.
Access denials (foca/security/access_control/enforcement.py): Access denied: <method> <path> to '<subject>' logs the path at the configured level. Log the route template instead, at the same level, and the concrete path at DEBUG only.
Request validation (foca/errors/exceptions.py): when no invalid fields are listed, the validation handler logs the validator's reason at INFO. Keep a value-free INFO line (e.g., the mapped detail or the title) and log the reason at DEBUG.
If no route template is known (e.g., no operation serves the request), log a fixed placeholder instead of the path.
Unchanged on purpose: audit logs of grants and resource changes, which name subjects, roles and resources that FOCA has validated.
Docs: logging, access control and exceptions configuration pages, migration guide and release notes for 0.22.0.
Activity
Merge origin/dev into fix/log-route-templates