Part of the service-identity work, QRun-IO/qqq#1248 (approved, D1–D6). Draft: it needs the QQQ release that contains qqq#1255 and #1256. When the release captain cuts that RC, bump qqq.snapshot.version to it and mark this ready.
Change
AuthentikMaintenance.applyPolicy no longer builds the self-made MaintenanceSession, which granted itself policies.manage plus the document's grants. Under OAuth2 that session was rejected, so the kof22 identityAdminsFullAccess run-once failed at its audit insert.
It now runs as the host's declared maintenance service principal (AuthentikQBitConfig.maintenancePrincipal, default maintenance). Under OAuth2 that means a real client_credentials token for its Authentik service account, so the account's group policy decides what it may do. The subset rule, protection, readOnly, feature, stale and two-person checks are unchanged.
Audit: the operator is service:maintenance. The job name (run-once:…) prefixes the reason in the admin-action row and the Authentik event.
AuthentikAdmin.operator() never resolves a service principal as an Authentik user by email.
Tests:
AuthentikMaintenanceTest: 11, against a local install of qqq#1256.
New test: an undeclared principal, or one without the grants, writes nothing.
Part of the service-identity work, QRun-IO/qqq#1248 (approved, D1–D6). **Draft:** it needs the QQQ release that contains qqq#1255 and #1256. When the release captain cuts that RC, bump `qqq.snapshot.version` to it and mark this ready.
**Change**
- `AuthentikMaintenance.applyPolicy` no longer builds the self-made `MaintenanceSession`, which granted itself `policies.manage` plus the document's grants. Under OAuth2 that session was rejected, so the kof22 `identityAdminsFullAccess` run-once failed at its audit insert.
- It now runs as the host's declared **maintenance** service principal (`AuthentikQBitConfig.maintenancePrincipal`, default `maintenance`). Under OAuth2 that means a real client_credentials token for its Authentik service account, so the account's group policy decides what it may do. The subset rule, protection, readOnly, feature, stale and two-person checks are unchanged.
- **Audit:** the operator is `service:maintenance`. The job name (`run-once:…`) prefixes the reason in the admin-action row and the Authentik event.
- `AuthentikAdmin.operator()` never resolves a service principal as an Authentik user by email.
**Tests:**
- `AuthentikMaintenanceTest`: 11, against a local install of qqq#1256.
- New test: an undeclared principal, or one without the grants, writes nothing.
- Full suite: 318, 0 failures.
🤖 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.
Part of the service-identity work, QRun-IO/qqq#1248 (approved, D1–D6). Draft: it needs the QQQ release that contains qqq#1255 and #1256. When the release captain cuts that RC, bump
qqq.snapshot.versionto it and mark this ready.Change
AuthentikMaintenance.applyPolicyno longer builds the self-madeMaintenanceSession, which granted itselfpolicies.manageplus the document's grants. Under OAuth2 that session was rejected, so the kof22identityAdminsFullAccessrun-once failed at its audit insert.AuthentikQBitConfig.maintenancePrincipal, defaultmaintenance). Under OAuth2 that means a real client_credentials token for its Authentik service account, so the account's group policy decides what it may do. The subset rule, protection, readOnly, feature, stale and two-person checks are unchanged.service:maintenance. The job name (run-once:…) prefixes the reason in the admin-action row and the Authentik event.AuthentikAdmin.operator()never resolves a service principal as an Authentik user by email.Tests:
AuthentikMaintenanceTest: 11, against a local install of qqq#1256.🤖 Generated with Claude Code