CrmHealthChecks.indicators() used a plain tokenless new QSession() when it was registered without a caller session (host startup). OAuth2 and Auth0 accept a tokenless QSystemUserSession and reject every other tokenless session, so on those hosts (kof22) each CRM check failed session validation and reported UNKNOWN.
Fix
With no caller session, each check runs as core QSystemUserSession(instance), created at check time (the instance is known then). This is the same pattern as qbit-backups#24 and qbit-object-storage#18. A monitoring session the host passes to indicators(QSession) is still used unchanged. The checks return only UP/DEGRADED, never record values.
Tests
TokenRequiredAuthenticationModule (test scope) behaves like OAuth2: it accepts the system user and sessions it issued, and throws The token is null for anything else.
CrmHealthBulkLoadTest.contextlessIndicatorsRunOnTokenRequiredHost registers the indicators with no session on a token-required host and expects UP. It fails without the fix (UNKNOWN).
./mvnw verify: 490 tests, 0 skipped; checkstyle and JaCoCo green.
## Problem
`CrmHealthChecks.indicators()` used a plain tokenless `new QSession()` when it was registered without a caller session (host startup). OAuth2 and Auth0 accept a tokenless `QSystemUserSession` and reject every other tokenless session, so on those hosts (kof22) each CRM check failed session validation and reported UNKNOWN.
## Fix
With no caller session, each check runs as core `QSystemUserSession(instance)`, created at check time (the instance is known then). This is the same pattern as qbit-backups#24 and qbit-object-storage#18. A monitoring session the host passes to `indicators(QSession)` is still used unchanged. The checks return only UP/DEGRADED, never record values.
## Tests
- `TokenRequiredAuthenticationModule` (test scope) behaves like OAuth2: it accepts the system user and sessions it issued, and throws `The token is null` for anything else.
- `CrmHealthBulkLoadTest.contextlessIndicatorsRunOnTokenRequiredHost` registers the indicators with no session on a token-required host and expects UP. It fails without the fix (UNKNOWN).
- `./mvnw verify`: 490 tests, 0 skipped; 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
CrmHealthChecks.indicators()used a plain tokenlessnew QSession()when it was registered without a caller session (host startup). OAuth2 and Auth0 accept a tokenlessQSystemUserSessionand reject every other tokenless session, so on those hosts (kof22) each CRM check failed session validation and reported UNKNOWN.Fix
With no caller session, each check runs as core
QSystemUserSession(instance), created at check time (the instance is known then). This is the same pattern as qbit-backups#24 and qbit-object-storage#18. A monitoring session the host passes toindicators(QSession)is still used unchanged. The checks return only UP/DEGRADED, never record values.Tests
TokenRequiredAuthenticationModule(test scope) behaves like OAuth2: it accepts the system user and sessions it issued, and throwsThe token is nullfor anything else.CrmHealthBulkLoadTest.contextlessIndicatorsRunOnTokenRequiredHostregisters the indicators with no session on a token-required host and expects UP. It fails without the fix (UNKNOWN)../mvnw verify: 490 tests, 0 skipped; checkstyle and JaCoCo green.🤖 Generated with Claude Code