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 code
effectiveFrom - start of the override window
effectiveTo - end of the override window — must be after effectiveFrom; the framework does not enforce expiry, callers do
authorisedBy - 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.

  • Constructor Details

    • EmergencyPolicyOverride

      public EmergencyPolicyOverride(String incidentId, EmergencyPolicyOverride.Reason reason, Instant effectiveFrom, Instant effectiveTo, String authorisedBy)
      Creates an instance of a EmergencyPolicyOverride record class.
      Parameters:
      incidentId - the value for the incidentId record component
      reason - the value for the reason record component
      effectiveFrom - the value for the effectiveFrom record component
      effectiveTo - the value for the effectiveTo record component
      authorisedBy - the value for the authorisedBy record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • incidentId

      public String incidentId()
      Returns the value of the incidentId record component.
      Returns:
      the value of the incidentId record component
    • reason

      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • effectiveFrom

      public Instant effectiveFrom()
      Returns the value of the effectiveFrom record component.
      Returns:
      the value of the effectiveFrom record component
    • effectiveTo

      public Instant effectiveTo()
      Returns the value of the effectiveTo record component.
      Returns:
      the value of the effectiveTo record component
    • authorisedBy

      public String authorisedBy()
      Returns the value of the authorisedBy record component.
      Returns:
      the value of the authorisedBy record component