You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-manage-device-certificates.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ If your PKI provider provides a `.cer` file, it may contain the same certificate
64
64
* If it's in DER (binary) format, convert it to PEM with `openssl x509 -in cert.cer -out cert.pem`.
65
65
* Use the PEM file as the trust bundle. For more information about the trust bundle, see the next section.
66
66
67
-
## File and directory permissions requirements
67
+
## Permission requirements
68
68
69
69
The following table lists the file and directory permissions required for the IoT Edge certificates. The preferred directory for the certificates is `/var/aziot/certs/` and `/var/aziot/secrets/` for keys.
70
70
@@ -75,6 +75,29 @@ The following table lists the file and directory permissions required for the Io
To create the directories, set the permissions, and set the owner, run the following commands:
79
+
80
+
```bash
81
+
# If the certificate and keys directories don't exist, create, set ownership, and set permissions
82
+
sudo mkdir -p /var/aziot/certs
83
+
sudo chown aziotcs:aziotcs /var/aziot/certs
84
+
sudo chmod 755 /var/aziot/certs
85
+
86
+
sudo mkdir -p /var/aziot/secrets
87
+
sudo chown aziotks:aziotks /var/aziot/secrets
88
+
sudo chmod 700 /var/aziot/secrets
89
+
90
+
# Give aziotcs ownership to certificates
91
+
# Read and write for aziotcs, read-only for others
92
+
sudo chown -R aziotcs:aziotcs /var/aziot/certs
93
+
sudo chmod 644 /var/aziot/certs/*
94
+
95
+
# Give aziotks ownership to private keys
96
+
# Read and write for aziotks, no permission for others
97
+
sudo chown -R aziotks:aziotks /var/aziot/secrets
98
+
sudo chmod 600 /var/aziot/secrets/*
99
+
```
100
+
78
101
## Manage trusted root CA (trust bundle)
79
102
80
103
Using a self-signed certificate authority (CA) certificate as a root of trust with IoT Edge and modules is known as *trust bundle*. The trust bundle is available for IoT Edge and modules to communicate with servers. To configure the trust bundle, specify its file path in the IoT Edge configuration file.
@@ -86,7 +109,7 @@ Using a self-signed certificate authority (CA) certificate as a root of trust wi
86
109
1. Copy the PEM file and give IoT Edge's certificate service access. For example, with `/var/aziot/certs` directory:
87
110
88
111
```bash
89
-
# Make the directory as root if doesn't exist
112
+
# Make the directory if doesn't exist
90
113
sudo mkdir /var/aziot/certs -p
91
114
92
115
# Change cert directory user and group ownership to aziotcs and set permissions
@@ -171,7 +194,7 @@ IoT Edge can use existing certificate and private key files to authenticate or a
171
194
sudo chmod 644 /var/aziot/certs/my-cert.pem
172
195
173
196
# Give aziotks ownership to private key
174
-
# Read and write for aziotks, no permission for other
197
+
# Read and write for aziotks, no permission for others
0 commit comments