Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-cognito): add ability to use V2_0 as PreTokenGenerationConfig #31595

Closed
1 of 2 tasks
kornicameister opened this issue Sep 30, 2024 · 5 comments
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@kornicameister
Copy link
Contributor

Describe the feature

I want to use Cognito's advanced security for augmenting access tokens per https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html#user-pool-lambda-pre-token-generation-accesstoken

image

From what I can tell this should be as simple as setting LambdaVersion to V2_0 of https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-pretokengenerationconfig.html#cfn-cognito-userpool-pretokengenerationconfig-lambdaversion

Use Case

Changing access tokens

Proposed Solution

add PRE_TOKEN_GENERATION_CONFIG_V2 to UserPoolOperation enum

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.160.0

Environment details (OS name and version, etc.)

MacOS Sierra

@kornicameister kornicameister added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 30, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cognito Related to Amazon Cognito label Sep 30, 2024
@pahud
Copy link
Contributor

pahud commented Sep 30, 2024

Thank you for the feedback. We welcome the PRs!

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 30, 2024
@mhboon
Copy link

mhboon commented Sep 30, 2024

I believe this is already in
userPool.addTrigger( UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG, fnPreTokenGeneration, LambdaVersion.V2_0, )
This results in a V2 trigger and allows to update accesstoken.

LambdaVersion is in aws-cdk-lib/aws-cognito

@pahud
Copy link
Contributor

pahud commented Sep 30, 2024

Thank you @mhboon !

Hi @kornicameister can you validate if this works for you?

@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 30, 2024
@kornicameister
Copy link
Contributor Author

@mhboon @pahud my bad, I misunderstood the LambdaVersion as something from lambda alias.

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants