Skip to main content
MEDIUMGlueSecurity

Glue Connection Network Isolation

glue-connection-network-isolation

What this rule checks

Detects Glue JDBC connections without VPC subnet placement or SSL enforcement.

How to fix it

  1. 1Set PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList
  2. 2Include SSL parameters in the JDBC connection URL
FlaggedThe JDBC connection has no PhysicalConnectionRequirements (no VPC subnet placement) and its URL does not enforce SSL, so traffic is neither network-isolated nor guaranteed encrypted in transit. CDK Insights flags AWS::Glue::Connection JDBC connections lacking VPC placement or SSL enforcement.
import { CfnConnection } from 'aws-cdk-lib/aws-glue';

new CfnConnection(this, 'JdbcConnection', {
  catalogId: this.account,
  connectionInput: {
    name: 'analytics-db',
    connectionType: 'JDBC',
    connectionProperties: {
      JDBC_CONNECTION_URL: 'jdbc:mysql://db.example.internal:3306/analytics',
      USERNAME: 'etl_user',
      PASSWORD: 'placeholder',
    },
  },
});
FixedphysicalConnectionRequirements now pins the connection to a subnet and security group, the URL carries useSSL=true, and JDBC_ENFORCE_SSL is set. With subnet placement and SSL enforcement present the finding clears.
import { CfnConnection } from 'aws-cdk-lib/aws-glue';

new CfnConnection(this, 'JdbcConnection', {
  catalogId: this.account,
  connectionInput: {
    name: 'analytics-db',
    connectionType: 'JDBC',
    connectionProperties: {
      JDBC_CONNECTION_URL:
        'jdbc:mysql://db.example.internal:3306/analytics?useSSL=true',
      JDBC_ENFORCE_SSL: 'true',
      USERNAME: 'etl_user',
      PASSWORD: 'placeholder',
    },
    physicalConnectionRequirements: {
      subnetId: 'subnet-0abc123',
      securityGroupIdList: ['sg-0def456'],
      availabilityZone: 'us-east-1a',
    },
  },
});

CDK Insights pinpoints the exact file and line in your CDK source for every finding, so you can jump straight to the fix.

Affected resource types

AWS::Glue::Connection

Compliance frameworks

SOC2HIPAAPCI-DSSNIST

AWS documentation

Read the AWS guidance

Intentional? Suppress this finding

Sometimes a flag is deliberate β€” a genuinely public endpoint, say. You can dismiss glue-connection-network-isolation and the reason is kept in the report, not silently hidden.

In .cdk-insights.json:

{
  "ignoreRules": [
    { "id": "glue-connection-network-isolation", "reason": "Why this is intentional" }
  ]
}

Or inline in your CDK code:

Validations.of(scope).acknowledge({
  id: 'cdk-insights::glue-connection-network-isolation',
  reason: 'Why this is intentional',
});

Use the rule ID glue-connection-network-isolation shown above β€” not the CDK-* ID from SARIF / GitHub code scanning. To dismiss every finding on one construct instead, use ignorePaths. Suppression docs β†’

Catch this in your stack

$ npx cdk-insights scan

CDK Insights runs this and 118+ other rules locally against your synthesised CDK app β€” free, no account, your code never leaves your machine.

More Glue rules