IoTCoreCustomAuthorizerResponse create invalid payalod

Open
#1,131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, rust

Research direction

Start by locating IoTCoreCustomAuthorizerResponse and its policy_documents field, then inspect how IamPolicyDocument values are serialized. Look for related serialization or response tests and verify the completed change cannot produce a policyDocuments array containing null, matching the AWS IoT broker behavior described here.

Written by the indexing model from the issue text.

Description

It seems that IoTCoreCustomAuthorizerResponse can create a payload not accepted by AWS IOT broker.

The following attributes: pub policy_documents: Vec<Option<IamPolicyDocument>> allow a Vec that contains None but AWS IOT broker raise an AUTHORIZATION_FAILURE error in that case.

The corresponding json value is:

   "policyDocuments": [                                                                                                                                                                                                            
      null                                                                                                                                                                                                                        
    ]

Should policy_documents type be: Vec<IamPolicyDocument>> instead ?

Dominant language
Rust
Stars
3.6k
Forks
397
Avg merge
55m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-lambda-rust-runtime

All issues in aws/aws-lambda-rust-runtime

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.