Skip to content

Commit

Permalink
Fix sample command for PFX cert/pwd (#2314)
Browse files Browse the repository at this point in the history
* Fix sample command for PFX cert/pwd

* Update README.md
  • Loading branch information
pauljewellmsft authored Dec 8, 2023
1 parent 105a9cd commit d2fed27
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,19 @@ This tells Azurite to store all data in a particular directory `c:\azurite`. If
For example, to start blob service only:

```bash
$ azurite-blob -l path/to/azurite/workspace
azurite-blob -l path/to/azurite/workspace
```

Start queue service only:

```bash
$ azurite-queue -l path/to/azurite/workspace
azurite-queue -l path/to/azurite/workspace
```

Start table service only:

```bash
$ azurite-table -l path/to/azurite/workspace
azurite-table -l path/to/azurite/workspace
```

### Visual Studio Code Extension
Expand Down Expand Up @@ -207,7 +207,7 @@ Following extension configurations are supported:

#### Run Azurite V3 docker image

> Note. Find more docker images tags in https://mcr.microsoft.com/v2/azure-storage/azurite/tags/list
> Note. Find more docker images tags in <https://mcr.microsoft.com/v2/azure-storage/azurite/tags/list>
```bash
docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite
Expand Down Expand Up @@ -558,7 +558,7 @@ You have a few options to generate PEM certificate and key files. We'll show you

###### Generate Certificate and Key with mkcert

1. Install mkcert: https://github.com/FiloSottile/mkcert#installation. We like to use choco `choco install mkcert`, but you can install with any mechanism you'd like.
1. Install mkcert: <https://github.com/FiloSottile/mkcert#installation>. We like to use choco `choco install mkcert`, but you can install with any mechanism you'd like.
2. Run the following commands to install the Root CA and generate a cert for Azurite.

```bash
Expand Down Expand Up @@ -589,7 +589,7 @@ docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 -v c:/azurite:/workspace

###### Install OpenSSL on Windows

1. Download and install the OpenSSL v1.1.1a+ EXE from http://slproweb.com/products/Win32OpenSSL.html
1. Download and install the OpenSSL v1.1.1a+ EXE from <http://slproweb.com/products/Win32OpenSSL.html>
2. Set the following environment variables

```bash
Expand Down Expand Up @@ -639,14 +639,14 @@ You can use the following command to generate a PFX file with `dotnet dev-certs`
dotnet dev-certs https --trust -ep cert.pfx -p <password>
```

> Storage Explorer does not currently work with certificates produced by `dotnet dev-certs`. While you can use them for Azurite and Azure SDKs, you won't be able to access the Azurite endpoints with Storage Explorer if you are using the certs created with dotnet dev-certs. We are tracking this issue on GitHub here: https://github.com/microsoft/AzureStorageExplorer/issues/2859
> Storage Explorer does not currently work with certificates produced by `dotnet dev-certs`. While you can use them for Azurite and Azure SDKs, you won't be able to access the Azurite endpoints with Storage Explorer if you are using the certs created with dotnet dev-certs. We are tracking this issue on GitHub here: <https://github.com/microsoft/AzureStorageExplorer/issues/2859>
#### Start Azurite with HTTPS and PFX

Then you start Azurite with that cert and key.
Then you start Azurite with that cert and password.

```bash
azurite --cert cert.pem --key key.pem
azurite --cert cert.pfx --pwd pfxpassword
```

NOTE: If you are using the Azure SDKs, then you will also need to pass the `--oauth basic` option.
Expand Down Expand Up @@ -775,7 +775,7 @@ By default Storage Explorer will not open an HTTPS endpoint that uses a self-sig
1. Find the certificate on your local machine.
- **OpenSSL**: You can find the PEM file at the location you created in the [HTTPS Setup](#https-setup) section above.
- **mkcert**: You need to import the RootCA.pem file, which can be found by executing this command in the terminal: `mkcert -CAROOT`. For mkcert, you want to import the RootCA.pem file, not the certificate file you created.
- **dotnet dev-certs**: Storage Explorer doesn't currently work with certs produced by `dotnet dev-certs`. We are tracking this issue on GitHub here: https://github.com/microsoft/AzureStorageExplorer/issues/2859
- **dotnet dev-certs**: Storage Explorer doesn't currently work with certs produced by `dotnet dev-certs`. We are tracking this issue on GitHub here: <https://github.com/microsoft/AzureStorageExplorer/issues/2859>
2. Open Storage Explorer -> Edit -> SSL Certificates -> Import Certificates and import your certificate.

If you do not set this, then you will get the following error:
Expand Down Expand Up @@ -891,9 +891,9 @@ DefaultEndpointsProtocol=http;AccountName=account1;AccountKey=key1;BlobEndpoint=

> Note. Do not access default account in this way with Azure Storage Explorer. There is a bug that Storage Explorer is always adding account name in URL path, causing failures.
> Note. When use Production-style URL to access Azurite, by default the account name should be the host name in FQDN, like "http://devstoreaccount1.blob.localhost:10000/container". To use Production-style URL with account name in URL path, like "http://foo.bar.com:10000/devstoreaccount1/container", please start Azurite with `--disableProductStyleUrl`.
> Note. When use Production-style URL to access Azurite, by default the account name should be the host name in FQDN, like "<http://devstoreaccount1.blob.localhost:10000/container>". To use Production-style URL with account name in URL path, like "<http://foo.bar.com:10000/devstoreaccount1/container>", please start Azurite with `--disableProductStyleUrl`.
> Note. If use "host.docker.internal" as request Uri host, like "http://host.docker.internal:10000/devstoreaccount1/container", Azurite will always get account name from request Uri path, not matter Azurite start with `--disableProductStyleUrl` or not.
> Note. If use "host.docker.internal" as request Uri host, like "<http://host.docker.internal:10000/devstoreaccount1/container>", Azurite will always get account name from request Uri path, not matter Azurite start with `--disableProductStyleUrl` or not.
### Scalability & Performance

Expand Down

0 comments on commit d2fed27

Please sign in to comment.