Skip to main content

Compliance Control to Security Profile Mapping

Security profile configurations (DevSecurityProfileConfiguration, StagingSecurityProfileConfiguration, and ProductionSecurityProfileConfiguration in cloudforge-api/src/main/java/com/cloudforgeci/api/core/security/) consult ComplianceMatrix to decide whether a selected framework requires a control. ComplianceMatrix.SecurityControl is the source of truth for requirement levels; the table below summarizes it.

The matrix also contains a NIST column. It is used for reporting only; complianceFrameworks does not accept a NIST value.

Mapping Table​

Profile MethodComplianceMatrix.SecurityControlRequirement Level
Encryption
isEbsEncryptionEnabled()ENCRYPTION_AT_RESTRequired: PCI-DSS, HIPAA, SOC2, GDPR
isEfsEncryptionAtRestEnabled()ENCRYPTION_AT_RESTRequired: PCI-DSS, HIPAA, SOC2, GDPR
isS3EncryptionEnabled()ENCRYPTION_AT_RESTRequired: PCI-DSS, HIPAA, SOC2, GDPR
isEfsEncryptionInTransitEnabled()ENCRYPTION_IN_TRANSITRequired: PCI-DSS, HIPAA, SOC2, GDPR
Logging and Audit
isCloudTrailEnabled()AUDIT_LOGGINGRequired: PCI-DSS, HIPAA, SOC2, GDPR
isAlbAccessLoggingEnabled()AUDIT_LOGGINGRequired: PCI-DSS, HIPAA, SOC2, GDPR
isFlowLogsEnabled()NETWORK_FLOW_LOGSRequired: PCI-DSS, HIPAA, SOC2, GDPR
isAuditManagerEnabled()AUDIT_MANAGERRequired: SOC2; Advisory: PCI-DSS, HIPAA, GDPR
Monitoring and Threat Detection
isGuardDutyEnabled()THREAT_DETECTIONRequired: PCI-DSS, HIPAA; Advisory: SOC2, GDPR
isSecurityMonitoringEnabled()SECURITY_MONITORINGRequired: PCI-DSS, HIPAA, GDPR; Advisory: SOC2
isSecurityHubEnabled()SECURITY_HUBAdvisory: all frameworks
isInspectorEnabled()VULNERABILITY_SCANNINGRequired: PCI-DSS; Advisory: HIPAA, SOC2, GDPR
isMacieEnabled()SENSITIVE_DATA_DISCOVERYRequired: HIPAA, GDPR; Advisory: PCI-DSS
Configuration
isAwsConfigEnabled()VULNERABILITY_MANAGEMENTRequired: all frameworks
Backup and Recovery
isAutomatedBackupEnabled()BACKUP_RECOVERYRequired: all frameworks
isCrossRegionBackupEnabled()BACKUP_RECOVERYRequired: all frameworks
Network Security
isWafEnabled()WAF_PROTECTIONRequired: PCI-DSS, SOC2, GDPR; Advisory: HIPAA
isHttpsStrictEnabled()HTTPS_STRICTRequired: PCI-DSS; Advisory: HIPAA, SOC2, GDPR
isRestrictSecurityGroupEgressEnabled()NETWORK_SEGMENTATIONRequired: all frameworks

isMultiAzEnforced() and isAutoScalingEnabled() are profile defaults and do not consult the matrix.

Resolution Pattern​

Each compliance-aware profile method follows the same order:

@Override
public boolean isCloudTrailEnabled() {
// 1. A selected framework marks the control as REQUIRED
if (deploymentContext != null) {
ComplianceMode mode = getEffectiveComplianceMode();
String frameworks = deploymentContext.complianceFrameworks();

if (ComplianceMatrix.isControlRequired(
frameworks, mode, ComplianceMatrix.SecurityControl.AUDIT_LOGGING)) {
return true;
}
}

// 2. Explicit deployment context value
if (deploymentContext != null && deploymentContext.cloudTrailEnabled() != null) {
return Boolean.TRUE.equals(deploymentContext.cloudTrailEnabled());
}

// 3. Security profile default
return true;
}

Behavior Matrix​

ComplianceMatrix.isControlRequired returns true when the mode is not DISABLED and any selected framework marks the control as REQUIRED. ENFORCE and ADVISORY differ in whether validation failures block synthesis, not in whether required controls are provisioned.

complianceModecomplianceFrameworksControl LevelResult
ENFORCEpci-dssREQUIREDControl enabled
ENFORCEpci-dssADVISORYDeployment context value, then profile default
ADVISORYpci-dssREQUIREDControl enabled
ADVISORYpci-dssADVISORYDeployment context value, then profile default
any(empty)anyDeployment context value, then profile default
DISABLEDanyanyDeployment context value, then profile default

ComplianceMatrix.shouldWarnForControl reports whether a disabled control is REQUIRED or ADVISORY for any selected framework, so that callers can log a warning.

Framework lists may be separated by commas, spaces, or +, and are normalized to upper case with _ replaced by - (pci_dss becomes PCI-DSS).

Tests​

The matrix behavior is covered by ComplianceMatrixTest, ComplianceMatrixMethodsTest, ComplianceMatrixMethodsExtendedTest, and ComplianceMatrixSecurityControlTest in cloudforge-api/src/test/java/com/cloudforgeci/api/core/rules/.