You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BYOC connector: Windows service never rotates its token #2366
The BYOC connector in #2300 rotates its token only when run_loop gets a token persister. The CLI daemon passes persist_token and persist_pending (packages/flow/openadapt_flow/connector/cli.py). The Windows service does not: windows_service.serve calls run_loop(client, settings, runner=runner, log=logger.info) with no persister, so a connector that runs as a Windows service never rotates its token, even when the control plane recommends it.
Expected: serve builds the same persisters as the CLI, writing to config_file(config_dir) with the same 0600 permissions, finishes any pending_token at startup, and passes persist_token and persist_pending to run_loop. The rotated token is added to the redactor.
Tests: a service test that drives a rotation recommendation through serve and checks that the new token is persisted before use and that the old token is redacted from logs.
Found in review of #2300 (follow-up, not a blocker for that PR).
The implementation for this finding is #2356, stacked on #2300. The virtual service account has read-only access to the administrator’s connector policy. The fix keeps pending and committed credentials in Windows Credential Manager and preserves the configuration file and its ACL. It resumes an interrupted rotation before polling again.
At 4b5abe1434639ba1e4c2f124f9695b5ea6ea2fd9, the service passed rotation and restart under its real Windows virtual account with a synthetic enrollment. Two portable regressions cover a transient confirmation failure and an edit to the file’s pending field. The next step is to retarget #2356 to main after #2300 lands. Windows job · Grok approval
Resolved on main in PR #2356 (266284aa7), which persists pending and committed rotated connector tokens in Windows Credential Manager and resumes interrupted rotation on startup in packages/flow/openadapt_flow/connector/windows_service.py.
Activity
abrichr commentedon Nov 21, 2026
The implementation for this finding is #2356, stacked on #2300. The virtual service account has read-only access to the administrator’s connector policy. The fix keeps pending and committed credentials in Windows Credential Manager and preserves the configuration file and its ACL. It resumes an interrupted rotation before polling again.
At
4b5abe1434639ba1e4c2f124f9695b5ea6ea2fd9, the service passed rotation and restart under its real Windows virtual account with a synthetic enrollment. Two portable regressions cover a transient confirmation failure and an edit to the file’s pending field. The next step is to retarget #2356 to main after #2300 lands. Windows job · Grok approvalabrichr commentedon Nov 25, 2026
Resolved on
mainin PR #2356 (266284aa7), which persists pending and committed rotated connector tokens in Windows Credential Manager and resumes interrupted rotation on startup inpackages/flow/openadapt_flow/connector/windows_service.py.