WormAuditQBitProducer.produce() set QContext to a plain new QSession() around addProcesses, which reads worm_audit_settings for the startup schedules. Token-based default authentication (OAuth2, Auth0) accepts a QSystemUserSession without a token and rejects every other tokenless session, so on kof22 (OAuth2) the read failed with JWTDecodeException: The token is null and startup crashed (0.1.96). kof22 carries a stand-in (Website-Backend#243) that switches default auth to anonymous during produce(); this removes the need for it.
Fix
Run the startup read as core QSystemUserSession(qInstance), the same pattern as qbit-object-storage#18 and qbit-backups#24.
Why not defer the read to first use: the settings row's chain_interval_seconds, export_cron and verify_cron drive the schedule metadata, and the README, DESIGN and table help document that edits to them take effect after restart. Deferring would silently drop that contract (schedules would only ever use config values). Reading as the system user keeps it.
Tests
TokenRequiredAuthenticationModule (test scope): accepts QSystemUserSession and issued sessions, throws The token is null for any other session, like the OAuth2 module.
TokenRequiredHostTest: production on a token-required host succeeds, honors a persisted edited settings row (chain interval, verify and export crons) and falls back to config without a row. All three fail without the fix (IllegalState Cannot read WORM Audit Settings caused by The token is null).
## Problem
`WormAuditQBitProducer.produce()` set `QContext` to a plain `new QSession()` around `addProcesses`, which reads `worm_audit_settings` for the startup schedules. Token-based default authentication (OAuth2, Auth0) accepts a `QSystemUserSession` without a token and rejects every other tokenless session, so on kof22 (OAuth2) the read failed with `JWTDecodeException: The token is null` and startup crashed (0.1.96). kof22 carries a stand-in (Website-Backend#243) that switches default auth to anonymous during `produce()`; this removes the need for it.
## Fix
Run the startup read as core `QSystemUserSession(qInstance)`, the same pattern as qbit-object-storage#18 and qbit-backups#24.
Why not defer the read to first use: the settings row's `chain_interval_seconds`, `export_cron` and `verify_cron` drive the schedule metadata, and the README, DESIGN and table help document that edits to them take effect after restart. Deferring would silently drop that contract (schedules would only ever use config values). Reading as the system user keeps it.
## Tests
- `TokenRequiredAuthenticationModule` (test scope): accepts `QSystemUserSession` and issued sessions, throws `The token is null` for any other session, like the OAuth2 module.
- `TokenRequiredHostTest`: production on a token-required host succeeds, honors a persisted edited settings row (chain interval, verify and export crons) and falls back to config without a row. All three fail without the fix (`IllegalState Cannot read WORM Audit Settings` caused by `The token is null`).
- `./mvnw verify`: 98 tests, 0 skipped (PostgreSQL Testcontainers ran), checkstyle and JaCoCo green.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
WormAuditQBitProducer.produce()setQContextto a plainnew QSession()aroundaddProcesses, which readsworm_audit_settingsfor the startup schedules. Token-based default authentication (OAuth2, Auth0) accepts aQSystemUserSessionwithout a token and rejects every other tokenless session, so on kof22 (OAuth2) the read failed withJWTDecodeException: The token is nulland startup crashed (0.1.96). kof22 carries a stand-in (Website-Backend#243) that switches default auth to anonymous duringproduce(); this removes the need for it.Fix
Run the startup read as core
QSystemUserSession(qInstance), the same pattern as qbit-object-storage#18 and qbit-backups#24.Why not defer the read to first use: the settings row's
chain_interval_seconds,export_cronandverify_crondrive the schedule metadata, and the README, DESIGN and table help document that edits to them take effect after restart. Deferring would silently drop that contract (schedules would only ever use config values). Reading as the system user keeps it.Tests
TokenRequiredAuthenticationModule(test scope): acceptsQSystemUserSessionand issued sessions, throwsThe token is nullfor any other session, like the OAuth2 module.TokenRequiredHostTest: production on a token-required host succeeds, honors a persisted edited settings row (chain interval, verify and export crons) and falls back to config without a row. All three fail without the fix (IllegalState Cannot read WORM Audit Settingscaused byThe token is null)../mvnw verify: 98 tests, 0 skipped (PostgreSQL Testcontainers ran), checkstyle and JaCoCo green.🤖 Generated with Claude Code