Skip to content

Commit fccf8ca

Browse files
authored
Merge pull request #230720 from cebundy/wps-howto-akv-private-endpoints
[Web PubSub] freshness reviews for private endpoints and custom domain how-to
2 parents 5bfa586 + 025fc23 commit fccf8ca

File tree

6 files changed

+181
-137
lines changed

6 files changed

+181
-137
lines changed

articles/azure-web-pubsub/howto-custom-domain.md

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,48 @@ titleSuffix: Azure Web PubSub Service
44
description: How to configure a custom domain for Azure Web PubSub Service
55
author: ArchangelSDY
66
ms.service: azure-web-pubsub
7-
ms.topic: article
8-
ms.date: 07/07/2022
7+
ms.topic: how-to
8+
ms.date: 03/30/2023
99
ms.author: dayshen
1010
---
1111

1212
# Configure a custom domain for Azure Web PubSub Service
1313

14-
In addition to the default domain provided Azure Web PubSub Service, you can also add custom domains.
14+
In addition to the default domain provided by the Azure Web PubSub Service, you can also add a custom domain. A custom domain is a domain name that you own and manage. You can use a custom domain to access your Azure Web PubSub Service resource. For example, you can use `contoso.example.com` instead of `contoso.webpubsub.azure.com` to access your Azure Web PubSub Service resource.
1515

1616
## Prerequisites
1717

18-
* Resource must be Premium tier
19-
* A custom certificate matching custom domain is stored in Azure Key Vault
18+
* An Azure account with an active subscription. If you don't have an Azure account, you can [create an account for free](https://azure.microsoft.com/free/).
19+
* An Azure Web PubSub service (must be Premium tier).
20+
* An Azure Key Vault resource.
21+
* A custom certificate matching custom domain that is stored in Azure Key Vault.
2022

2123
## Add a custom certificate
2224

23-
Before you can add a custom domain, you need add a matching custom certificate first. A custom certificate is a sub resource of your Azure Web PubSub Service. It references a certificate in your Azure Key Vault. For security and compliance reasons, Azure Web PubSub Service doesn't permanently store your certificate. Instead it fetches it from your Key Vault on the fly and keeps it in memory.
25+
Before you can add a custom domain, you need to add a matching custom certificate first. A custom certificate is a resource of your Azure Web PubSub Service. It references a certificate in your Azure Key Vault. For security and compliance reasons, Azure Web PubSub Service doesn't permanently store your certificate. Instead it fetches it from your Key Vault on the fly and keeps it in memory.
2426

2527
### Step 1: Grant your Azure Web PubSub Service resource access to Key Vault
2628

2729
Azure Web PubSub Service uses Managed Identity to access your Key Vault. In order to authorize, it needs to be granted permissions.
2830

2931
1. In the Azure portal, go to your Azure Web PubSub Service resource.
3032
1. In the menu pane, select **Identity**.
31-
1. Turn on either **System assigned** or **User assigned** identity. Click **Save**.
33+
1. You can select **System assigned** or **User assigned** identity. If you want to use **User assigned** identity, you need to create one first.
34+
1. To add a System assigned identity
35+
1. Select **On**.
36+
1. Select **Yes** to confirm.
37+
1. Select **Save**.
3238

33-
:::image type="content" alt-text="Screenshot of enabling managed identity." source="media\howto-custom-domain\portal-identity.png" :::
39+
:::image type="content" alt-text="Screenshot of enabling system assigned managed identity." source="media\howto-custom-domain\portal-identity.png" :::
40+
41+
1. To add a User assigned identity;
42+
1. Select **Add user assigned managed identity**.
43+
1. Select an existing identity.
44+
1. Select **Add**.
45+
46+
:::image type="content" alt-text="Screenshot of enabling user assigned managed identity." source="media\howto-custom-domain\portal-user-assigned-identity.png" :::
47+
48+
1. Select **Save**.
3449

3550
Depending on how you configure your Key Vault permission model, you may need to grant permissions at different places.
3651

@@ -41,17 +56,23 @@ If you're using Key Vault built-in access policy as Key Vault permission model:
4156
:::image type="content" alt-text="Screenshot of built-in access policy selected as Key Vault permission model." source="media\howto-custom-domain\portal-key-vault-perm-model-access-policy.png" :::
4257

4358
1. Go to your Key Vault resource.
44-
1. In the menu pane, select **Access configuration**. Click **Go to access policies**.
45-
1. Click **Create**. Select **Secret Get** permission and **Certificate Get** permission. Click **Next**.
59+
1. In the menu pane, select **Access configuration**.
60+
1. Select **Vault access policy**.
61+
1. Select **Go to access policies**.
62+
1. Select **Create**.
63+
1. Select **Secret Get** permission.
64+
1. Select **Certificate Get** permission.
65+
1. Select **Next**.
4666

4767
:::image type="content" alt-text="Screenshot of permissions selection in Key Vault." source="media\howto-custom-domain\portal-key-vault-permissions.png" :::
4868

49-
1. Search for the Azure Web PubSub Service resource name or the user assigned identity name. Click **Next**.
69+
1. Search for the Azure Web PubSub Service resource name.
70+
1. Select **Next**.
5071

5172
:::image type="content" alt-text="Screenshot of principal selection in Key Vault." source="media\howto-custom-domain\portal-key-vault-principal.png" :::
5273

53-
1. Skip **Application (optional)**. Click **Next**.
54-
1. In **Review + create**, click **Create**.
74+
1. Select **Next** on the **Application** tab.
75+
1. Select **Create**.
5576

5677
#### [Azure role-based access control](#tab/azure-rbac)
5778

@@ -60,39 +81,41 @@ If you're using Azure role-based access control as Key Vault permission model:
6081
:::image type="content" alt-text="Screenshot of Azure RBAC selected as Key Vault permission model." source="media\howto-custom-domain\portal-key-vault-perm-model-rbac.png" :::
6182

6283
1. Go to your Key Vault resource.
63-
1. In the menu pane, select **Access control (IAM)**.
64-
1. Click **Add**. Select **Add role assignment**.
84+
1. Select **Go to access control (IAM)** from the menu.
85+
1. Select **Add**, then select **Add role assignment** fro the drop-down.
6586

6687
:::image type="content" alt-text="Screenshot of Key Vault IAM." source="media\howto-custom-domain\portal-key-vault-iam.png" :::
6788

68-
1. Under the **Role** tab, select **Key Vault Secrets User**. Click **Next**.
89+
1. Under the **Role** tab, select **Key Vault Secrets User**. Select **Next**.
6990

7091
:::image type="content" alt-text="Screenshot of role tab when adding role assignment to Key Vault." source="media\howto-custom-domain\portal-key-vault-role.png" :::
7192

72-
1. Under the **Members** tab, select **Managed identity**. 1. Search for the Azure Web PubSub Service resource name or the user assigned identity name. Click **Next**.
93+
1. Under the **Members** tab, select **Managed identity**.
94+
1. Search for and **Select** the Azure Web PubSub Service resource name or the user assigned identity name.
7395

7496
:::image type="content" alt-text="Screenshot of members tab when adding role assignment to Key Vault." source="media\howto-custom-domain\portal-key-vault-members.png" :::
7597

76-
1. Click **Review + assign**.
98+
1. Select **Next**.
99+
1. Select **Review + assign**.
77100

78101
-----
79102

80103
### Step 2: Create a custom certificate
81104

82105
1. In the Azure portal, go to your Azure Web PubSub Service resource.
83106
1. In the menu pane, select **Custom domain**.
84-
1. Under **Custom certificate**, click **Add**.
107+
1. In the **Custom certificate** section, select **Add**.
85108

86109
:::image type="content" alt-text="Screenshot of custom certificate management." source="media\howto-custom-domain\portal-custom-certificate-management.png" :::
87110

88111
1. Fill in a name for the custom certificate.
89-
1. Click **Select from your Key Vault** to choose a Key Vault certificate. After selection the following **Key Vault Base URI**, **Key Vault Secret Name** should be automatically filled. Alternatively you can also fill in these fields manually.
112+
1. Select **Select from your Key Vault** to choose a Key Vault certificate. After selection the following **Key Vault Base URI**, the **Key Vault Secret Name** will be automatically filled in. Alternatively you can also fill in these fields manually.
90113
1. Optionally, you can specify a **Key Vault Secret Version** if you want to pin the certificate to a specific version.
91-
1. Click **Add**.
114+
1. Select **Add**.
92115

93116
:::image type="content" alt-text="Screenshot of adding a custom certificate." source="media\howto-custom-domain\portal-custom-certificate-add.png" :::
94117

95-
Azure Web PubSub Service will then fetch the certificate and validate its content. If everything is good, the **Provisioning State** will be **Succeeded**.
118+
Azure Web PubSub Service fetches the certificate and validates its contents. When it succeeds, the certificate's **Provisioning State** will be **Succeeded**.
96119

97120
:::image type="content" alt-text="Screenshot of an added custom certificate." source="media\howto-custom-domain\portal-custom-certificate-added.png" :::
98121

@@ -102,11 +125,11 @@ To validate the ownership of your custom domain, you need to create a CNAME reco
102125

103126
For example, if your default domain is `contoso.webpubsub.azure.com`, and your custom domain is `contoso.example.com`, you need to create a CNAME record on `example.com` like:
104127

105-
```
128+
```plaintext
106129
contoso.example.com. 0 IN CNAME contoso.webpubsub.azure.com.
107130
```
108131

109-
If you're using Azure DNS Zone, see [manage DNS records](../dns/dns-operations-recordsets-portal.md) for how to add a CNAME record.
132+
If you're using Azure DNS Zone, see [manage DNS records](../dns/dns-operations-recordsets-portal.md) to learn how to add a CNAME record.
110133

111134
:::image type="content" alt-text="Screenshot of adding a CNAME record in Azure DNS Zone." source="media\howto-custom-domain\portal-dns-cname.png" :::
112135

@@ -118,14 +141,14 @@ A custom domain is another sub resource of your Azure Web PubSub Service. It con
118141

119142
1. In the Azure portal, go to your Azure Web PubSub Service resource.
120143
1. In the menu pane, select **Custom domain**.
121-
1. Under **Custom domain**, click **Add**.
144+
1. Under **Custom domain**, select **Add**.
122145

123146
:::image type="content" alt-text="Screenshot of custom domain management." source="media\howto-custom-domain\portal-custom-domain-management.png" :::
124147

125-
1. Fill in a name for the custom domain. It's the sub resource name.
126-
1. Fill in the domain name. It's the full domain name of your custom domain, for example, `contoso.com`.
148+
1. Enter a name for the custom domain. It's the sub resource name.
149+
1. Enter the domain name. It's the full domain name of your custom domain, for example, `contoso.com`.
127150
1. Select a custom certificate that applies to this custom domain.
128-
1. Click **Add**.
151+
1. Select **Add**.
129152

130153
:::image type="content" alt-text="Screenshot of adding a custom domain." source="media\howto-custom-domain\portal-custom-domain-add.png" :::
131154

@@ -164,18 +187,18 @@ $ curl -vvv https://contoso.example.com/api/health
164187

165188
-----
166189

167-
It should return `200` status code without any certificate error.
190+
The health API should return `200` status code without any certificate error.
168191

169192
## Key Vault in private network
170193

171-
If you have configured [Private Endpoint](../private-link/private-endpoint-overview.md) to your Key Vault, Azure Web PubSub Service cannot access the Key Vault via public network. You need to set up a [Shared Private Endpoint](./howto-secure-shared-private-endpoints-key-vault.md) to let Azure Web PubSub Service access your Key Vault via private network.
194+
If you've configured a [Private Endpoint](../private-link/private-endpoint-overview.md) to your Key Vault, Azure Web PubSub Service can't access the Key Vault via public network. You need to set up a [shared private endpoint](./howto-secure-shared-private-endpoints-key-vault.md) to let Azure Web PubSub Service access your Key Vault via private network.
172195

173-
After you create a Shared Private Endpoint, you can create a custom certificate as usual. **You don't have to change the domain in Key Vault URI**. For example, if your Key Vault base URI is `https://contoso.vault.azure.net`, you still use this URI to configure custom certificate.
196+
After you create a shared private endpoint, you can create a custom certificate as usual. **You don't have to change the domain in Key Vault URI**. For example, if your Key Vault base URI is `https://contoso.vault.azure.net`, you still use this URI to configure custom certificate.
174197

175198
You don't have to explicitly allow Azure Web PubSub Service IPs in Key Vault firewall settings. For more info, see [Key Vault private link diagnostics](../key-vault/general/private-link-diagnostics.md).
176199

177200
## Next steps
178201

179-
+ [How to enable managed identity for Azure Web PubSub Service](howto-use-managed-identity.md)
180-
+ [Get started with Key Vault certificates](../key-vault/certificates/certificate-scenarios.md)
181-
+ [What is Azure DNS](../dns/dns-overview.md)
202+
* [How to enable managed identity for Azure Web PubSub Service](howto-use-managed-identity.md)
203+
* [Get started with Key Vault certificates](../key-vault/certificates/certificate-scenarios.md)
204+
* [What is Azure DNS](../dns/dns-overview.md)

0 commit comments

Comments
 (0)