You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PreTokenGenerationTriggerEvent => claims_to_suppress : NoneType' object does not support item assignment #870
What were you trying to accomplish?
I'm currently trying to add some claims to suppress to the token in the event object. Working with manual way (without your lib).
"exception": "Traceback (most recent call last):\n File \"/var/task/main.py\", line 130, in handler\n claims_override_details.claims_to_suppress = []\n File \"/var/task/package/aws_lambda_powertools/utilities/data_classes/cognito_user_pool_event.py\", line 487, in claims_to_suppress\n self._data[\"claimsToSuppress\"] = value\nTypeError: 'NoneType' object does not support item assignment"
hey @filol thank you so much for filing this. Would you happen to have a copy of the event with any sensitive data redacted to help us reproduce/test it?
@filol was claimsOverrideDetails in your event null? Would it be possible to post it with any values masked. I would be curious about the data structure.
@filol - i have PR (#878) that could fix this, if you could verify that the event did some from a real integration test and that is looks something like this:
Activity
boring-cyborg commentedon Dec 5, 2021
Thanks for opening your first issue here! We'll come back to you as soon as we can.
heitorlessa commentedon Dec 8, 2021
hey @filol thank you so much for filing this. Would you happen to have a copy of the event with any sensitive data redacted to help us reproduce/test it?
cc @michaelbrewer
Thank you!
michaelbrewer commentedon Dec 8, 2021
I will have a look @filol and try to include it in our test coverage to be sure we don't regress.
michaelbrewer commentedon Dec 8, 2021
@filol was
claimsOverrideDetailsin your eventnull? Would it be possible to post it with any values masked. I would be curious about the data structure.michaelbrewer commentedon Dec 8, 2021
@filol - i have PR (#878) that could fix this, if you could verify that the event did some from a real integration test and that is looks something like this:
filol commentedon Dec 9, 2021
Hi @michaelbrewer, I don't have the event right now on the hand. I will come back to you with my sample monday
filol commentedon Dec 16, 2021
@michaelbrewer There is my event from aws, so yes claimsOverrideDetails is null by default
{ "version": "1", "triggerSource": "TokenGeneration_RefreshTokens", "region": "eu-west-1", "userPoolId": "eu-west-1_xxxxxxxxx", "userName": "xxxxxxxxxx", "callerContext": { "awsSdkVersion": "aws-sdk-unknown-unknown", "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxx" }, "request": { "userAttributes": { "sub": "c7605922-xxxx-xxxx-a402-881ba30eeabc", "zoneinfo": "UTC", "cognito:email_alias": "xxxx", "cognito:user_status": "CONFIRMED", "email_verified": "true", "phone_number_verified": "false", "family_name": "xxxx", "email": "xxxx" }, "groupConfiguration": { "groupsToOverride": [ "xxx", "xxx", ], "iamRolesToOverride": [], "preferredRole": null } }, "response": { "claimsOverrideDetails": null } }heitorlessa commentedon Dec 20, 2021
Now released as part of 1.23 version