From 8d4a723d19a567ae67572f9649d38ea2c6735010 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Fri, 24 May 2024 16:07:59 -0700 Subject: [PATCH 1/2] Update custom_authorizer_connect policy --- .../custom_authorizer_connect/README.md | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/samples/browser/custom_authorizer_connect/README.md b/samples/browser/custom_authorizer_connect/README.md index 91360e2e..2e75fb22 100644 --- a/samples/browser/custom_authorizer_connect/README.md +++ b/samples/browser/custom_authorizer_connect/README.md @@ -16,11 +16,30 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg "Statement": [ { "Effect": "Allow", - "Action": [ - "iot:Connect" - ], + "Action": "iot:Connect", "Resource": [ - "arn:aws:iot:region:account:client/test-*" + "arn:aws:iot:region:account:client/custom_authorizer_connect_sample*" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Publish", + "Resource": [ + "arn:aws:iot:region:account:topic/test/topic" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Subscribe", + "Resource": [ + "arn:aws:iot:region:account:topicfilter/test/topic" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Receive", + "Resource": [ + "arn:aws:iot:region:account:topic/test/topic" ] } ] From c829f0f73085316771386a948eb3ad5f7efe04a3 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Mon, 12 Aug 2024 10:53:27 -0700 Subject: [PATCH 2/2] update node sample --- .../node/custom_authorizer_connect/README.md | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/samples/node/custom_authorizer_connect/README.md b/samples/node/custom_authorizer_connect/README.md index b8276f49..1eb7f815 100644 --- a/samples/node/custom_authorizer_connect/README.md +++ b/samples/node/custom_authorizer_connect/README.md @@ -16,11 +16,30 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg "Statement": [ { "Effect": "Allow", - "Action": [ - "iot:Connect" - ], + "Action": "iot:Connect", "Resource": [ - "arn:aws:iot:region:account:client/test-*" + "arn:aws:iot:region:account:client/custom_authorizer_connect_sample*" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Publish", + "Resource": [ + "arn:aws:iot:region:account:topic/test/topic" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Subscribe", + "Resource": [ + "arn:aws:iot:region:account:topicfilter/test/topic" + ] + }, + { + "Effect": "Allow", + "Action": "iot:Receive", + "Resource": [ + "arn:aws:iot:region:account:topic/test/topic" ] } ]