Mismatch type description for Cognito CognitoEventUserPoolsPreTokenGenV2 Event
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start in lambda-events/src/event/cognito/mod.rs at CognitoEventUserPoolsPreTokenGenV2 and its claims_to_add_or_override field, then compare the field with the AWS event schema linked in the issue. Done means the field accepts the documented JSON value types instead of only strings and the existing event behavior remains compatible.
Written by the indexing model from the issue text.
Description
There is a type mismatch for claims_to_add_or_override in CognitoEventUserPoolsPreTokenGenV2 event. claims_to_add_or_override should accept any of the json types instead of only strings.
The documentation at AWS mentions the following type description for the event as:
{
"request": {
"userAttributes": {
"string": "string"
},
"scopes": ["string", "string"],
"groupConfiguration": {
"groupsToOverride": ["string", "string"],
"iamRolesToOverride": ["string", "string"],
"preferredRole": "string"
},
"clientMetadata": {
"string": "string"
}
},
"response": {
"claimsAndScopeOverrideDetails": {
"idTokenGeneration": {
"claimsToAddOrOverride": {
"string": [accepted datatype]
},
"claimsToSuppress": ["string", "string"]
},
"accessTokenGeneration": {
"claimsToAddOrOverride": {
"string": [accepted datatype]
},
"claimsToSuppress": ["string", "string"],
"scopesToAdd": ["string", "string"],
"scopesToSuppress": ["string", "string"]
},
"groupOverrideDetails": {
"groupsToOverride": ["string", "string"],
"iamRolesToOverride": ["string", "string"],
"preferredRole": "string"
}
}
}
}
Accepted datatypes:
- String
- Number
- Boolean
- Array of strings, numbers, booleans, or a combination of any of these
- JSON
Proposed Solution
- pub claims_to_add_or_override: HashMap<String, String>
+ pub claims_to_add_or_override: HashMap<String, serde_json::Value>
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 397
- Avg merge
- 55m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-rust-runtime
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
aws/aws-lambda-rust-runtime#1165 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
aws/aws-lambda-rust-runtime#1161 ·
-
aws/aws-lambda-rust-runtime#1155 · 1 reaction · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
aws/aws-lambda-rust-runtime#1131 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
aws/aws-lambda-rust-runtime#1128 · 1 comment · 1 reaction ·
All issues in aws/aws-lambda-rust-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100