Class EventMetadata
java.lang.Object
com.ironcorelabs.tenantsecurity.logdriver.v1.EventMetadata
Holds metadata fields as part of a security event. Each event will have metadata that associates
it to a tenant ID, which service is accessing the data, it's classification, as well as optional
fields for other arbitrary key/value pairs and a request ID to send to the Tenant Security Proxy.
-
Constructor Summary
ConstructorDescriptionEventMetadata
(String tenantId, String requestingUserOrServiceId, String dataLabel) Constructor for EventMetadata class which has no additional metadata.EventMetadata
(String tenantId, String requestingUserOrServiceId, String dataLabel, String requestId) Constructor for EventMetadata class which contains a unique request ID to send to the Tenant Security Proxy.EventMetadata
(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData) Constructor for EventMetadata class which contains arbitrary key/value pairs to send to the Tenant Security Proxy.EventMetadata
(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData, String requestId) Constructor for EventMetadata class which contains arbitrary key/value pairs and a unique request ID to send to the Tenant Security Proxy.EventMetadata
(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData, String requestId, String sourceIp, String objectId, Long timestampMillis) Constructor for EventMetadata class which contains arbitrary key/value pairs and a unique request ID to send to the Tenant Security Proxy. -
Method Summary
Modifier and TypeMethodDescriptionConvert all of the metadata into a HashMap that can be used to POST all the data to the Tenant Security Proxy.Get the data classification label.Get any other metadata.Get the provided request IDGet the requesting user or service ID.Get the tenant ID.
-
Constructor Details
-
EventMetadata
public EventMetadata(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData, String requestId, String sourceIp, String objectId, Long timestampMillis) throws IllegalArgumentExceptionConstructor for EventMetadata class which contains arbitrary key/value pairs and a unique request ID to send to the Tenant Security Proxy.- Parameters:
tenantId
- Unique ID of tenant that is performing the operation.requestingUserOrServiceId
- Unique ID of user/service that triggered the event.dataLabel
- Classification of the event if more than the event category is needed.otherData
- Additional String key/value pairs to add to metadata.requestId
- Unique ID that ties host application request ID to Tenant Security Proxy logs.sourceIp
- IP address of the initiator of the event.objectId
- ID of the object being acted on when the event occured.timestampMillis
- Linux epoch millis of when the event occured. If this isn't passed, now will be assumed.- Throws:
IllegalArgumentException
- If the provided tenantId is not set
-
EventMetadata
public EventMetadata(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData, String requestId) Constructor for EventMetadata class which contains arbitrary key/value pairs and a unique request ID to send to the Tenant Security Proxy.- Parameters:
tenantId
- Unique ID of tenant that is performing the operation.requestingUserOrServiceId
- Unique ID of user/service that triggered the event.dataLabel
- Classification of the event if more than the event category is needed.otherData
- Additional String key/value pairs to add to metadata.requestId
- Unique ID that ties host application request ID to Tenant Security Proxy logs.- Throws:
IllegalArgumentException
- If the provided tenantId is not set
-
EventMetadata
public EventMetadata(String tenantId, String requestingUserOrServiceId, String dataLabel, Map<String, String> otherData) throws IllegalArgumentExceptionConstructor for EventMetadata class which contains arbitrary key/value pairs to send to the Tenant Security Proxy.- Parameters:
tenantId
- Unique ID of tenant that is performing the operation.requestingUserOrServiceId
- Unique ID of user/service that triggered the event.dataLabel
- Classification of the event if more than the event category is needed.otherData
- Additional String key/value pairs to add to metadata.- Throws:
IllegalArgumentException
- If the provided tenantId is not set
-
EventMetadata
public EventMetadata(String tenantId, String requestingUserOrServiceId, String dataLabel, String requestId) Constructor for EventMetadata class which contains a unique request ID to send to the Tenant Security Proxy.- Parameters:
tenantId
- Unique ID of tenant that is performing the operation.requestingUserOrServiceId
- Unique ID of user/service that triggered the event.dataLabel
- Classification of the event if more than the event category is needed.requestId
- Unique ID that ties host application request ID to Tenant Security Proxy logs.- Throws:
IllegalArgumentException
- If the provided tenantId is not set
-
EventMetadata
Constructor for EventMetadata class which has no additional metadata.- Parameters:
tenantId
- Unique ID of tenant that is performing the operation.requestingUserOrServiceId
- Unique ID of user/service that triggered the event.dataLabel
- Classification of the event if more than the event category is needed.- Throws:
IllegalArgumentException
- If the provided tenantId is not set
-
-
Method Details
-
getTenantId
Get the tenant ID.- Returns:
- Metadata tenant ID
-
getRequestingUserOrServiceId
Get the requesting user or service ID.- Returns:
- Requesting user or service ID
-
getRequestId
Get the provided request ID- Returns:
- Unique ID that ties host application request ID to Tenant Security Proxy logs.
-
getDataLabel
Get the data classification label.- Returns:
- Data classification label
-
getOtherData
Get any other metadata.- Returns:
- Any other key/value metadata
-
getAsPostData
Convert all of the metadata into a HashMap that can be used to POST all the data to the Tenant Security Proxy. Adds all required fields to the Map, all optional fields to a sub map, and then builds up another sub map for any custom fields.- Returns:
- Metadata converted into POST data Map
-