Class MassCredentialStatusChange
java.lang.Object
com.svenruppert.jsentinel.credential.emergency.MassCredentialStatusChange
Operational helper for incident response: bulk-transition every
named credential into a single target status (typically
CredentialStatus.MUST_CHANGE or
CredentialStatus.COMPROMISED).
The helper exists because the CredentialStore contract
deliberately exposes no iteration — the operator (or the consuming
application) chooses which subjects are in scope by supplying an
Iterable<String> of usernames. This shape
works the same against an in-memory store, a SQL store with a
cursor, or an Eclipse-Store snapshot.
Every successful transition publishes a
CredentialStatusChanged audit event so the incident
timeline is preserved (CWE-778). Records that are already at the
target status are skipped; records that are missing from the
store are recorded as MassCredentialStatusChange.Report.notFound() so the operator
can investigate residue.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAggregate report of a mass status change. -
Constructor Summary
ConstructorsConstructorDescriptionMassCredentialStatusChange(CredentialStore store, JSentinelAuditService audit, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptionforceAllToStatus(Iterable<String> usernames, CredentialStatus targetStatus, EmergencyPolicyOverride override) Transitions each named credential totargetStatus.
-
Constructor Details
-
MassCredentialStatusChange
-
-
Method Details
-
forceAllToStatus
public MassCredentialStatusChange.Report forceAllToStatus(Iterable<String> usernames, CredentialStatus targetStatus, EmergencyPolicyOverride override) Transitions each named credential totargetStatus.- Parameters:
usernames- subjects in scopetargetStatus- the new status to setoverride- the operator-declared incident context; itsincidentIdandreason.name()are recorded in the audit reason field- Returns:
- a
MassCredentialStatusChange.Reportwith per-username outcomes; the report carries counts only — never the secret data of any touched record
-