feat(client): add API key authentication for /authz endpoint #294

Merged
argoyle merged 2 commits from fix/authz-endpoint-auth into main 2026-03-12 07:32:13 +00:00

2 Commits

Author SHA1 Message Date
argoyle e24a339046 fix(client): resolve race condition in Process event handler
authz_client / vulnerabilities (pull_request) Successful in 1m38s
authz_client / test (pull_request) Successful in 1m50s
pre-commit / pre-commit (pull_request) Successful in 5m11s
Move lock acquisition to the top of Process() instead of per-case.
Previously UserAdded and UserRemoved read the privileges map without
holding any lock, causing data races with concurrent Fetch/IsAllowed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:26:10 +01:00
argoyle 9cdb09add4 feat(client): add API key authentication for /authz endpoint
authz_client / test (pull_request) Successful in 1m50s
authz_client / vulnerabilities (pull_request) Successful in 1m57s
pre-commit / pre-commit (pull_request) Successful in 5m30s
Add WithAPIKey option to set a Bearer token on requests to the
authz-service /authz endpoint. When set, Fetch() includes an
Authorization header. Backward compatible - no key means no header.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:23:38 +01:00