summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnrhen <90864038+johnrhen@users.noreply.github.com>2021-12-14 11:31:41 -0800
committerGitHub <noreply@github.com>2021-12-14 11:31:41 -0800
commita727061dc25d06aed522abfc52514d12bf848986 (patch)
treec75df29c350f8ec3999a5b42f94603e8e4750234
parent4610b37aded29b1d9c892ab85f93cf95df9af0e8 (diff)
downloadfreertos-git-a727061dc25d06aed522abfc52514d12bf848986.tar.gz
Create example IoT Thing policy (#731)
* Create example claim policy and update formatting on previous examples * Add trailing linebreak
-rw-r--r--FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_claim_policy.json62
-rw-r--r--FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_fleet_provisioning_template.json108
-rw-r--r--FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_iot_thing_policy.json10
3 files changed, 95 insertions, 85 deletions
diff --git a/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_claim_policy.json b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_claim_policy.json
index 637ec0362..b76a73b2b 100644
--- a/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_claim_policy.json
+++ b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_claim_policy.json
@@ -1,31 +1,31 @@
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "iot:Connect"
- ],
- "Resource": "*"
- },
- {
- "Effect": "Allow",
- "Action": [
- "iot:Publish",
- "iot:Receive"
- ],
- "Resource": [
- "arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/certificates/create-from-csr/*",
- "arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/provisioning-templates/<template-name>/provision/*"
- ]
- },
- {
- "Effect": "Allow",
- "Action": "iot:Subscribe",
- "Resource": [
- "arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/certificates/create-from-csr/*",
- "arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/provisioning-templates/<template-name>/provision/*"
- ]
- }
- ]
- }
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": [
+ "iot:Connect"
+ ],
+ "Resource": "*"
+ },
+ {
+ "Effect": "Allow",
+ "Action": [
+ "iot:Publish",
+ "iot:Receive"
+ ],
+ "Resource": [
+ "arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/certificates/create-from-csr/*",
+ "arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/provisioning-templates/<template-name>/provision/*"
+ ]
+ },
+ {
+ "Effect": "Allow",
+ "Action": "iot:Subscribe",
+ "Resource": [
+ "arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/certificates/create-from-csr/*",
+ "arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/provisioning-templates/<template-name>/provision/*"
+ ]
+ }
+ ]
+}
diff --git a/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_fleet_provisioning_template.json b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_fleet_provisioning_template.json
index 78d7fca2a..8418142a4 100644
--- a/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_fleet_provisioning_template.json
+++ b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_fleet_provisioning_template.json
@@ -1,54 +1,54 @@
- {
- "Parameters": {
- "SerialNumber": {
- "Type": "String"
- },
- "AWS::IoT::Certificate::Id": {
- "Type": "String"
- }
- },
- "Resources": {
- "certificate": {
- "Properties": {
- "CertificateId": {
- "Ref": "AWS::IoT::Certificate::Id"
- },
- "Status": "Active"
- },
- "Type": "AWS::IoT::Certificate"
- },
- "policy": {
- "Properties": {
- "PolicyName": "<provisioned-thing-policy>"
- },
- "Type": "AWS::IoT::Policy"
- },
- "thing": {
- "OverrideSettings": {
- "AttributePayload": "MERGE",
- "ThingGroups": "DO_NOTHING",
- "ThingTypeName": "REPLACE"
- },
- "Properties": {
- "AttributePayload": {},
- "ThingGroups": [],
- "ThingName": {
- "Fn::Join": [
- "",
- [
- "fp_demo_",
- {
- "Ref": "SerialNumber"
- }
- ]
- ]
- },
- "ThingTypeName": "fp_demo_things"
- },
- "Type": "AWS::IoT::Thing"
- }
- },
- "DeviceConfiguration": {
- "Foo": "Bar"
- }
- }
+{
+ "Parameters": {
+ "SerialNumber": {
+ "Type": "String"
+ },
+ "AWS::IoT::Certificate::Id": {
+ "Type": "String"
+ }
+ },
+ "Resources": {
+ "certificate": {
+ "Properties": {
+ "CertificateId": {
+ "Ref": "AWS::IoT::Certificate::Id"
+ },
+ "Status": "Active"
+ },
+ "Type": "AWS::IoT::Certificate"
+ },
+ "policy": {
+ "Properties": {
+ "PolicyName": "<provisioned-thing-policy>"
+ },
+ "Type": "AWS::IoT::Policy"
+ },
+ "thing": {
+ "OverrideSettings": {
+ "AttributePayload": "MERGE",
+ "ThingGroups": "DO_NOTHING",
+ "ThingTypeName": "REPLACE"
+ },
+ "Properties": {
+ "AttributePayload": {},
+ "ThingGroups": [],
+ "ThingName": {
+ "Fn::Join": [
+ "",
+ [
+ "fp_demo_",
+ {
+ "Ref": "SerialNumber"
+ }
+ ]
+ ]
+ },
+ "ThingTypeName": "fp_demo_things"
+ },
+ "Type": "AWS::IoT::Thing"
+ }
+ },
+ "DeviceConfiguration": {
+ "Foo": "Bar"
+ }
+}
diff --git a/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_iot_thing_policy.json b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_iot_thing_policy.json
new file mode 100644
index 000000000..15eb8e4ec
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/AWS/Fleet_Provisioning_Windows_Simulator/Fleet_Provisioning_With_CSR_Demo/example_iot_thing_policy.json
@@ -0,0 +1,10 @@
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": "iot:Connect",
+ "Resource": "arn:aws:iot:<aws-region>:<aws-account-id>:*"
+ }
+ ]
+}