Skip to content

fix: secure agent setup origins and key replacement - #46

Merged
sonpiaz merged 4 commits into
mainfrom
fix/agent-setup-recovery-notes
Oct 18, 2026
Merged

sonpiaz merged 4 commits into
mainfrom
fix/agent-setup-recovery-notes

Conversation

@sonpiaz

@sonpiaz sonpiaz commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Agent setup now refuses to send a signed-in user JWT outside https://api.affitor.com. Local development requires AFFITOR_AGENT_DEV_API_ORIGIN to match the exact loopback origin, including port. Rejected origins fail before HTTP or agent-file writes.

When a selected saved key is active but its hint no longer matches, the preview explains replacement and revocation before consent. Approved setup saves new credentials first, then revokes only the previous selected ids. Mint or local-write failure preserves old keys and compensates newly minted keys. Failed old-key revocation preserves the installed replacement and reports the old ids for dashboard cleanup, without claiming rollback.

The README also documents interrupted-setup recovery and Windows ACL limits.

Validation: 344 workspace tests passed (25 recipes, 299 CLI, 20 MCP); six real-Windows-only smoke cases run in CI. Workspace build, TypeScript lint, and diff checks passed. Includes real built-CLI consent/dry-run, replacement/revocation failure, JWT-origin rejection, request ordering, and credential-output regressions.

Release: stacked on #45; CMS #553/#561 must be live and the manager must authorize release. No version bump or publish. Abrupt interruption can still leave unused credentials requiring dashboard cleanup; no crash recovery transaction or Windows ACL proof is claimed.

@sonpiaz sonpiaz changed the title fix: document interrupted agent setup and Windows folder privacy fix: restrict agent setup JWT origins and document recovery Oct 18, 2026
@sonpiaz sonpiaz changed the title fix: restrict agent setup JWT origins and document recovery fix: secure agent setup origins and key replacement Oct 18, 2026
@sonpiaz
sonpiaz changed the base branch from feat/agent-setup-client to main October 18, 2026 20:25
@sonpiaz
sonpiaz merged commit 90285aa into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant