Skip to content

Commit f6717bc

Browse files
authored
Merge pull request #102863 from SnehaGunda/PrivateLinks
Adding image border
2 parents 56c00ea + b32b31b commit f6717bc

File tree

2 files changed

+36
-20
lines changed

2 files changed

+36
-20
lines changed

articles/cosmos-db/local-emulator.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -436,31 +436,47 @@ Microsoft.Azure.Cosmos.Emulator.exe /AllowNetworkAccess /Key=C2y6yDjf5/R+ob0N8A7
436436
437437
Finally, we need to import the Emulator CA certificate into the Linux or Mac environment.
438438
439+
### Linux
440+
439441
If you are working on Linux, .NET relays on OpenSSL to do the validation:
440442
441443
1. [Export the certificate in PFX format](./local-emulator-export-ssl-certificates.md#how-to-export-the-azure-cosmos-db-ssl-certificate) (PFX is available when choosing to export the private key).
442-
2. Copy that PFX file into your Linux environment.
443-
3. Convert the PFX file into a CRT file
444-
```bash
445-
openssl pkcs12 -in YourPFX.pfx -clcerts -nokeys -out YourCTR.crt
446-
```
447-
4. Copy the CRT file to the folder that contains custom certificates in your Linux distribution. Commonly on Debian distributions, it is located on `/usr/local/share/ca-certificates/`.
448-
```bash
449-
cp YourCTR.crt /usr/local/share/ca-certificates/
450-
```
451-
5. Update the CA certificates, which will update the `/etc/ssl/certs/` folder.
452-
```bash
453-
update-ca-certificates
454-
```
455444
456-
If you are working on Mac:
445+
1. Copy that PFX file into your Linux environment.
457446
458-
1. [Export the certificate in PFX format](./local-emulator-export-ssl-certificates.md#how-to-export-the-azure-cosmos-db-ssl-certificate) (PFX is available when choosing to export the private key).
459-
2. Copy that PFX file into your Mac environment.
460-
3. Open the *Keychain Access* application and import the PFX file.
461-
4. Open the list of Certificates and identify the one with the name `localhost`.
462-
5. Open the context menu for that particular item, select *Get Item* and under *Trust* > *When using this certificate* option, select *Always Trust*.
463-
![Open the context menu for that particular item, select Get Item and under Trust - When using this certificate option, select Always Trust](./media/local-emulator/mac-trust-certificate.png)
447+
1. Convert the PFX file into a CRT file
448+
449+
```bash
450+
openssl pkcs12 -in YourPFX.pfx -clcerts -nokeys -out YourCTR.crt
451+
```
452+
453+
1. Copy the CRT file to the folder that contains custom certificates in your Linux distribution. Commonly on Debian distributions, it is located on `/usr/local/share/ca-certificates/`.
454+
455+
```bash
456+
cp YourCTR.crt /usr/local/share/ca-certificates/
457+
```
458+
459+
1. Update the CA certificates, which will update the `/etc/ssl/certs/` folder.
460+
461+
```bash
462+
update-ca-certificates
463+
```
464+
465+
### Mac OS
466+
467+
Use the following steps if you are working on Mac:
468+
469+
1. [Export the certificate in PFX format](./local-emulator-export-ssl-certificates.md#how-to-export-the-azure-cosmos-db-ssl-certificate) (PFX is available when choosing to export the private key).
470+
471+
1. Copy that PFX file into your Mac environment.
472+
473+
1. Open the *Keychain Access* application and import the PFX file.
474+
475+
1. Open the list of Certificates and identify the one with the name `localhost`.
476+
477+
1. Open the context menu for that particular item, select *Get Item* and under *Trust* > *When using this certificate* option, select *Always Trust*.
478+
479+
![Open the context menu for that particular item, select Get Item and under Trust - When using this certificate option, select Always Trust](./media/local-emulator/mac-trust-certificate.png)
464480
465481
After following these steps, your environment will trust the certificate used by the Emulator when connecting to the IP address exposes by `/AllowNetworkAccess`.
466482
-59.2 KB
Loading

0 commit comments

Comments
 (0)