inou/lib
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
..
._db_schema.go Initial commit from dev 2026-02-01 08:03:12 +00:00
access.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00
config.go Initial commit from dev 2026-02-01 08:03:12 +00:00
crypto.go Initial commit from dev 2026-02-01 08:03:12 +00:00
data.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_auth.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_queries.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_schema.go Initial commit from dev 2026-02-01 08:03:12 +00:00
email.go Initial commit from dev 2026-02-01 08:03:12 +00:00
errors.go Initial commit from dev 2026-02-01 08:03:12 +00:00
files.go Initial commit from dev 2026-02-01 08:03:12 +00:00
lab_reference.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
llm.go Initial commit from dev 2026-02-01 08:03:12 +00:00
migrate_category.go Initial commit from dev 2026-02-01 08:03:12 +00:00
normalize.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
parse_numeric.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
prompt.go Initial commit from dev 2026-02-01 08:03:12 +00:00
roles.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00
signal.go Initial commit from dev 2026-02-01 08:03:12 +00:00
translate.go Initial commit from dev 2026-02-01 08:03:12 +00:00
types.go Initial commit from dev 2026-02-01 08:03:12 +00:00
v2.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00