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/active-directory/develop/workload-identity-federation-create-trust-github.md
+64-3Lines changed: 64 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.service: active-directory
10
10
ms.subservice: develop
11
11
ms.topic: how-to
12
12
ms.workload: identity
13
-
ms.date: 10/18/2021
13
+
ms.date: 01/28/2022
14
14
ms.author: ryanwi
15
15
ms.custom: aaddev
16
16
ms.reviewer: keyam, udayh, vakarand
@@ -44,7 +44,7 @@ In the **Federated credential scenario** drop-down box select **GitHub actions d
44
44
45
45
Specify the **Organization** and **Repository** for your GitHub Actions workflow.
46
46
47
-
For **Entity type**, select **Environment**, **Branch**, **Pull request**, or **Tag** and specify the value.
47
+
For **Entity type**, select **Environment**, **Branch**, **Pull request**, or **Tag** and specify the value. The values must exactly match the configuration in the [GitHub workflow](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on). For more info, read the [examples](#entity-type-examples).
48
48
49
49
Add a **Name** for the federated credential.
50
50
@@ -60,6 +60,67 @@ Click **Add** to configure the federated credential.
60
60
> [!IMPORTANT]
61
61
> The **Organization**, **Repository**, and **Entity type** values must exactly match the configuration on the GitHub workflow configuration. Otherwise, Microsoft identity platform will look at the incoming external token and reject the exchange for an access token. You won't get an error, the exchange fails without error.
62
62
63
+
### Entity type examples
64
+
65
+
#### Branch example
66
+
67
+
For a workflow triggered by a push or pull request event on the main branch:
68
+
69
+
```yml
70
+
on:
71
+
push:
72
+
branches: [ main ]
73
+
pull_request:
74
+
branches: [ main ]
75
+
```
76
+
77
+
Specify an **Entity type** of **Branch** and a **GitHub branch name** of "main".
78
+
79
+
#### Environment example
80
+
81
+
For Jobs tied to an environment named "production":
82
+
83
+
```yml
84
+
on:
85
+
push:
86
+
branches:
87
+
- main
88
+
89
+
jobs:
90
+
deployment:
91
+
runs-on: ubuntu-latest
92
+
environment: production
93
+
steps:
94
+
- name: deploy
95
+
# ...deployment-specific steps
96
+
```
97
+
98
+
Specify an **Entity type** of **Environment** and a **GitHub environment name** of "production".
99
+
100
+
#### Tag example
101
+
102
+
For example, for a workflow triggered by a push to the tag named "v2":
103
+
104
+
```yml
105
+
on:
106
+
push:
107
+
# Sequence of patterns matched against refs/heads
108
+
branches:
109
+
- main
110
+
- 'mona/octocat'
111
+
- 'releases/**'
112
+
# Sequence of patterns matched against refs/tags
113
+
tags:
114
+
- v2
115
+
- v1.*
116
+
```
117
+
118
+
Specify an **Entity type** of **Tag** and a **GitHub tag name** of "v2".
119
+
120
+
#### Pull request example
121
+
122
+
For a workflow triggered by a pull request event, specify an **Entity type** of **Pull request**.
123
+
63
124
# [Microsoft Graph](#tab/microsoft-graph)
64
125
Launch [Azure Cloud Shell](https://portal.azure.com/#cloudshell/) and sign in to your tenant.
65
126
@@ -145,6 +206,6 @@ az rest -m DELETE -u 'https://graph.microsoft.com/beta/applications/f6475511-fd
145
206
Before configuring your GitHub Actions workflow, get the *tenant-id* and *client-id* values of your app registration. You can find these values in the Azure portal. Go to the list of [registered applications](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and select your app registration. In **Overview**->**Essentials**, find the **Application (client) ID** and **Directory (tenant) ID**. Set these values in your GitHub environment to use in the Azure login action for your workflow.
146
207
147
208
## Next steps
148
-
[Configure a GitHub Actions workflow](/azure/developer/github/connect-from-azure) to get an access token from Microsoft identity provider and access Azure resources.
209
+
For an end-to-end example, read [Deploy to App Service using GitHub Actions](/azure/app-service/deploy-github-actions?tabs=openid).
149
210
150
211
Read the [GitHub Actions documentation](https://docs.github.com/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure) to learn more about configuring your GitHub Actions workflow to get an access token from Microsoft identity provider and access Azure resources.
Copy file name to clipboardExpand all lines: articles/application-gateway/key-vault-certs.md
+29-26Lines changed: 29 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: application-gateway
5
5
author: vhorne
6
6
ms.service: application-gateway
7
7
ms.topic: conceptual
8
-
ms.date: 11/30/2021
8
+
ms.date: 01/31/2022
9
9
ms.author: victorh
10
10
---
11
11
@@ -23,29 +23,29 @@ Application Gateway integration with Key Vault offers many benefits, including:
23
23
- Stronger security, because TLS/SSL certificates aren't directly handled by the application development team. Integration allows a separate security team to:
24
24
* Set up application gateways.
25
25
* Control application gateway lifecycles.
26
-
* Grant permissions to selected application gateways to access certificates that are stored in your key vault.
27
-
- Support for importing existing certificates into your key vault. Or use Key Vault APIs to create and manage new certificates with any of the trusted Key Vault partners.
28
-
- Support for automatic renewal of certificates that are stored in your key vault.
26
+
* Grant permissions to selected application gateways to access certificates that are stored in your Key Vault.
27
+
- Support for importing existing certificates into your Key Vault. Or use Key Vault APIs to create and manage new certificates with any of the trusted Key Vault partners.
28
+
- Support for automatic renewal of certificates that are stored in your Key Vault.
29
29
30
30
## Supported certificates
31
31
32
-
Application Gateway currently supports software-validated certificates only. Hardware security module (HSM)-validated certificates are not supported.
After Application Gateway is configured to use Key Vault certificates, its instances retrieve the certificate from Key Vault and install them locally for TLS termination. The instances poll Key Vault at four-hour intervals to retrieve a renewed version of the certificate, if it exists. If an updated certificate is found, the TLS/SSL certificate that's currently associated with the HTTPS listener is automatically rotated.
35
35
36
36
> [!TIP]
37
37
> Any change to Application Gateway will force a check against Key Vault to see if any new versions of certificates are available. This includes, but not limited to, changes to Frontend IP Configurations, Listeners, Rules, Backend Pools, Resource Tags, and more. If an updated certificate is found, the new certificate will immediately be presented.
38
38
39
-
Application Gateway uses a secret identifier in Key Vault to reference the certificates. For Azure PowerShell, the Azure CLI, or Azure Resource Manager, we strongly recommend that you use a secret identifier that doesn't specify a version. This way, Application Gateway will automatically rotate the certificate if a newer version is available in your key vault. An example of a secret URI without a version is `https://myvault.vault.azure.net/secrets/mysecret/`.
39
+
Application Gateway uses a secret identifier in Key Vault to reference the certificates. For Azure PowerShell, the Azure CLI, or Azure Resource Manager, we strongly recommend that you use a secret identifier that doesn't specify a version. This way, Application Gateway will automatically rotate the certificate if a newer version is available in your Key Vault. An example of a secret URI without a version is `https://myvault.vault.azure.net/secrets/mysecret/`.
40
40
41
41
The Azure portal supports only Key Vault certificates, not secrets. Application Gateway still supports referencing secrets from Key Vault, but only through non-portal resources like PowerShell, the Azure CLI, APIs, and Azure Resource Manager templates (ARM templates).
42
42
43
43
> [!WARNING]
44
-
> Azure Application Gateway currently supports only Key Vault accounts in the same subscription as the Application Gateway resource. Choosing a key vault under a different subscription than your Application Gateway will result in a failure.
44
+
> Azure Application Gateway currently supports only Key Vault accounts in the same subscription as the Application Gateway resource. Choosing a Key Vault under a different subscription than your Application Gateway will result in a failure.
45
45
46
46
## Certificate settings in Key Vault
47
47
48
-
For TLS termination, Application Gateway only supports certificates in Personal Information Exchange (PFX) format. You can either import an existing certificate or create a new one in your key vault. To avoid any failures, ensure that the certificate's status is set to **Enabled** in Key Vault.
48
+
For TLS termination, Application Gateway only supports certificates in Personal Information Exchange (PFX) format. You can either import an existing certificate or create a new one in your Key Vault. To avoid any failures, ensure that the certificate's status is set to **Enabled** in Key Vault.
49
49
50
50
## How integration works
51
51
@@ -64,29 +64,32 @@ You can either create a new user-assigned managed identity or reuse an existing
64
64
65
65
### Delegate user-assigned managed identity to Key Vault
66
66
67
-
Define access policies to use the user-assigned managed identity with your key vault:
67
+
Define access policies to use the user-assigned managed identity with your Key Vault:
68
68
69
69
1. In the Azure portal, go to **Key Vault**.
70
-
1. Select the key vault that contains your certificate.
70
+
1. Select the Key Vault that contains your certificate.
71
71
1. If you're using the permission model **Vault access policy**: Select **Access Policies**, select **+ Add Access Policy**, select **Get** for **Secret permissions**, and choose your user-assigned managed identity for **Select principal**. Then select **Save**.
72
72
73
-
If you're using the permission model **Azure role-based access control**: Select **Access control (IAM)** and [Add a role assignment](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#assign-a-role-to-a-user-assigned-managed-identity) for the user-assigned managed identity to the Azure key vault for the role **Key Vault Secrets User**.
73
+
If you're using the permission model **Azure role-based access control**: Select **Access control (IAM)** and [Add a role assignment](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#assign-a-role-to-a-user-assigned-managed-identity) for the user-assigned managed identity to the Azure Key Vault for the role **Key Vault Secrets User**.
74
74
75
75
### Verify Firewall Permissions to Key Vault
76
76
77
-
As of March 15, 2021, Key Vault recognizes Application Gateway as a trusted service by leveraging User Managed Identities for authentication to Azure Key Vault. With the use of service endpoints and enabling the trusted services option for key vault's firewall, you can build a secure network boundary in Azure. You can deny access to traffic from all networks (including internet traffic) to Key Vault but still make Key Vault accessible for an Application Gateway resource under your subscription.
77
+
As of March 15, 2021, Key Vault recognizes Application Gateway as a trusted service by leveraging User Managed Identities for authentication to Azure Key Vault. With the use of service endpoints and enabling the trusted services option for Key Vault's firewall, you can build a secure network boundary in Azure. You can deny access to traffic from all networks (including internet traffic) to Key Vault but still make Key Vault accessible for an Application Gateway resource under your subscription.
78
78
79
-
When you're using a restricted key vault, use the following steps to configure Application Gateway to use firewalls and virtual networks:
79
+
When you're using a restricted Key Vault, use the following steps to configure Application Gateway to use firewalls and virtual networks:
80
80
81
-
1. In the Azure portal, in your key vault, select **Networking**.
82
-
1. On the **Firewalls and virtual networks** tab, select **Private endpoint and selected networks**.
81
+
> [!TIP]
82
+
> The following steps are not required if your Key Vault has a Private Endpoint enabled. The application gateway can access the Key Vault using the private IP address.
83
+
84
+
1. In the Azure portal, in your Key Vault, select **Networking**.
85
+
1. On the **Firewalls and virtual networks** tab, select **Selected networks**.
83
86
1. For **Virtual networks**, select **+ Add existing virtual networks**, and then add the virtual network and subnet for your Application Gateway instance. During the process, also configure the `Microsoft.KeyVault` service endpoint by selecting its checkbox.
84
-
1. Select **Yes** to allow trusted services to bypass the key vault's firewall.
85
-
86
-

87
+
1. Select **Yes** to allow trusted services to bypass the Key Vault's firewall.
88
+
89
+

87
90
88
91
> [!Note]
89
-
> If you deploy the Application Gateway instance via an ARM template by using either the Azure CLI or PowerShell, or via an Azure application deployed from the Azure portal, the SSL certificate is stored in the key vault as a Base64-encoded PFX file. You must complete the steps in [Use Azure Key Vault to pass secure parameter value during deployment](../azure-resource-manager/templates/key-vault-parameter.md).
92
+
> If you deploy the Application Gateway instance via an ARM template by using either the Azure CLI or PowerShell, or via an Azure application deployed from the Azure portal, the SSL certificate is stored in the Key Vault as a Base64-encoded PFX file. You must complete the steps in [Use Azure Key Vault to pass secure parameter value during deployment](../azure-resource-manager/templates/key-vault-parameter.md).
90
93
>
91
94
> It's particularly important to set `enabledForTemplateDeployment` to `true`. The certificate might or might not have a password. In the case of a certificate with a password, the following example shows a possible configuration for the `sslCertificates` entry in `properties` for the ARM template configuration for Application Gateway.
92
95
>
@@ -102,7 +105,7 @@ When you're using a restricted key vault, use the following steps to configure A
102
105
> ]
103
106
> ```
104
107
>
105
-
> The values of `appGatewaySSLCertificateData` and `appGatewaySSLCertificatePassword` are looked up from the key vault, as described in [Reference secrets with dynamic ID](../azure-resource-manager/templates/key-vault-parameter.md#reference-secrets-with-dynamic-id). Follow the references backward from `parameters('secretName')` to see how the lookup happens. If the certificate is passwordless, omit the `password` entry.
108
+
> The values of `appGatewaySSLCertificateData` and `appGatewaySSLCertificatePassword` are looked up from the Key Vault, as described in [Reference secrets with dynamic ID](../azure-resource-manager/templates/key-vault-parameter.md#reference-secrets-with-dynamic-id). Follow the references backward from `parameters('secretName')` to see how the lookup happens. If the certificate is passwordless, omit the `password` entry.
106
109
107
110
### Configure Application Gateway Listener
108
111
@@ -111,26 +114,26 @@ Navigate to your Application Gateway in the Azure portal and select the **Listen
111
114
112
115
Under **Choose a certificate**, select **Create new** and then select **Choose a certificate from Key Vault** under **Https settings**.
113
116
114
-
For Cert name, type a friendly name for the certificate to be referenced in Key Vault. Choose your Managed identity, Key vault, and Certificate.
117
+
For Cert name, type a friendly name for the certificate to be referenced in Key Vault. Choose your Managed identity, Key Vault, and Certificate.
115
118
116
119
Once selected, select **Add** (if creating) or **Save** (if editing) to apply the referenced Key Vault certificate to the listener.
117
120
118
121
#### Key Vault Azure role-based access control permission model
119
-
Application Gateway supports certificates referenced in Key Vault via the Role-based access control permission model. The first few steps to reference the key vault must be completed via ARM, Bicep, CLI, or PowerShell.
122
+
Application Gateway supports certificates referenced in Key Vault via the Role-based access control permission model. The first few steps to reference the Key Vault must be completed via ARM template, Bicep, CLI, or PowerShell.
120
123
121
124
> [!Note]
122
125
> Specifying Azure Key Vault certificates that are subject to the role-based access control permission model is not supported via the portal.
123
126
124
-
In this example, we will use PowerShell to reference a new Key Vault certificate.
127
+
In this example, we’ll use PowerShell to reference a new Key Vault certificate.
Once the commands have been executed, you can navigate to your Application Gateway in the Azure portal and select the Listeners tab. Click Add Listener (or select an existing) and specify the Protocol to HTTPS.
153
156
154
-
Under *Choose a certificate* select the certificate named in the previous steps. Once selected, select *Add* (if creating) or *Save* (if editing) to apply the referenced Key Vault certificate to the listener.
157
+
Under **Choose a certificate** select the certificate named in the previous steps. Once selected, select *Add* (if creating) or *Save* (if editing) to apply the referenced Key Vault certificate to the listener.
0 commit comments