inou/api
James 45a6445c3b security: replace empty string bypass with explicit system accessor ID
Changed from empty accessorID bypassing checks to explicit SystemAccessorID
for better security and audit trail.

Before: accessorID == "" → bypass all checks (security risk)
After: accessorID == "system-internal" → bypass (explicit, auditable)

Changes:
- Added SystemAccessorID constant = "system-internal"
- Updated SystemContext to use SystemAccessorID
- Updated checkAccess() to check for specific ID
- Updated accessorIDFromContext() to return SystemAccessorID
- Updated all EntryList calls to use SystemAccessorID
- Updated auth.go helpers to use SystemAccessorID

Benefits:
- Explicit backdoor ID visible in audit logs
- No accidental bypass from empty strings
- Clear intent for system operations
- Can't collide with real hex dossier IDs (uses "system" prefix)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 17:20:24 -05:00
..
prompts Initial commit 2026-02-01 02:43:27 -05:00
Sora-Regular.ttf Initial commit 2026-02-01 02:43:27 -05:00
Sora-SemiBold.ttf Initial commit 2026-02-01 02:43:27 -05:00
api Initial commit 2026-02-01 02:43:27 -05:00
api_access.go Initial commit 2026-02-01 02:43:27 -05:00
api_audit.go Initial commit 2026-02-01 02:43:27 -05:00
api_categories.go refactor: simplify RBAC to use accessorID string parameter 2026-02-07 17:15:09 -05:00
api_contact_sheet.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
api_dossier.go Initial commit 2026-02-01 02:43:27 -05:00
api_dossiers.go Initial commit 2026-02-01 02:43:27 -05:00
api_entries.go Initial commit 2026-02-01 02:43:27 -05:00
api_genome.go refactor: enforce RBAC only in lib layer 2026-02-07 17:05:05 -05:00
api_image.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
api_labs.go Initial commit 2026-02-01 02:43:27 -05:00
api_llm.go Initial commit 2026-02-01 02:43:27 -05:00
api_mcp_audit.go Initial commit 2026-02-01 02:43:27 -05:00
api_prompts.go Initial commit 2026-02-01 02:43:27 -05:00
api_series.go Initial commit 2026-02-01 02:43:27 -05:00
api_slices.go Initial commit 2026-02-01 02:43:27 -05:00
api_studies.go Initial commit 2026-02-01 02:43:27 -05:00
api_v1.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00
api_version.go Initial commit 2026-02-01 02:43:27 -05:00
auth.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00
llm_types.go Initial commit 2026-02-01 02:43:27 -05:00
main.go Initial commit 2026-02-01 02:43:27 -05:00