Skip to content

Commit

Permalink
Security Finding: Disallow user creation on val/prod (#2758)
Browse files Browse the repository at this point in the history
* try to disable admin create user in prod/val

* test in this branch
  • Loading branch information
mojotalantikite authored Sep 23, 2024
1 parent 88becab commit b5ae0bd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions services/ui-auth/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,27 @@ resources:
- Fn::Equals:
- ''
- ${self:custom.sesSourceEmailAddress}
IsValOrProd:
Fn::Or:
- Fn::Equals:
- ${sls:stage}
- 'val'
- Fn::Equals:
- ${sls:stage}
- 'prod'
- Fn::Equals:
- ${sls:stage}
- 'mtsecfindingusers'
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: ${sls:stage}-user-pool
AdminCreateUserConfig:
AllowAdminCreateUserOnly: !If
- IsValOrProd
- true
- false
UsernameAttributes:
- email
AutoVerifiedAttributes:
Expand Down

0 comments on commit b5ae0bd

Please sign in to comment.