Skip to content

fix(iam): serialize replicated identity updates - #2

Closed
GatewayJ wants to merge 2 commits into
fix/oidc-service-account-policyfrom
fix/iam-replication-cas
Closed

fix(iam): serialize replicated identity updates#2
GatewayJ wants to merge 2 commits into
fix/oidc-service-account-policyfrom
fix/iam-replication-cas

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Related Issues

Depends on rustfs#5152. This is a stacked PR in GatewayJ/rustfs, based on fix/oidc-service-account-policy; GitHub cannot use a fork branch as the base of an upstream PR.

Summary of Changes

  • Replace a replicated service account's complete authorization state instead of retaining receiver claims or groups.
  • Add conditional IAM identity writes backed by object ETags, replicated service-account tombstones, serialized identity cache mutations, and three-way full-reload cache merging.
  • Fence stale replicated create, update, and delete events by source revisions.
  • Exercise the real site-replication IAM handler for an OIDC service-account update, including claims, groups, secret, status, description, policy, and revision replacement.

Verification

  • cargo test -p rustfs replicated_oidc_service_account_replaces_claims_and_groups_in_handler --lib
  • cargo fmt --all --check
  • make pre-commit
  • make pre-pr

Impact

No S3 protocol, public API, or configuration change. IAM service-account deletion now persists an internal tombstone so delayed replication cannot restore the deleted access key. Non-object Store implementations retain legacy unconditional-write behavior through trait defaults.

The change affects site-replication IAM persistence only. Deploy it to every participating site before relying on tombstone-based stale-delete protection. Parent-user deletion remains unchanged; its cross-node atomicity needs a separate design.

Additional Notes

High-risk adversarial review: correctness (full replacement and stale-event tests), simplicity (reuse of the existing IAM object precondition interface), security (no stale privileged claims survive), concurrency/durability (ETag CAS, bounded retries, and serialized cache commits), compatibility (no S3 wire change), performance (infrequent IAM mutation path only), and test coverage found no unresolved issue.

@GatewayJ
GatewayJ force-pushed the fix/oidc-service-account-policy branch from f4b2b42 to aaf3bd1 Compare July 24, 2026 07:25
@GatewayJ
GatewayJ force-pushed the fix/iam-replication-cas branch from 20fa21c to 5219fac Compare July 24, 2026 07:26
@github-actions github-actions Bot added the Stale label Aug 1, 2026
@github-actions github-actions Bot closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant