Skip to main content
MEDIUMElastiCacheSecurity

ElastiCache AUTH Token Missing

elasticache-auth-token-missing

What this rule checks

Detects Redis replication groups with transit encryption but no AUTH token configured.

How to fix it

  1. 1Set AuthToken to require Redis client authentication
FlaggedTransit encryption is on but no AuthToken is set, so any client that reaches the endpoint can issue Redis commands without authenticating.
import { Stack, App } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as elasticache from 'aws-cdk-lib/aws-elasticache';

new elasticache.CfnReplicationGroup(this, 'Redis', {
  replicationGroupDescription: 'session cache',
  engine: 'redis',
  cacheNodeType: 'cache.t3.micro',
  transitEncryptionEnabled: true,
});
FixedAdding an AuthToken requires clients to authenticate before running Redis commands over the encrypted connection.
import { Stack, App } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as elasticache from 'aws-cdk-lib/aws-elasticache';

new elasticache.CfnReplicationGroup(this, 'Redis', {
  replicationGroupDescription: 'session cache',
  engine: 'redis',
  cacheNodeType: 'cache.t3.micro',
  transitEncryptionEnabled: true,
  authToken: 'a-strong-auth-token-at-least-16-chars',
});

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::ElastiCache::ReplicationGroup

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 elasticache-auth-token-missing and the reason is kept in the report, not silently hidden.

In .cdk-insights.json:

{
  "ignoreRules": [
    { "id": "elasticache-auth-token-missing", "reason": "Why this is intentional" }
  ]
}

Or inline in your CDK code:

Validations.of(scope).acknowledge({
  id: 'cdk-insights::elasticache-auth-token-missing',
  reason: 'Why this is intentional',
});

Use the rule ID elasticache-auth-token-missing 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 ElastiCache rules