fix(auth-files): fence credential mutations by canonical identity - #459
Merged
Conversation
Add per-credential identity columns and composite keys for inspection ownership, quota cooldowns, and account-action candidates. Migrate legacy records while preserving recovery and ownership metadata. Cover fresh and compatibility migrations with SQLite regression tests.
Resolve CPA auth entries with stable credential identity before status, delete, inspection, cooldown, and automated account actions. Serialize physical-file mutations and compensate failed persistence writes. Prevent stale or shared-file identities from mutating the wrong credential.
Track canonical credential identity and connection generations across auth-file status, delete, refresh, inspection, and quota operations. Verify shared source-file coverage and fence stale asynchronous responses. Update localized diagnostics, demo behavior, and regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fence auth-file mutations with canonical credential identity across the
Manager Server and frontend. This prevents stale or shared physical-file
identities from applying status, delete, inspection, or cooldown actions to
the wrong credential.
Scope
Changes
User Impact
Status changes, deletion, cooldown recovery, and inspection actions now fail
closed when the current credential identity is stale or ambiguous instead of
risking another credential in the same physical file. Users may see new
localized conflict or retry messages. No configuration changes are required.
Compatibility / Runtime Notes
Data / Security Notes
SQLite migrations add credential identity fields and replace filename-only
ownership/cooldown uniqueness with per-credential keys. No credential bodies,
management keys, or secrets are newly persisted or exposed. Internal mutation
headers carry normalized identifiers or content hashes only.
Risk / Rollback
Risk level: Medium
Rollback notes: The previous binary is not guaranteed to support the migrated
ownership key structure. Restore the pre-deployment SQLite backup when an exact
rollback to the previous version is required. CPA panel deployments can restore
the previous panel artifact.
Verification
Commands / evidence:
A real CPA instance manual smoke test was not performed.
Screenshots / Recordings
N/A — this changes mutation safety and localized error states without changing
the page layout.
Docs
Docs decision:
No documentation update is required because this fixes existing auth-file
mutation semantics without adding configuration or a new user-facing workflow.
Demo fixtures and regression coverage are updated.
Related
N/A