Skip to content

feat(db): add durable identity binding lifecycle - #4772

Draft
cea-block wants to merge 5 commits into
cea/authorization-providerfrom
cea/identity-binding-lifecycle
Draft

feat(db): add durable identity binding lifecycle#4772
cea-block wants to merge 5 commits into
cea/authorization-providerfrom
cea/identity-binding-lifecycle

Conversation

@cea-block

Copy link
Copy Markdown

Why

Identity bindings need durable migration state and serialized lifecycle transitions so authorization remains fail closed during enrollment, rotation, revocation, restart, and ambiguous legacy state.

What

  • Project existing binding history into additive lifecycle tables without rewriting published migrations.
  • Serialize enrollment, rotation, revocation, recovery, and archival transitions while preserving authoritative tombstones.
  • Reject ambiguous, unreadable, stale, revoked, or cross-principal state across database and relay authorization paths.
  • Add deterministic concurrency, restart, and migration regression coverage.

Risk Assessment

Medium. This adds a database migration and changes authorization paths. The migration is additive, ambiguous state fails closed, and deterministic tests cover rollback and restart boundaries.

Testing

  • cargo test -p buzz-db identity_binding -- --ignored --test-threads=1 — 22 passed
  • cargo test -p buzz-db identity_lifecycle -- --ignored --test-threads=1 — 17 passed
  • cargo test -p buzz-db identity_0029 -- --ignored --test-threads=1 — 11 passed
  • just ci — changed-area checks passed; the full command remains blocked by a pre-existing mobile follow-mode test failure reproduced on the base branch

References

Generated with Codex

Preserve published binding history while projecting authoritative lifecycle state into additive tables.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
Serialize binding transitions and retain tombstone authority across enrollment, rotation, and revocation paths.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
Exercise lock ordering, restart boundaries, and migration ambiguity with deterministic checkpoints.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
Fail closed across database and relay authority paths when identity state is ambiguous, stale, revoked, or unreadable.

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
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