Skip to content

Commit 395ccc4

Browse files
committed
update default client id to be mqtt5-sample-*
1 parent d218022 commit 395ccc4

13 files changed

+23
-23
lines changed

samples/mqtt/mqtt5_aws_websocket.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The AWS IAM permission policy associated with the AWS credentials resolved by th
4949
"iot:Connect"
5050
],
5151
"Resource": [
52-
"arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
52+
"arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
5353
]
5454
}
5555
]
@@ -60,7 +60,7 @@ Replace with the following with the data from your AWS account:
6060
* `<region>`: The AWS IoT Core region where you created your AWS IoT Core thing you wish to use with this sample. For example `us-east-1`.
6161
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6262

63-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
63+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
6464

6565
</details>
6666

@@ -92,7 +92,7 @@ required arguments:
9292
--signing_region Signing region for websocket connection (default: None)
9393
9494
optional arguments:
95-
--client_id Client ID (default: mqtt5-sample-809571c8)
95+
--client_id Client ID (default: mqtt5-sample-<uuid>)
9696
--ca_file Path to optional CA bundle (PEM) (default: None)
9797
--topic Topic (default: test/topic)
9898
--message Message payload (default: Hello from mqtt5 sample)

samples/mqtt/mqtt5_custom_auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Below is a sample policy that provides the necessary privileges.
5151
"iot:Connect"
5252
],
5353
"Resource": [
54-
"arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
54+
"arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
5555
]
5656
}
5757
]
@@ -62,7 +62,7 @@ Replace with the following with the data from your AWS account:
6262
* `<region>`: The AWS IoT Core region where you created your AWS IoT Core thing you wish to use with this sample. For example `us-east-1`.
6363
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6464

65-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
65+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
6666

6767
</details>
6868

@@ -121,7 +121,7 @@ required arguments:
121121
--auth_password The password to send when connecting through a custom authorizer (optional) (default: None)
122122
123123
optional arguments:
124-
--client_id Client ID (default: test-f3168b42)
124+
--client_id Client ID (default: mqtt5-sample-<uuid>)
125125
--topic Topic (default: test/topic)
126126
--message Message payload (default: Hello from mqtt5 sample)
127127
--count Messages to publish (0 = infinite) (default: 5)

samples/mqtt/mqtt5_custom_auth_signed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
help="The password to send when connecting through a custom authorizer (optional)")
3434

3535
# Optional Arguments
36-
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"test-{uuid.uuid4().hex[:8]}",
36+
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"mqtt5-sample-{uuid.uuid4().hex[:8]}",
3737
help="Client ID")
3838
optional.add_argument("--topic", default="test/topic", metavar="", dest="input_topic",
3939
help="Topic")

samples/mqtt/mqtt5_custom_auth_unsigned.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
help="The password to send when connecting through a custom authorizer")
2727

2828
# Optional Arguments
29-
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"test-{uuid.uuid4().hex[:8]}",
29+
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"mqtt5-sample-{uuid.uuid4().hex[:8]}",
3030
help="Client ID")
3131
optional.add_argument("--topic", default="test/topic", metavar="", dest="input_topic",
3232
help="Topic")

samples/mqtt/mqtt5_pkcs11_connect.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg
5252
"iot:Connect"
5353
],
5454
"Resource": [
55-
"arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
55+
"arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
5656
]
5757
}
5858
]
@@ -63,7 +63,7 @@ Replace with the following with the data from your AWS account:
6363
* `<region>`: The AWS IoT Core region where you created your AWS IoT Core thing you wish to use with this sample. For example `us-east-1`.
6464
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6565

66-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
66+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
6767

6868
</details>
6969

@@ -111,7 +111,7 @@ optional arguments:
111111
--count Messages to publish (0 = infinite) (default: 5)
112112
--proxy_host HTTP proxy host (default: None)
113113
--proxy_port HTTP proxy port (default: 0)
114-
--client_id Client ID (default: test-548e4344)
114+
--client_id Client ID (default: mqtt5-sample-<uuid>)
115115
```
116116

117117
### Run sample with SoftHSM

samples/mqtt/mqtt5_pkcs11_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
help="HTTP proxy host")
4747
optional.add_argument("--proxy_port", type=int, default=0, metavar="", dest="input_proxy_port",
4848
help="HTTP proxy port")
49-
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"test-{uuid.uuid4().hex[:8]}",
49+
optional.add_argument("--client_id", metavar="", dest="input_clientId", default=f"mqtt5-sample-{uuid.uuid4().hex[:8]}",
5050
help="Client ID")
5151

5252
# args contains all the parsed commandline arguments used by the sample

samples/mqtt/mqtt5_x509.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg
5151
"iot:Connect"
5252
],
5353
"Resource": [
54-
"arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
54+
"arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
5555
]
5656
}
5757
]
@@ -62,7 +62,7 @@ Replace with the following with the data from your AWS account:
6262
* `<region>`: The AWS IoT Core region where you created your AWS IoT Core thing you wish to use with this sample. For example `us-east-1`.
6363
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6464

65-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
65+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
6666

6767
</details>
6868

@@ -96,7 +96,7 @@ required arguments:
9696
--key Path to the private key file to use during mTLS connection establishment (default: None)
9797
9898
optional arguments:
99-
--client_id Client ID (default: mqtt5-sample-5873a450)
99+
--client_id Client ID (default: mqtt5-sample-<uuid>)
100100
--ca_file Path to optional CA bundle (PEM) (default: None)
101101
--topic Topic (default: test/topic)
102102
--message Message payload (default: Hello from mqtt5 sample)

samples/service_clients/fleet_provisioning_basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The [IAM Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-polic
5757
{
5858
"Effect": "Allow",
5959
"Action": "iot:Connect",
60-
"Resource": "arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
60+
"Resource": "arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
6161
}
6262
]
6363
}
@@ -68,7 +68,7 @@ Replace with the following with the data from your AWS account:
6868
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6969
* `<templatename>`: The name of your AWS Fleet Provisioning template you want to use to create new AWS IoT Core Things.
7070

71-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
71+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
7272

7373
</details>
7474

samples/service_clients/fleet_provisioning_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def on_lifecycle_stopped(event: mqtt5.LifecycleStoppedData):
4949
stopped.set_result(True)
5050

5151
connect_options=mqtt5.ConnectPacket(
52-
client_id="test-" + uuid.uuid4().hex,
52+
client_id="mqtt5-sample-" + uuid.uuid4().hex,
5353
)
5454

5555
# Create a mqtt5 connection from the command line data

samples/service_clients/fleet_provisioning_csr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The [IAM Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-polic
5757
{
5858
"Effect": "Allow",
5959
"Action": "iot:Connect",
60-
"Resource": "arn:aws:iot:<b>region</b>:<b>account</b>:client/test-*"
60+
"Resource": "arn:aws:iot:<b>region</b>:<b>account</b>:client/mqtt5-sample-*"
6161
}
6262
]
6363
}
@@ -68,7 +68,7 @@ Replace with the following with the data from your AWS account:
6868
* `<account>`: Your AWS IoT Core account ID. This is the set of numbers in the top right next to your AWS account name when using the AWS IoT Core website.
6969
* `<templatename>`: The name of your AWS Fleet Provisioning template you want to use to create new AWS IoT Core Things.
7070

71-
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `test-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
71+
Note that in a real application, you may want to avoid the use of wildcards in your ClientID or use them selectively. Please follow best practices when working with AWS on production applications using the SDK. Also, for the purposes of this sample, please make sure your policy allows a client ID of `mqtt5-sample-*` to connect or use `--client_id <client ID here>` to send the client ID your policy supports.
7272

7373
</details>
7474

0 commit comments

Comments
 (0)