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/spring-cloud/spring-cloud-tutorial-custom-domain.md
+49-10Lines changed: 49 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Certificates encrypt web traffic. These TLS/SSL certificates can be stored in Az
16
16
## Prerequisites
17
17
* An application deployed to Azure Spring Cloud (see [Quickstart: Launch an existing Azure Spring Cloud application using the Azure portal](spring-cloud-quickstart-launch-app-portal.md), or use an existing app).
18
18
* A domain name with access to the DNS registry for domain provider such as GoDaddy.
19
-
* A private certificate from a third-party provider. The certificate must match the domain.
19
+
* A private certificate (that is, your self-signed certificate) from a third-party provider. The certificate must match the domain.
20
20
* A deployed instance of [Azure Key Vault](https://docs.microsoft.com/azure/key-vault/key-vault-overview)
21
21
22
22
## Import certificate
@@ -31,20 +31,39 @@ To upload your certificate to key vault:
31
31
1. Under **Password**, enter the private key for your certificate.
> Ensure you grant Azure Spring Cloud access to your key vault before you execute the previous import certificate command. If you haven't, you can execute the following command to grant the access rights.
51
+
52
+
```
53
+
az keyvault set-policy -g <key vault resource group> -n <key vault name> --object-id 938df8e2-2b9d-40b1-940c-c75c33494239 --certificate-permissions get list
54
+
```
55
+
56
+
When you have successfully imported your certificate, you'll see it in the list of **Private Key Certificates**.
Or, you can use the Azure CLI to show a list of certificates:
61
+
62
+
```
63
+
az spring-cloud certificate list
64
+
```
65
+
66
+
> [!IMPORTANT]
48
67
> To secure a custom domain with this certificate, you still need to bind the certificate to a specific domain. Follow the steps in this document under the heading **Add SSL Binding**.
3. Type the fully qualified domain name for which you added a CNAME record, such as www.contoso.com. Make sure that Hostname record type is set to CNAME (<service_name>.azuremicroservices.io)
73
92
4. Click **Validate** to enable the **Add** button.
One app can have multiple domains, but one domain can only map to one app. When you've successfully mapped your custom domain to the app, you'll see it on the custom domain table.
Or, you can use the Azure CLI to show a list of custom domains:
107
+
```
108
+
az spring-cloud app custom-domain list --app <app name>
109
+
```
110
+
111
+
> [!NOTE]
83
112
> A **Not Secure** label for your custom domain means that it's not yet bound to an SSL certificate. Any HTTPS request from a browser to your custom domain will receive an error or warning.
84
113
85
114
## Add SSL binding
86
115
In the custom domain table, select **Add ssl binding** as shown in the previous figure.
0 commit comments