[Documentation] Markdown improvements f to m (#13866)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
This commit is contained in:
committed by
GitHub
parent
3c236b3103
commit
0e68936663
@@ -1,12 +1,14 @@
|
||||
# Xtend Examples
|
||||
|
||||
## Secure connection
|
||||
|
||||
In a first example a very secure connection to a broker is defined. It pins the returned certificate and public key.
|
||||
If someone tries a man in the middle attack later on, this broker connection will recognize it and refuse a connection.
|
||||
Be aware that if your brokers certificate changes, you need to remove the connection entry and add it again.
|
||||
Be aware that if your brokers certificate changes, you need to remove the connection entry and add it again.
|
||||
|
||||
`mqttConnections.things`:
|
||||
|
||||
```xtend
|
||||
```java
|
||||
mqtt:broker:mySecureBroker [ host="192.168.0.41", secure=true, certificatepin=true, publickeypin=true ]
|
||||
```
|
||||
|
||||
@@ -16,7 +18,7 @@ The second connection is a plain, unsecured one. Unsecure connections are defaul
|
||||
|
||||
`mqttConnections.things`:
|
||||
|
||||
```xtend
|
||||
```java
|
||||
mqtt:broker:myUnsecureBroker [ host="192.168.0.42", secure=false ]
|
||||
```
|
||||
|
||||
@@ -28,20 +30,19 @@ The credentials are plain values on the wire, therefore you should only use this
|
||||
|
||||
`mqttConnections.things`:
|
||||
|
||||
```xtend
|
||||
```java
|
||||
mqtt:broker:myAuthentificatedBroker [ host="192.168.0.43", secure=false, username="user", password="password" ]
|
||||
```
|
||||
|
||||
|
||||
## Public key pinning
|
||||
|
||||
In a fourth connection, the public key pinning is enabled again.
|
||||
This time, a public key hash is provided to pin the connection to a specific server.
|
||||
It follows the form "hashname:hashvalue". Valid *hashnames* are SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 and all others listed
|
||||
It follows the form "hashname:hashvalue". Valid _hashnames_ are SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 and all others listed
|
||||
in [Java MessageDigest Algorithms](https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#messagedigest-algorithms).
|
||||
|
||||
`mqttConnections.things`:
|
||||
|
||||
```xtend
|
||||
```java
|
||||
mqtt:broker:pinToPublicKey [ host="192.168.0.44", secure=true, publickeypin=true, publickey="SHA-256:9a6f30e67ae9723579da2575c35daf7da3b370b04ac0bde031f5e1f5e4617eb8" ]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user