Skip to main content

Module recert

Module recert 

Source
Expand description

Access recertification: a periodic review of the grants and role assignments in force by someone accountable for them, with what nobody renews taken away when the time is up (ISO 27001 A.5.18, SOX access reviews).

A Campaign has a scope (RecertScope: an anchor, permissions, roles, kinds of subject), a reviewer rule per item, a deadline, how long a kept item stays certified and the action that runs on what was not reviewed (DefaultAction). It is one document: the items are generated at the opening from the grants and the subjects you pass, each with the Impact of revoking it when the flow has Recertifications::with_impact.

  • Open. Recertifications::open refuses a scope with nothing in it, a deadline that is not in the future and an escalation default without an escalation reviewer. Only allow grants and assignments that have not ended become items.
  • Decide. Recertifications::decide takes a RecertDecision per item: keep certifies the access for the campaign’s period (the grant is not touched: the certification is what is recorded), revoke becomes a Mutation (Mutation::Remove or Mutation::RevokeRole) through the Governance with the reviewer as the actor, so every invariant, separation of duties included, judges it, and delegate hands the item to another reviewer. The reviewer must be identified, hold the permission the campaign declares, match the item’s reviewer rule (or be its delegate), not review access they hold themselves, and not accumulate conflicting duties of the catalog’s separation sets. A decision after the deadline is refused.
  • Close. Recertifications::close runs from the deadline on and applies the default action to every item still open: expire revokes it through the governance (an item the invariants refuse to revoke is flagged, never silently kept), flag keeps it marked for follow-up, escalate hands it to the escalation reviewer. Nothing is decided after the closing; a follow-up is a new campaign.
  • Audit. With the audit feature and an auditor on the governance: recert_open, one recert_decide per decision (refused ones included, rejected) and per default action, and recert_close. A revocation also leaves the usual grant_remove / role_revoke record. The record of a decision is written before the revocation is applied.
  • Report. Campaign::report counts the items by outcome and by reviewer.

The crate reads no clock and persists nothing: the caller passes the instant, stores the grants and subjects that a revocation returns, and keeps the campaigns in a RecertStore. Two reviewers of the same campaign must not run at once; the store’s RecertStore::update refuses a stale revision, and a host with several processes serialises per campaign before it applies the grants.

Structs§

Campaign
A recertification campaign and its items.
CampaignReport
A campaign counted by outcome and by reviewer, from Campaign::report.
CampaignSpec
What a campaign is made of, before it opens.
Closed
A campaign closed: the grants to persist, the subjects whose roles changed and the report.
Decided
A decision taken and the grants to persist.
Delegation
A reviewer handing an item over.
MemoryRecertStore
RecertStore in memory.
RecertItem
One access to certify.
RecertScope
What a campaign reviews. Empty lists mean everything on that axis; only permissions selects only grants, only roles only role assignments, and both select both.
Recertifications
The recertification flow over a Governance and a RecertStore.
ReviewerRoute
Sends the items about one permission or role to a reviewer rule other than the campaign’s default.
ReviewerTally
What each reviewer did.

Enums§

CampaignStatus
Where a campaign stands.
DefaultAction
What runs on an item nobody reviewed when the campaign closes.
ItemState
Where an item stands. Only Open can still change.
RecertDecision
What a reviewer decides about an item.
RecertError
Why a recertification step failed.
RecertTarget
The access an item is about.
ReviewerRule
Who may review an item.

Traits§

RecertStore
Where the campaigns are kept. Implementations are shared between threads.