Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test-proxy] add disclaimer and specificity to docs #3796

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions tools/test-proxy/documentation/trusting-cert-per-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,29 @@ This will copy the [test proxy certificate](https://github.com/Azure/azure-sdk-f
under `azure-sdk-for-python/.certificate` as a `pem` file.

The only remaining step is to set two environment variables to point to this certificate. The script will output the environment variables and values that you'll
need to set once it finishes running. For example:
```
need to set once it finishes running. For example where `YOUR DIRECTORY` specifies where you've cloned the repo:
```cmd
Set the following certificate paths:
SSL_CERT_DIR=C:\azure-sdk-for-python\.certificate
REQUESTS_CA_BUNDLE=C:\azure-sdk-for-python\.certificate\dotnet-devcert.pem
SSL_CERT_DIR=C:\<YOUR DIRECTORY>\azure-sdk-for-python\.certificate
REQUESTS_CA_BUNDLE=C:\<YOUR DIRECTORY>\azure-sdk-for-python\.certificate\dotnet-devcert.pem
```

Persistently set these environment variables. For example, in a Windows command prompt, use the `SETX` command (not the `SET` command) to set these variables.
Persistently set these environment variables. In a Windows Powershell command prompt as an administrator, use the `SETX` command (not the `SET` command) to set these variables.
Using the example above, you would run:
```cmd
SETX SSL_CERT_DIR "C:\azure-sdk-for-python\.certificate"
SETX REQUESTS_CA_BUNDLE "C:\azure-sdk-for-python\.certificate\dotnet-devcert.pem"
SETX SSL_CERT_DIR "C:\<YOUR DIRECTORY>\azure-sdk-for-python\.certificate"
SETX REQUESTS_CA_BUNDLE "C:\<YOUR DIRECTORY>\azure-sdk-for-python\.certificate\dotnet-devcert.pem"
```

_Disclaimer:_ __A new terminal__ should be started up to make these variables available.
To check if these variables are indeed in the environment,
```powershell
[Environment]::GetEnvironmentVariable('SSL_CERT_DIR')
[Environment]::GetEnvironmentVariable('REQUESTS_CA_BUNDLE')
```
should output your SSL certificate directory and file location path in this new terminal.

A new process should be started up to make these variables available. In a new terminal, running tests with the test proxy should now work with HTTPS requests.
In this and subsequent terminals, with the variables in place, running tests with the test proxy should now work with HTTPS requests.

## Java

Expand Down