Skip to content

Commit

Permalink
Merge branch 'release/3.6' into release/3.6-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvayka committed Oct 3, 2023
2 parents 61f2a1e + 6218ca3 commit 19bf067
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 44 deletions.
6 changes: 3 additions & 3 deletions _includes/templates/ssl/certificates-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ ThingsBoard Team has already provisioned a valid certificate for [ThingsBoard Cl
Follow the [MQTT over SSL](/docs/{{docsPrefix}}user-guide/mqtt-over-ssl/) guide to provision server certificate if you are hosting your own ThingsBoard instance.

Once provisioned, you should prepare a certificate chain in pem format. This chain will be used by mqtt client to validate the server certificate.
Save the chain to your working directory as {% if docsPrefix == 'paas/' %}"**tb-cloud-chain.pem**".{% else %}"**tb-server-chain.pem**".{% endif %}
Save the chain to your working directory as {% if docsPrefix == 'paas/' %}"**tb-cloud-root-ca.pem**".{% else %}"**tb-server-chain.pem**".{% endif %}
An example of certificate chain for *mqtt.thingsboard.cloud* is located
{% if docsPrefix == 'paas/' %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem).{% else %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-server-chain.pem).{% endif %}
{% if docsPrefix == 'paas/' %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem).{% else %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-server-chain.pem).{% endif %}

#### Step 2. Generate Client certificate chain

Expand Down Expand Up @@ -200,7 +200,7 @@ Execute the following command to upload temperature readings to ThingsBoard Clou

{% if docsPrefix == 'paas/' %}
```bash
mosquitto_pub --cafile tb-cloud-chain.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
mosquitto_pub --cafile tb-cloud-root-ca.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
-t "v1/devices/me/telemetry" --key deviceKey.pem --cert chain.pem -m {"temperature":25}
```
{: .copy-code}
Expand Down
6 changes: 3 additions & 3 deletions _includes/templates/ssl/certificates-leaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ ThingsBoard Team has already provisioned a valid certificate for [ThingsBoard Cl
Follow the [MQTT over SSL](/docs/{{docsPrefix}}user-guide/mqtt-over-ssl/) guide to provision server certificate if you are hosting your own ThingsBoard instance.

Once provisioned, you should prepare a certificate chain in pem format. This chain will be used by mqtt client to validate the server certificate.
Save the chain to your working directory as {% if docsPrefix == 'paas/' %}"**tb-cloud-chain.pem**".{% else %}"**tb-server-chain.pem**".{% endif %}
Save the chain to your working directory as {% if docsPrefix == 'paas/' %}"**tb-cloud-root-ca.pem**".{% else %}"**tb-server-chain.pem**".{% endif %}
An example of certificate chain for *mqtt.thingsboard.cloud* is located
{% if docsPrefix == 'paas/' %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem).{% else %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-server-chain.pem).{% endif %}
{% if docsPrefix == 'paas/' %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem).{% else %}[here](/docs/paas/user-guide/resources/mqtt-over-ssl/tb-server-chain.pem).{% endif %}

#### Step 2. Generate Client certificate

Expand Down Expand Up @@ -45,7 +45,7 @@ Execute the following command to upload temperature readings to ThingsBoard Clou

{% if docsPrefix == 'paas/' %}
```bash
mosquitto_pub --cafile tb-cloud-chain.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
mosquitto_pub --cafile tb-cloud-root-ca.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
-t "v1/devices/me/telemetry" --key key.pem --cert cert.pem -m {"temperature":25}
```
{: .copy-code}
Expand Down
10 changes: 5 additions & 5 deletions docs/paas/user-guide/access-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ The above command uses **mqtt.thingsboard.cloud** host and **1883** port and req

One-way SSL authentication is a standard authentication mode, where your client device verifies the identity of a server using server certificate.
ThingsBoard Cloud uses a valid certificate.
Please download the certificate chain using this [**link**](/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem)
and save it to your working directory as "**tb-cloud-chain.pem**".
Please download the certificate chain using this [**link**](/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem)
and save it to your working directory as "**tb-cloud-root-ca.pem**".

```bash
wget https://thingsboard.io/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem
wget https://thingsboard.io/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem
```
{: .copy-code}

Now you may use the *tb-cloud-chain.pem* to setup secure connection to ThingsBoard Cloud and Access Token *YOUR_ACCESS_TOKEN* to authenticate the device to upload telemetry:
Now you may use the *tb-cloud-root-ca.pem* to setup secure connection to ThingsBoard Cloud and Access Token *YOUR_ACCESS_TOKEN* to authenticate the device to upload telemetry:

```bash
mosquitto_pub --cafile tb-cloud-chain.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" -t "v1/devices/me/telemetry" -u "YOUR_ACCESS_TOKEN" -m {"temperature":25}
mosquitto_pub --cafile tb-cloud-root-ca.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" -t "v1/devices/me/telemetry" -u "YOUR_ACCESS_TOKEN" -m {"temperature":25}
```
{: .copy-code}

Expand Down
10 changes: 5 additions & 5 deletions docs/paas/user-guide/basic-mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ The above command uses **mqtt.thingsboard.cloud** host and **1883** port and req

One-way SSL authentication is a standard authentication mode, where your client device verifies the identity of a server using server certificate.
ThingsBoard Cloud uses a valid certificate.
Please download the certificate chain using this [**link**](/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem)
and save it to your working directory as "**tb-cloud-chain.pem**".
Please download the certificate chain using this [**link**](/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem)
and save it to your working directory as "**tb-cloud-root-ca.pem**".

```bash
wget https://thingsboard.io/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem
wget https://thingsboard.io/docs/{{docsPrefix}}user-guide/resources/mqtt-over-ssl/tb-cloud-root-ca.pem
```
{: .copy-code}

Now you may use the *tb-cloud-chain.pem* to setup secure connection to ThingsBoard Cloud and Access Token *YOUR_ACCESS_TOKEN* to authenticate the device to upload telemetry:
Now you may use the *tb-cloud-root-ca.pem* to setup secure connection to ThingsBoard Cloud and Access Token *YOUR_ACCESS_TOKEN* to authenticate the device to upload telemetry:

```bash
mosquitto_pub --cafile tb-cloud-chain.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
mosquitto_pub --cafile tb-cloud-root-ca.pem -d -q 1 -h "mqtt.thingsboard.cloud" -p "8883" \
-t "v1/devices/me/telemetry" -i "YOUR_CLIENT_ID" -u "YOUR_CLIENT_USERNAME" -P "YOUR_CLIENT_PASSWORD" -m {"temperature":25}
```
{: .copy-code}
Expand Down
52 changes: 26 additions & 26 deletions docs/paas/user-guide/resources/mqtt-over-ssl/tb-cloud-chain.pem
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIE1TCCBHqgAwIBAgIQX2BRt4b7Vf7RFUtkaHq4njAKBggqhkjOPQQDAjCBjzEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQDEy5T
ZWN0aWdvIEVDQyBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENBMB4X
DTIyMDkxNTAwMDAwMFoXDTIzMTAxNjIzNTk1OVowHjEcMBoGA1UEAwwTKi50aGlu
Z3Nib2FyZC5jbG91ZDB2M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aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def collect_required_data():
"Please write path to your server public certificate or leave it blank to use default (mqttserver.pub.pem): ")
config["ca_cert"] = ca_cert if ca_cert else "mqttserver.pub.pem"
else:
config["ca_cert"] = "tb-cloud-chain.pem"
config["ca_cert"] = "tb-cloud-root-ca.pem"
token = ""
while not token:
token = input("Please write accessToken for device: ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def collect_required_data():
"Please write path to your server public certificate or leave it blank to use default (mqttserver.pub.pem): ")
config["ca_cert"] = ca_cert if ca_cert else "mqttserver.pub.pem"
else:
config["ca_cert"] = "tb-cloud-chain.pem"
config["ca_cert"] = "tb-cloud-root-ca.pem"
token = ""
while not token:
token = input("Please write accessToken for device: ")
Expand Down

0 comments on commit 19bf067

Please sign in to comment.