Skip to content

Commit d16cd3f

Browse files
rix0rrrmrgrain
andauthored
chore: disable self-signup for test UserPools (#2993)
There is a security campaign that will alarm on the presence of UserPools with self-signup enabled. Disable it for the tests so we don't trip that alarm. Co-authored-by: Momo Kornher <[email protected]>
1 parent fc21576 commit d16cd3f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/cold-clouds-wish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aws-amplify/integration-tests': patch
3+
---
4+
5+
Disable self-signup for UserPool

packages/integration-tests/src/test-projects/access-testing-project/amplify/backend.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineBackend } from '@aws-amplify/backend';
22
import { auth } from './auth/resource.js';
33
import { data } from './data/resource.js';
44
import * as cognito from 'aws-cdk-lib/aws-cognito';
5-
import { RemovalPolicy } from 'aws-cdk-lib';
5+
import { RemovalPolicy, Tags } from 'aws-cdk-lib';
66
import {
77
AccountPrincipal,
88
Effect,
@@ -23,8 +23,13 @@ const simpleAuthUserPool = new cognito.UserPool(
2323
'SimpleAuthUserPool',
2424
{
2525
removalPolicy: RemovalPolicy.DESTROY,
26+
selfSignUpEnabled: false,
2627
},
2728
);
29+
Tags.of(simpleAuthUserPool).add(
30+
'sourceFile',
31+
'amplify-backend:packages/integration-tests/src/test-projects/access-testing-project/amplify/backend.ts',
32+
);
2833

2934
const simpleAuthUserPoolClient = new cognito.UserPoolClient(
3035
simpleAuthStack,

0 commit comments

Comments
 (0)