Skip to content

Commit 12e3dd4

Browse files
committed
chore(docs): Set up integ test account with auth stack
1 parent a6d2119 commit 12e3dd4

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

e2e_tests/setup/setup.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
To set up an AWS account for running integration tests on GitHub:
22

3+
1. Deploy least-privilege IAM roles:
4+
35
```bash
46
aws cloudformation deploy \
57
--template-file integ-test-authentication.yaml \
@@ -14,3 +16,33 @@ cdk bootstrap \
1416
aws://$AWS_ACCOUNT_ID/us-east-2 \
1517
--cloudformation-execution-policies "arn:aws:iam::$AWS_ACCOUNT_ID:policy/mcp-lambda-integ-test-cdk-cfn-execution"
1618
```
19+
20+
2. Delegate a sub-domain for the auth stack:
21+
22+
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html
23+
24+
3. Deploy the auth stack:
25+
26+
```bash
27+
cd ../examples/servers/auth/
28+
29+
sed -i 's/liguori.people.aws.dev/mcp-lambda-integ-tests.liguori.people.aws.dev/g' lib/mcp-auth.ts
30+
31+
npm install
32+
33+
npm run build
34+
35+
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output text)
36+
37+
aws iam attach-role-policy \
38+
--role-name cdk-hnb659fds-cfn-exec-role-$AWS_ACCOUNT_ID-us-east-2 \
39+
--policy-arn arn:aws:iam::aws:policy/AdministratorAccess
40+
41+
cdk deploy --app 'node lib/mcp-auth.js'
42+
43+
aws iam detach-role-policy \
44+
--role-name cdk-hnb659fds-cfn-exec-role-$AWS_ACCOUNT_ID-us-east-2 \
45+
--policy-arn arn:aws:iam::aws:policy/AdministratorAccess
46+
47+
./sync-cognito-user-password.sh
48+
```

examples/servers/auth/sync-cognito-user-password.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ main() {
137137

138138
print_info "Password sync completed successfully!"
139139
print_info "User '$USERNAME' can now sign in with the credentials from Secrets Manager."
140-
print_warning "To retrieve credentials: aws secretsmanager get-secret-value --secret-id '$SECRET_ARN' --query SecretString --output text"
140+
print_info "To retrieve credentials: aws secretsmanager get-secret-value --secret-id '$SECRET_ARN' --query SecretString --output text"
141141
}
142142

143143
# Run main function

0 commit comments

Comments
 (0)