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
[P1] Release gate: preserve IAM snapshot state across import and replication #345
Complete the IAM snapshot round-trip acceptance on local main e51bff35a, including service-account state, group state, failure reporting and the distinction between signed claims and derived in-memory claims. Detailed authorization evidence is retained privately under SECURITY.md.
Acceptance:
Export/import of enabled and disabled service accounts and groups preserves each status, including imports into an existing installation.
The newServiceAccountOpts construction carries the exported status.
SetGroupStatus takes an enabled boolean: use false for disabled, true for enabled, and report persistence errors. Calling it with true for a disabled group is incorrect.
Group failures retain the actual group-operation error.
serviceAccountSnapshot excludes sessionPolicy-extracted from transported claims; verify the raw JWT with auth.ExtractClaims, not the helper that creates the derived value while decoding.
Preserve the existing signature/session-policy checks and stale-revision protections; do not infer an authorization bypass solely from the extra derived claim.
Test ImportIAM and ImportIAMV2, absent legacy fields and repeated round trips.
Source classification: status omission and wrong group error are inherited; snapshot derived-claim transport is introduced by da8d8a54b. The status defect is P1 and blocks IAM migration use; the derived-claim cleanup is lower severity on the evidence so far. Estimate: 0.5–1 day. Private report reference: P1-6.
Import now carries the exported service-account status into account creation and applies group status with the correct enabled/disabled boolean. V2 results retain the actual membership or status-persistence error. Snapshots and newly signed tokens exclude the derived decoded-policy claim, while preserving identity claims, the explicit session policy and the existing signature/revision checks.
This keeps transport state separate from in-memory authorization caches without changing the token or archive schema. The derived-claim cleanup is a consistency fix; it is not evidence of an authentication bypass. Import remains non-transactional: a failed status write can follow a committed membership update, so callers must inspect the per-entity V2 result before treating a restore as complete.
Validation passed for status restoration into fresh and existing installations, group-write failures, legacy snapshots, persisted raw JWTs checked with auth.ExtractClaims, and replication edits with stale-state controls. A supplemental acceptance run on 8587e06 exercised both ImportIAM and ImportIAMV2 over three successive export/import rounds, including enabled/disabled accounts and groups, omitted legacy status fields and policy-version normalization. All four API/target combinations passed. Full local server tests and the focused IAM race suite also passed.
Closing this snapshot-state acceptance issue. The independent site-replication healing lock issue remains tracked in #341.
Activity
fix(iam): normalize service policies and preserve imported state
Vonng commentedon Nov 11, 2026
Implemented on main in 1d714834c.
Import now carries the exported service-account status into account creation and applies group status with the correct enabled/disabled boolean. V2 results retain the actual membership or status-persistence error. Snapshots and newly signed tokens exclude the derived decoded-policy claim, while preserving identity claims, the explicit session policy and the existing signature/revision checks.
This keeps transport state separate from in-memory authorization caches without changing the token or archive schema. The derived-claim cleanup is a consistency fix; it is not evidence of an authentication bypass. Import remains non-transactional: a failed status write can follow a committed membership update, so callers must inspect the per-entity V2 result before treating a restore as complete.
Validation passed for status restoration into fresh and existing installations, group-write failures, legacy snapshots, persisted raw JWTs checked with auth.ExtractClaims, and replication edits with stale-state controls. A supplemental acceptance run on 8587e06 exercised both ImportIAM and ImportIAMV2 over three successive export/import rounds, including enabled/disabled accounts and groups, omitted legacy status fields and policy-version normalization. All four API/target combinations passed. Full local server tests and the focused IAM race suite also passed.
Closing this snapshot-state acceptance issue. The independent site-replication healing lock issue remains tracked in #341.