mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-10 17:47:13 +00:00
a94b743d6c
User API tokens allow OIDC users to authenticate via bearer token for automation and scripting. Powerusers and admins can create their own tokens; admins can create tokens for operators. Tokens use SHA-256 hashing, optional max_role caps, optional expiry, and full audit logging of create/revoke operations with client IPs. - DB schema: user_api_tokens and token_audit_log tables - Auth middleware: validates user tokens as fallback after admin keys - API: 7 new endpoints (self-service + admin token management) - UI: tokens.html (self-service) + admin.html token/audit sections - Nav: Tokens link added to all pages (visible for operator+) - Docs: API reference, security model, roles/access control updated - Background cleanup: expired tokens + 90-day audit log retention Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>