security: restrict state database filesystem permissions #359

Closed
opened 2026-07-16 21:03:42 +02:00 by dries · 0 comments
Owner

What to build

Protect ocman state and authentication secrets from other local accounts by enforcing owner-only permissions on the state directory, SQLite database, and related journal files. Existing installations must be repaired safely at startup.

Acceptance criteria

  • New state directories are owner-accessible only.
  • New state database and SQLite sidecar files are not readable by group or other users.
  • Startup repairs overly permissive existing state paths without data loss.
  • Permission failures return actionable errors rather than silently continuing insecurely.
  • Tests verify creation and repair modes while remaining portable across supported systems.
  • Authentication, remote identity, migrations, and normal database operation continue to work.

Blocked by

None - can start immediately.

## What to build Protect ocman state and authentication secrets from other local accounts by enforcing owner-only permissions on the state directory, SQLite database, and related journal files. Existing installations must be repaired safely at startup. ## Acceptance criteria - [ ] New state directories are owner-accessible only. - [ ] New state database and SQLite sidecar files are not readable by group or other users. - [ ] Startup repairs overly permissive existing state paths without data loss. - [ ] Permission failures return actionable errors rather than silently continuing insecurely. - [ ] Tests verify creation and repair modes while remaining portable across supported systems. - [ ] Authentication, remote identity, migrations, and normal database operation continue to work. ## Blocked by None - can start immediately.
dries closed this issue 2026-07-17 13:17:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#359
No description provided.