Skip to content

fix: harden auth recovery and request context - #36

Draft
leoafarias wants to merge 4 commits into
agent/rockets-server-compositionfrom
agent/rockets-auth-hardening
Draft

fix: harden auth recovery and request context#36
leoafarias wants to merge 4 commits into
agent/rockets-server-compositionfrom
agent/rockets-auth-hardening

Conversation

@leoafarias

Copy link
Copy Markdown
Member

Summary

Harden authentication recovery and make request context explicit across every local auth CQRS and repository hop. This removes security-sensitive logging and sequencing gaps while tightening the supported controller surface.

Stacked on #34; review this PR against agent/rockets-server-composition.

Changes

  • Provide the Rockets recovery workflow under the upstream public RecoveryService token.
  • Make recovery initiation enumeration-safe, validate passcodes through POST /recovery/passcode, and remove secrets and stacks from logs.
  • Require an explicit false password-history result before credential writes; finish reset and OTP clearing transactionally before best-effort notification.
  • Propagate canonical AppContextHost context through auth commands, queries, ports, guards, invitations, listeners, and repository access.
  • Remove unsupported controller-extra and OAuth surfaces, make user metadata optional, and preserve consumer provider overrides.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Dependency update

Verification

  • Build succeeds (corepack yarn build)
  • Focused unit tests pass (49 files / 485 tests)
  • Focused E2E tests pass (13 files / 69 tests)
  • Lint passes (yarn lint)

Checklist

  • My code follows the existing patterns in the codebase
  • I have updated relevant documentation
  • I have added tests for new functionality

Compatibility

  • Recovery passcode validation is now POST /recovery/passcode with { passcode }; the former GET route is removed.
  • Local auth CQRS messages and ports take the canonical app context explicitly.
  • Placeholder Swagger generator and unsupported controller-extra contracts are removed.

@leoafarias
leoafarias force-pushed the agent/rockets-auth-hardening branch from a080064 to f2f18fc Compare August 8, 2026 23:56
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