Package com.cloudforgeci.api.core.rules
Record Class AuditManagerControl
java.lang.Object
java.lang.Record
com.cloudforgeci.api.core.rules.AuditManagerControl
- Record Components:
controlId- Unique identifier for this control (matches ComplianceMatrix enum)description- Human-readable description of what this control enforcesconfigRuleIds- List of AWS Config rule IDs that monitor this controlframeworkMappings- List of framework-specific control mappingsevidenceSources- AWS services providing evidence (cloudtrail, config, securityhub, etc.)
public record AuditManagerControl(String controlId, String description, List<String> configRuleIds, List<AuditManagerControl.FrameworkControl> frameworkMappings, List<String> evidenceSources)
extends Record
Maps compliance controls to AWS infrastructure monitoring and Audit Manager evidence.
This record bridges the gap between:
- Validation Rules - CDK synthesis-time checks (Soc2Rules, PciDssRules, etc.)
- AWS Config Rules - Runtime infrastructure compliance monitoring
- Audit Manager Controls - Continuous evidence collection and audit reports
Example Usage
// Define control mapping for encryption at rest
AuditManagerControl ebsEncryption = new AuditManagerControl(
"ENCRYPTION_AT_REST",
"EBS volumes must be encrypted",
List.of("EbsEncryptionRule"), // Config rules monitoring this
List.of(
new FrameworkControl("SOC2", "CC6.1", "Logical and Physical Access Controls"),
new FrameworkControl("PCI-DSS", "Req3.4", "Render PAN unreadable"),
new FrameworkControl("HIPAA", "164.312(a)(2)(iv)", "Encryption and Decryption")
),
List.of("cloudtrail", "config") // Evidence sources
);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFramework-specific control mapping. -
Constructor Summary
ConstructorsConstructorDescriptionAuditManagerControl(String controlId, String description, List<String> configRuleIds, List<AuditManagerControl.FrameworkControl> frameworkMappings, List<String> evidenceSources) Creates an instance of aAuditManagerControlrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToFramework(String framework) Check if this control applies to a specific framework.Returns the value of theconfigRuleIdsrecord component.Returns the value of thecontrolIdrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceSourcesrecord component.Returns the value of theframeworkMappingsrecord component.getConfigRulesForFramework(String framework) Get Config rule IDs for a specific framework.getFrameworkControl(String framework) Get framework control by framework name.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuditManagerControl
public AuditManagerControl(String controlId, String description, List<String> configRuleIds, List<AuditManagerControl.FrameworkControl> frameworkMappings, List<String> evidenceSources) Creates an instance of aAuditManagerControlrecord class.- Parameters:
controlId- the value for thecontrolIdrecord componentdescription- the value for thedescriptionrecord componentconfigRuleIds- the value for theconfigRuleIdsrecord componentframeworkMappings- the value for theframeworkMappingsrecord componentevidenceSources- the value for theevidenceSourcesrecord component
-
-
Method Details
-
getConfigRulesForFramework
Get Config rule IDs for a specific framework. Returns all Config rules that apply to this control's framework mapping. -
getFrameworkControl
Get framework control by framework name. -
appliesToFramework
Check if this control applies to a specific framework. -
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. -
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. -
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). -
controlId
Returns the value of thecontrolIdrecord component.- Returns:
- the value of the
controlIdrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
configRuleIds
Returns the value of theconfigRuleIdsrecord component.- Returns:
- the value of the
configRuleIdsrecord component
-
frameworkMappings
Returns the value of theframeworkMappingsrecord component.- Returns:
- the value of the
frameworkMappingsrecord component
-
evidenceSources
Returns the value of theevidenceSourcesrecord component.- Returns:
- the value of the
evidenceSourcesrecord component
-