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/cosmos-db/how-to-develop-emulator.md
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,9 +351,9 @@ The Docker (Windows) container image doesn't support the API for MongoDB.
351
351
352
352
::: zone-end
353
353
354
-
## Export the emulator's TLS/SSL certificate
354
+
## Import the emulator's TLS/SSL certificate
355
355
356
-
Export the certificate for the emulator to use the emulator with your preferred developer SDK without disable TLS/SSL on the client.
356
+
Import the emulator's TLS/SSL certificate to use the emulator with your preferred developer SDK without disabling TLS/SSL on the client.
357
357
358
358
::: zone pivot="api-apache-cassandra,api-apache-gremlin,api-table"
359
359
@@ -371,7 +371,7 @@ The Windows local installation of the emulator automatically imports the TLS/SSL
371
371
372
372
### [Docker (Linux container)](#tab/docker-linux)
373
373
374
-
The certificate for the emulator is available in the `_explorer/emulator.pem` path on the running container. Use `curl` to download the certificate from the running container to your local machine.
374
+
The certificate for the emulator is available at the path `_explorer/emulator.pem` on the running container. Use `curl` to download the certificate from the running container to your local machine.
The certificate forthe emulator is availablein the `_explorer/emulator.pem` path on the running container.
394
+
The certificate for the emulator is available at the path `_explorer/emulator.pem` on the running container.
395
395
396
396
1. Use `curl` to download the certificate from the running container to your local machine.
397
397
@@ -418,7 +418,7 @@ The Windows local installation of the emulator automatically imports the TLS/SSL
418
418
419
419
## Connect to the emulator from the SDK
420
420
421
-
Each SDK includes a client class typically used to connect the SDK to your Azure Cosmos DB account. Using the [emulator's credentials](emulator.md#authentication), you can connect the SDK to the emulator instance instead.
421
+
Each SDK includes a client class typically used to connect the SDK to your Azure Cosmos DB account. By using the [emulator's credentials](emulator.md#authentication), you can connect the SDK to the emulator instance instead.
422
422
423
423
::: zone pivot="api-nosql"
424
424
@@ -536,6 +536,40 @@ Use the [Azure Cosmos DB API for NoSQL Python SDK](nosql/quickstart-python.md) t
536
536
>```
537
537
>
538
538
539
+
If you are still facing SSL errors, it is possible that Python is retrieving the certificates from a different certificate store. To determine the path where Python is looking for the certificates, follow these steps:
540
+
>[!IMPORTANT]
541
+
>If you are using a Python **virtual environment** (venv) ensure it is **activated** before running the commands!
542
+
1. Open a terminal
543
+
1. Start the Python interpreter by typing python or python3, depending on your Python version.
544
+
1. In the Python interpreter, run the following commands:
545
+
```python
546
+
from requests.utils import DEFAULT_CA_BUNDLE_PATH
547
+
print(DEFAULT_CA_BUNDLE_PATH)
548
+
```
549
+
550
+
**Inside a virtual environment**, the path may be (at least in Ubuntu):
**Outside of a virtual environment**, the path may be (at least in Ubuntu):
556
+
```bash
557
+
/etc/ssl/certs/ca-certificates.crt
558
+
```
559
+
560
+
1. Once you have identified the DEFAULT_CA_BUNDLE_PATH, open a **new terminal** and run the following commands to append the emulator certificate to the certificate bundle:
561
+
> [!IMPORTANT]
562
+
> If DEFAULT_CA_BUNDLE_PATH variable points to a system directory, you might encounter a **"Permission denied"** error. In this case, you will need to run the commands with elevated privileges (as root).
563
+
>
564
+
```bash
565
+
# Add a new line to the certificate bundle
566
+
echo>> /path/to/ca_bundle
567
+
```
568
+
```bash
569
+
# Append the emulator certificate to the certificate bundle
0 commit comments