fix(startup): read startup settings as the system user, not a tokenless session #13

Merged
KofTwentyTwo merged 1 commits from feature/no-tokenless-session-at-produce into develop 2026-10-14 23:18:22 +00:00
1 Commits
Author SHA1 Message Date
james.maesandClaude Opus 5.5 6c3acb7e53 fix(startup): read startup settings as the system user, not a tokenless session
produce() switched QContext to a plain new QSession() around addProcesses,
which reads worm_audit_settings for the startup schedules. Token-based
default authentication (OAuth2, Auth0) rejects any tokenless session that
is not a QSystemUserSession, so on kof22 the read failed with
JWTDecodeException: The token is null and the host could not start.

Run the startup read as core QSystemUserSession(qInstance), the same
pattern as qbit-object-storage#18. The persisted schedule settings still
take effect at restart, as documented.

TokenRequiredHostTest builds the host with a test authentication module
that rejects tokenless sessions; it fails without this fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:14:50 -05:00