Record Class EmergencyPolicyOverride
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.emergency.EmergencyPolicyOverride
- Record Components:
incidentId- short stable identifier of the incident (e.g."INC-2026-04-pepper-leak")reason- structured reason codeeffectiveFrom- start of the override windoweffectiveTo- end of the override window — must be aftereffectiveFrom; the framework does not enforce expiry, callers do- operator subject id that authorised the override; never the operator's password or any other secret
public record EmergencyPolicyOverride(String incidentId, EmergencyPolicyOverride.Reason reason, Instant effectiveFrom, Instant effectiveTo, String authorisedBy)
extends Record
Operator-declared, time-bounded credential emergency override.
An override is the explicit container for an out-of-band
decision: "we are temporarily acting outside the standard
policy because of incident reason". The record is
passed to operations that may be invoked during incident
response (mass status change, pepper rotation, algorithm
deprecation) so the audit trail carries every dimension
needed for review (CWE-778, CWE-693, CWE-284).
The override is non-executable: instantiating it does not change runtime behaviour. It is consumed by the operations that explicitly require it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStructured incident category. -
Constructor Summary
ConstructorsConstructorDescriptionEmergencyPolicyOverride(String incidentId, EmergencyPolicyOverride.Reason reason, Instant effectiveFrom, Instant effectiveTo, String authorisedBy) Creates an instance of aEmergencyPolicyOverriderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorisedByrecord component.Returns the value of theeffectiveFromrecord component.Returns the value of theeffectiveTorecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theincidentIdrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EmergencyPolicyOverride
public EmergencyPolicyOverride(String incidentId, EmergencyPolicyOverride.Reason reason, Instant effectiveFrom, Instant effectiveTo, String authorisedBy) Creates an instance of aEmergencyPolicyOverriderecord class.- Parameters:
incidentId- the value for theincidentIdrecord componentreason- the value for thereasonrecord componenteffectiveFrom- the value for theeffectiveFromrecord componenteffectiveTo- the value for theeffectiveTorecord componentauthorisedBy- the value for theauthorisedByrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
incidentId
Returns the value of theincidentIdrecord component.- Returns:
- the value of the
incidentIdrecord component
-
reason
-
effectiveFrom
Returns the value of theeffectiveFromrecord component.- Returns:
- the value of the
effectiveFromrecord component
-
effectiveTo
Returns the value of theeffectiveTorecord component.- Returns:
- the value of the
effectiveTorecord component
-
authorisedBy
Returns the value of theauthorisedByrecord component.- Returns:
- the value of the
authorisedByrecord component
-