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
Commit 56f7ed7
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(credentials): resolve Vanta tokens through the coordinated client-token resolver (#9919)
* refactor(credentials): resolve Vanta tokens through the coordinated client-token resolver
vanta-token.ts carried a second copy of the lock-and-memo protocol in
coordinated-client-token.ts. Vanta now calls resolveCoordinatedClientToken and
invalidateCoordinatedClientToken through four optional inputs whose defaults
leave Shopify, Atlassian, and Linear rows unchanged:
- minRemainingMs: Vanta keeps its 30-second reuse margin
- failureKeyQualifier: Vanta's failure memo stays keyed by secret and scope
- accessTokenDigestTag: Vanta's token digest stays keyed by API domain
- pinnedState: Vanta's scope is stored with the token and checked against
every stored record, expired ones included, under the lock
Row ids, the advisory lock name and key, token digests, and encrypted payloads
are unchanged, so old and new workers read each other's rows and contend on
the same lock during a rollout. Unit tests pin those formats for Vanta and for
the shared defaults; they pass against the previous code too.
* chore(credentials): keep the expired-failure sweep private to the coordinated resolver
* test(credentials): prove rolling-deploy token compatibility against real Postgres
Replace the mock-based unit tests for the coordinated resolver and the Vanta token chain
with integration tests that seed rows exactly as the previous build wrote them (inline
sha256 ids and digests, real encryptSecret) and read back what the new resolver writes.
They cover a fresh stored token, a remembered refusal, the expired-row scope pin,
mint and refusal payloads at the old ids, invalidation by the old digest, the old
build's advisory lock blocking a new resolution, and the default Shopify-style formats.
0 commit comments