Skip to content

Commit

Permalink
Fix KMS circulair dependency in new CDK version (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottokruse authored Jun 12, 2023
1 parent ec62866 commit 43ebb40
Show file tree
Hide file tree
Showing 8 changed files with 1,986 additions and 1,455 deletions.
4 changes: 3 additions & 1 deletion cdk/lib/cognito-passwordless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ export class Passwordless extends Construct {
actions: ["kms:Sign"],
conditions: {
StringLike: {
"kms:RequestAlias": (key as cdk.aws_kms.IAlias).aliasName,
"kms:RequestAlias": (
key.node.defaultChild as cdk.aws_kms.CfnAlias
).aliasName, // have to get the raw string like this to prevent a circulair dependency
},
},
};
Expand Down
3 changes: 2 additions & 1 deletion end-to-end-example/cdk/cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@aws-cdk/core:enablePartitionLiterals": true,
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
"@aws-cdk/aws-kms:aliasNameRef": true
}
}
3,402 changes: 1,965 additions & 1,437 deletions end-to-end-example/cdk/package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions end-to-end-example/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"install-passwordless-local": "rm -rf node_modules/amazon-cognito-passwordless-auth && npm i ../.. --install-links --no-save"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.114",
"@types/node": "^18.16.0",
"@types/aws-lambda": "^8.10.117",
"@types/node": "^20.3.0",
"@types/tap": "^15.0.8",
"esbuild": "^0.17.18",
"esbuild": "^0.18.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
"typescript": "^5.1.3"
},
"dependencies": {
"amazon-cognito-passwordless-auth": "^0.6.3",
"aws-cdk-lib": "^2.76.0",
"cdk-nag": "^2.26.5",
"constructs": "^10.2.6"
"amazon-cognito-passwordless-auth": "^0.6.4",
"aws-cdk-lib": "^2.83.1",
"cdk-nag": "^2.27.35",
"constructs": "^10.2.50"
}
}
8 changes: 4 additions & 4 deletions end-to-end-example/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion end-to-end-example/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@cloudscape-design/global-styles": "^1.0.8",
"amazon-cognito-passwordless-auth": "^0.6.3",
"amazon-cognito-passwordless-auth": "^0.6.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amazon-cognito-passwordless-auth",
"version": "0.6.3",
"version": "0.6.4",
"description": "Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up",
"keywords": [
"AWS",
Expand Down

0 comments on commit 43ebb40

Please sign in to comment.