Medium Cognito Regional

Cognito identity pools should not allow unauthenticated identities

FSBP

Description

This control checks whether an Amazon Cognito identity pool is configured to allow unauthenticated identities. The control fails if guest access is activated (the AllowUnauthenticatedIdentities parameter is set to true) for the identity pool. If an Amazon Cognito identity pool allows unauthenticated identities, the identity pool provides temporary AWS credentials to users who haven't authenticated through an identity provider (guests). This creates security risks because it allows anonymous access to AWS resources. If you deactivate guest access, you can help ensure that only properly authenticated users can access your AWS resources, which reduces the risk of unauthorized access and potential security breaches. As a best practice, an identity pool should require authentication through supported identity providers. If unauthenticated access is necessary, it's important to carefully restrict permissions for unauthenticated identities, and regularly review and monitor their usage.


Remediation

Disable unauthenticated identities for your Cognito identity pools to prevent anonymous access to AWS resources.

Steps

  1. Navigate to the Amazon Cognito console
  2. Go to the Identity pools section
  3. Select the identity pool that allows unauthenticated access
  4. Edit the identity pool configuration
  5. In the 'Authentication providers' section, uncheck 'Enable access to unauthenticated identities'
  6. Save the configuration changes
  7. Verify that unauthenticated access is now disabled
  8. If unauthenticated access is necessary, ensure proper IAM role restrictions are in place

Compliance

FSBP