Skip to content

Commit 53d37b0

Browse files
committed
adding code snippet and edits
1 parent 2a2121d commit 53d37b0

File tree

7 files changed

+39
-23
lines changed

7 files changed

+39
-23
lines changed

articles/defender-for-iot/organizations/how-to-deploy-certificates.md

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Create SSL/TLS certificates by first downloading a security certificate from the
3737

3838
1. After [installing your OT sensor software](ot-deploy/install-software-ot-sensor.md) or [on-premises management console](ot-deploy/install-software-on-premises-management-console.md), go to the sensor's or on-premises management console's IP address in a browser.
3939

40-
1. Select the :::image type="icon" source="media/how-to-activate-and-set-up-your-sensor/warning-icon.png" border="false"::: **Not secure** alert in the address bar of your web browser, then select the **>** icon next to the warning message **"Your connection to this site isn't secure"**. For example:
40+
1. Select the :::image type="icon" source="media/how-to-deploy-certificates/warning-icon.png" border="false"::: **Not secure** alert in the address bar of your web browser, then select the **>** icon next to the warning message **"Your connection to this site isn't secure"**. For example:
4141

42-
:::image type="content" source="media/how-to-activate-and-set-up-your-sensor/connection-is-not-secure.png" alt-text="Screenshot of web page with a Not secure warning in the address bar." lightbox="media/how-to-activate-and-set-up-your-sensor/connection-is-not-secure.png":::
42+
:::image type="content" source="media/how-to-deploy-certificates/connection-is-not-secure.png" alt-text="Screenshot of web page with a Not secure warning in the address bar." lightbox="media/how-to-activate-and-set-up-your-sensor/connection-is-not-secure.png":::
4343

44-
1. Select the :::image type="icon" source="media/how-to-activate-and-set-up-your-sensor/show-certificate-icon.png" border="false"::: **Show certificate** icon to view the security certificate for this website.
44+
1. Select the :::image type="icon" source="media/how-to-deploy-certificates/show-certificate-icon.png" border="false"::: **Show certificate** icon to view the security certificate for this website.
4545

4646
1. In the **Certificate viewer** pane, select the **Details** tab, then select **Export** to save the file on your local machine.
4747

@@ -67,9 +67,8 @@ For example:
6767

6868
> [!NOTE]
6969
> You may need to convert existing files types to supported types.
70-
> For more information, see [Convert existing files to supported files](#convert-existing-files-to-supported-files).
7170
72-
### Verify certificate file parameter requirements
71+
## Verify certificate file parameter requirements
7372

7473
Verify that the certificates meet the following requirements:
7574

@@ -127,7 +126,7 @@ After creating your certificate, import it to a trusted storage location. For ex
127126

128127
1. Select **Place all certificates in the following store**, then **Browse**, and then select the **Trusted Root Certification Authorities** store. When you're done, select **Next**. For example:
129128

130-
:::image type="content" source="media/how-to-activate-and-set-up-your-sensor/certificate-store-trusted-root.png" alt-text="Screenshot of the certificate store screen where you can browse to the trusted root folder." lightbox="media/how-to-activate-and-set-up-your-sensor/certificate-store-trusted-root.png":::
129+
:::image type="content" source="media/how-to-deploy-certificates/certificate-store-trusted-root.png" alt-text="Screenshot of the certificate store screen where you can browse to the trusted root folder." lightbox="media/how-to-activate-and-set-up-your-sensor/certificate-store-trusted-root.png":::
131130

132131
1. Select **Finish** to complete the import.
133132

@@ -138,9 +137,39 @@ Use the following procedures to test certificates before deploying them to your
138137
### Check your certificate against a sample
139138

140139
Use the following sample certificate to compare to the certificate you've created, making sure that the same fields exist in the same order.
141-
<!--is there anyway we can get this in code instead of in an image?-->
142140

143-
:::image type="content" source="media/how-to-deploy-certificates/sample-certificate.png" alt-text="Screenshot of a sample certificate.":::
141+
``` Sample SSL certificate
142+
Bag Attributes: <No Attributes>
143+
subject=C = US, S = Illinois, L = Springfield, O = Contoso Ltd, OU= Contoso Labs, CN= sensor.contoso.com, E
144+
145+
issuer C=US, S = Illinois, L = Springfield, O = Contoso Ltd, OU= Contoso Labs, CN= Cert-ssl-root-da2e22f7-24af-4398-be51-
146+
e4e11f006383, E = [email protected]
147+
-----BEGIN CERTIFICATE-----
148+
MIIESDCCAZCgAwIBAgIIEZK00815Dp4wDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNV
149+
BAYTAIVTMREwDwYDVQQIDAhJbGxpbm9pczEUMBIGA1UEBwwLU3ByaW5nZmllbGQx
150+
FDASBgNVBAoMCONvbnRvc28gTHRKMRUWEwYDVQQLDAXDb250b3NvIExhYnMxGzAZ
151+
BgNVBAMME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yv
167+
9x9hu7R4yBh3K99ILjX9H+KACvfDUehxR/ljvthoOZLalsqZIPnRD/ri/UtbpWtB
168+
cfvmYleYA/zq3xdk4vfOI0YTOW11qjNuBIHh0d5S5sn+VhhjHL/s3MFaScWOQU3G
169+
9ju6mQSo0R1F989aWd+44+8WhtOEjxBvr+17CLqHsmbCmqBI7qVnj5dHvkh0Bplw
170+
zhJp150DfUzXY+2sV7Uqnel9aEU2Hlc/63EnaoSrxx6TEYYT/rPKSYL+++8=
171+
-----END CERTIFICATE-----
172+
```
144173

145174
### Test certificates without a `.csr` or private key file
146175

@@ -162,15 +191,15 @@ If these tests fail, review [certificate file parameter requirements](#verify-ce
162191

163192
1. Select the error message to expand it, and then copy the string next to **Subject**. For example:
164193

165-
:::image type="content" source="media/how-to-activate-and-set-up-your-sensor/connection-is-not-private-subject.png" alt-text="Screenshot of the connection isn't private screen with the details expanded." lightbox="media/how-to-activate-and-set-up-your-sensor/connection-is-not-private-subject.png":::
194+
:::image type="content" source="media/how-to-deploy-certificates/connection-is-not-private-subject.png" alt-text="Screenshot of the connection isn't private screen with the details expanded." lightbox="media/how-to-activate-and-set-up-your-sensor/connection-is-not-private-subject.png":::
166195

167196
The subject string should match the **CN** string in the security certificate's details.
168197

169198
1. In your local file explorer, browse to the hosts file, such as at **This PC > Local Disk (C:) > Windows > System32 > drivers > etc**, and open the **hosts** file.
170199

171200
1. In the hosts file, add in a line at the end of document with the sensor's IP address and the SSL certificate's common name that you copied in the previous steps. When you're done, save the changes. For example:
172201

173-
:::image type="content" source="media/how-to-activate-and-set-up-your-sensor/hosts-file.png" alt-text="Screenshot of the hosts file." lightbox="media/how-to-activate-and-set-up-your-sensor/hosts-file.png":::
202+
:::image type="content" source="media/how-to-deploy-certificates/hosts-file.png" alt-text="Screenshot of the hosts file." lightbox="media/how-to-activate-and-set-up-your-sensor/hosts-file.png":::
174203

175204
## Deploy an SSL/TLS certificate
176205

@@ -201,19 +230,6 @@ After you've created your SSL/TLS certificate as required and have it installed
201230

202231
1. Select **Save** to save your certificate settings.
203232

204-
## Convert existing files to supported files
205-
206-
Use the following CLI commands to convert existing certificate files to supported formats: <!--is this really specific to defender for IoT or generic to certificate support? I'm not sure this should be in our docs at all.-->
207-
208-
|**Description** | **CLI command** |
209-
|--|--|
210-
| Convert .crt file to .pem file | `openssl x509 -inform PEM -in <full path>/<pem-file-name>.crt -out <fullpath>/<crt-file-name>.pem` |
211-
| Convert .pem file to .crt file | `openssl x509 -inform PEM -in <full path>/<pem-file-name>.pem -out <fullpath>/<crt-file-name>.crt` |
212-
| Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to .pem | `openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes`. You can add -nocerts to only output the private key, or add -nokeys to only output the certificates. |
213-
| Convert .cer file to .crt file | `openssl x509 -inform PEM -in <filepath>/certificate.cer -out certificate.crt` <br> Make sure to specify the full path. <br><br> **Note**: Other options are available for the -inform flag. The value is usually `DER` or `PEM` but might also be `P12` or another value. For more information, see [`openssl-format-options`]( https://www.openssl.org/docs/manmaster/man1/openssl-format-options.html) and [openssl-x509]( https://www.openssl.org/docs/manmaster/man1/openssl-x509.html). |
214-
215-
Your file conversion may create an invalid certificate, such as with an inaccurate structure. If the conversion fails, make sure your [required parameters](#verify-certificate-file-parameter-requirements) are correct or consult your certificate specialist.
216-
217233
## Troubleshoot certificate upload errors
218234

219235
You won't be able to upload certificates to your OT sensors or on-premises management consoles if the certificates aren't created properly or are invalid. Use the following table to understand how to take action if your certificate upload fails and an error message is shown:
428 KB
Loading
586 KB
Loading
341 KB
Loading
63.4 KB
Loading
1.01 KB
Loading
640 Bytes
Loading

0 commit comments

Comments
 (0)