Record Class AuditEvent
java.lang.Object
java.lang.Record
org.j7m.middleware.security.api.AuditEvent
- Record Components:
timestamp- event timestampruntimeId- runtime idprincipal- principal idaction- action nameresource- resource iddecision- authorization decision textpolicyId- policy idcorrelationId- correlation idinvocationId- invocation idremoteEndpoint- remote endpointreason- safe reasontransportId- transport idregistryContext- registry contextmetadata- redacted metadata
public record AuditEvent(Instant timestamp, String runtimeId, String principal, String action, String resource, String decision, String policyId, String correlationId, String invocationId, String remoteEndpoint, String reason, String transportId, String registryContext, Map<String,String> metadata)
extends Record
Immutable audit event with bounded public text.
Top-level string fields and metadata are defensively bounded before
retention. Secret-looking, path-like, endpoint-like, or otherwise unsafe
free-form values are omitted or replaced with stable redaction markers so
audit sinks cannot retain attacker-controlled payloads or credentials.
The action and reason fields retain only bounded structured
machine codes using the J7M audit-code character set.
-
Constructor Summary
ConstructorsConstructorDescriptionAuditEvent(Instant timestamp, String runtimeId, String principal, String action, String resource, String decision, String policyId, String correlationId, String invocationId, String remoteEndpoint, String reason, String transportId, String registryContext, Map<String, String> metadata) Creates immutable bounded and redacted metadata. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.Returns the value of thecorrelationIdrecord component.decision()Returns the value of thedecisionrecord 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 theinvocationIdrecord component.metadata()Returns the value of themetadatarecord component.policyId()Returns the value of thepolicyIdrecord component.Returns the value of theprincipalrecord component.reason()Returns the value of thereasonrecord component.Returns the value of theregistryContextrecord component.Returns the value of theremoteEndpointrecord component.resource()Returns the value of theresourcerecord component.Returns the value of theruntimeIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportIdrecord component.
-
Constructor Details
-
AuditEvent
public AuditEvent(Instant timestamp, String runtimeId, String principal, String action, String resource, String decision, String policyId, String correlationId, String invocationId, String remoteEndpoint, String reason, String transportId, String registryContext, Map<String, String> metadata) Creates immutable bounded and redacted metadata.
-
-
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). -
timestamp
-
runtimeId
-
principal
-
action
-
resource
-
decision
-
policyId
-
correlationId
Returns the value of thecorrelationIdrecord component.- Returns:
- the value of the
correlationIdrecord component
-
invocationId
Returns the value of theinvocationIdrecord component.- Returns:
- the value of the
invocationIdrecord component
-
remoteEndpoint
Returns the value of theremoteEndpointrecord component.- Returns:
- the value of the
remoteEndpointrecord component
-
reason
-
transportId
Returns the value of thetransportIdrecord component.- Returns:
- the value of the
transportIdrecord component
-
registryContext
Returns the value of theregistryContextrecord component.- Returns:
- the value of the
registryContextrecord component
-
metadata
-