mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-06 03:59:14 +00:00
68499b6549
The `policy`, `policy-mapping` and `group-info` receive paths applied every incoming item unconditionally, so a delayed older grant (wide policy body, old mapping, old group add) overwrote a newer revoke on the peer. `iam-user` and `service-account` already compared the item's `updatedAt` with the local record. Route the three paths through one pure verdict helper: an item older than the local record is acknowledged without being applied; items without a source timestamp and items targeting an absent record keep today's behaviour (older peers, idempotent deletes from backlog#2071). Deletes are gated the same way so an older delete cannot remove a newer record. The group record's own timestamp now moves on every membership and status change instead of staying at creation, so the gate judges group items against the last change. Add the IamSys accessors the gate reads (`get_policy_doc`, `get_mapped_policy_record`, `get_group_info`). (cherry picked from commit 98c32093406cb47014b7eda2fe139f01079de337)