Support · Installation · License · Related Integrations
The Azure Application Gateway Orchestrator extension remotely manages certificates used by Azure Application Gateways. The extension supports two different store types - one that generally manages certificates stored in the Application Gateway, and one that manages the bindings of Application Gateway certificates to HTTPS/TLS Listeners.
The extension manages only App Gateway Certificates, not Azure Key Vault certificates. Certificates imported from Azure Key Vault to Azure Application Gateways will be downloaded for certificate inventory purposes only. The Azure Application Gateway orchestrator extension will not perform certificate management operations on Azure Key Vault secrets. If you need to manage certificates in Azure Key Vault, use the Azure Key Vault Orchestrator.
If the certificate management capabilities of Azure Key Vault are desired over direct management of certificates in Application Gateways, the Azure Key Vault orchestrator can be used in conjunction with this extension for accurate certificate location reporting via the inventory job type. This management strategy requires manual binding of certificates imported to an Application Gateway from AKV and can result in broken state in the Azure Application Gateway in the case that the secret is deleted in AKV.
This integration is compatible with Keyfactor Universal Orchestrator version 10.4 and later.
The Azure Application Gateway Universal Orchestrator extension is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket with your Keyfactor representative. If you have a support issue, please open a support ticket via the Keyfactor Support Portal at https://support.keyfactor.com.
To report a problem or suggest a new feature, use the Issues tab. If you want to contribute actual bug fixes or proposed enhancements, use the Pull requests tab.
Before installing the Azure Application Gateway Universal Orchestrator extension, it's recommended to install kfutil. Kfutil is a command-line tool that simplifies the process of creating store types, installing extensions, and instantiating certificate stores in Keyfactor Command.
The Azure Application Gateway Universal Orchestrator extension implements 2 Certificate Store Types. Depending on your use case, you may elect to install one, or all of these Certificate Store Types. An overview for each type is linked below:
Azure Application Gateway Certificate
-
Follow the requirements section to configure a Service Account and grant necessary API permissions.
Requirements
The Azure Application Gateway Orchestrator extension uses an Azure Service Principal for authentication. Follow Microsoft's documentation to create a service principal.
For quick start and non-production environments, a Role Assignment should be created on each resource group that own Application Gateways desiring management that grants the created Application/Service Principal the Contributor (Privileged administrator) Role. For production environments, a custom role should be created that grants the following permissions:
Microsoft.Resources/subscriptions/resourcegroups/read
- Read : Get Resource GroupMicrosoft.Network/applicationGateways/read
- Read : Get Application GatewayMicrosoft.Network/applicationGateways/write
- Write : Create or Update Application GatewayMicrosoft.ManagedIdentity/userAssignedIdentities/assign/action
- Other : RBAC action for assigning an existing user assigned identity to a resourceMicrosoft.Network/virtualNetworks/subnets/join/action
- Other : Joins a virtual network. Not Alertable.
Note that even if the Service Principal has permission to perform the 'Microsoft.Network/applicationGateways/write' action over the scope of the required resource group, there may be other permissions that are required by the CreateOrUpdate operation depending on the complexity of the Application Gateway's configuration. As such, the list of permissions above should not be considered as comprehensive.
If the managed Application Gateway is integrated with Azure Key Vault per the discussion in the Certificates Imported to Application Gateways from Azure Key Vault section, perform one of the following actions for each Key Vault with certificates imported to App Gateways:
- Azure role-based access control - Create a Role Assignment that grants the Application/Service Principal the Key Vault Secrets User built-in role.
- Vault access policy - Create an Access Policy that grants the Application/Service Principal the Get secret permission for each Azure Key Vault.
Beginning in version 3.0.0, the Azure Application Gateway Orchestrator extension supports both client certificate authentication and client secret authentication.
-
Client Secret - Follow Microsoft's documentation to create a Client Secret. This secret will be used as the Server Password field in the Certificate Store Configuration section.
-
Client Certificate - Create a client certificate key pair with the Client Authentication extended key usage. The client certificate will be used in the ClientCertificate field in the Certificate Store Configuration section. If you have access to Keyfactor Command, the instructions in this section walk you through enrolling a certificate and ensuring that it's in the correct format. Once enrolled, follow Microsoft's documentation to add the public key certificate (no private key) to the service principal used for authentication.
The certificate can be in either of the following formats:
- Base64-encoded PKCS#12 (PFX) with a matching private key.
- Base64-encoded PEM-encoded certificate and PEM-encoded PKCS8 private key. Make sure that the certificate and private key are separated with a newline. The order doesn't matter - the extension will determine which is which.
If the private key is encrypted, the encryption password will replace the Server Password field in the Certificate Store Configuration section.
Creating and Formatting a Client Certificate using Keyfactor Command
To get started quickly, you can follow the instructions below to create and properly format a client certificate to authenticate to the Microsoft Graph API.
- In Keyfactor Command, hover over Enrollment and select PFX Enrollment.
- Select a Template that supports Client Authentication as an extended key usage.
- Populate the certificate subject as appropriate for the Template. It may be sufficient to only populate the Common Name, but consult your IT policy to ensure that this certificate is compliant.
- At the bottom of the page, uncheck the box for Include Chain, and select either PFX or PEM as the certificate Format.
- Make a note of the password on the next page - it won't be shown again.
- Prepare the certificate and private key for Azure and the Orchestrator extension:
-
If you downloaded the certificate in PEM format, use the commands below:
# Verify that the certificate downloaded from Command contains the certificate and private key. They should be in the same file cat <your_certificate.pem> # Separate the certificate from the private key openssl x509 -in <your_certificate.pem> -out pubkeycert.pem # Base64 encode the certificate and private key cat <your_certificate.pem> | base64 > clientcertkeypair.pem.base64
-
If you downloaded the certificate in PFX format, use the commands below:
# Export the certificate from the PFX file openssl pkcs12 -in <your_certificate.pfx> -clcerts -nokeys -out pubkeycert.pem # Base64 encode the PFX file cat <your_certificate.pfx> | base64 > clientcert.pfx.base64
-
- Follow Microsoft's documentation to add the public key certificate to the service principal used for authentication.
You will use
clientcert.[pem|pfx].base64
as the ClientCertificate field in the Certificate Store Configuration section. -
Create Certificate Store Types for the Azure Application Gateway Orchestrator extension.
-
Using kfutil:
# Azure Application Gateway Certificate kfutil store-types create AzureAppGw
-
Manually:
-
-
Install the Azure Application Gateway Universal Orchestrator extension.
-
Using kfutil: On the server that that hosts the Universal Orchestrator, run the following command:
# Windows Server kfutil orchestrator extension -e azure-appgateway-orchestrator@latest --out "C:\Program Files\Keyfactor\Keyfactor Orchestrator\extensions" # Linux kfutil orchestrator extension -e azure-appgateway-orchestrator@latest --out "/opt/keyfactor/orchestrator/extensions"
-
Manually: Follow the official Command documentation to install the latest Azure Application Gateway Universal Orchestrator extension.
-
-
Create new certificate stores in Keyfactor Command for the Sample Universal Orchestrator extension.
Azure Application Gateway Certificate Binding
-
Follow the requirements section to configure a Service Account and grant necessary API permissions.
Requirements
The Azure Application Gateway Orchestrator extension uses an Azure Service Principal for authentication. Follow Microsoft's documentation to create a service principal.
For quick start and non-production environments, a Role Assignment should be created on each resource group that own Application Gateways desiring management that grants the created Application/Service Principal the Contributor (Privileged administrator) Role. For production environments, a custom role should be created that grants the following permissions:
Microsoft.Resources/subscriptions/resourcegroups/read
- Read : Get Resource GroupMicrosoft.Network/applicationGateways/read
- Read : Get Application GatewayMicrosoft.Network/applicationGateways/write
- Write : Create or Update Application GatewayMicrosoft.ManagedIdentity/userAssignedIdentities/assign/action
- Other : RBAC action for assigning an existing user assigned identity to a resourceMicrosoft.Network/virtualNetworks/subnets/join/action
- Other : Joins a virtual network. Not Alertable.
Note that even if the Service Principal has permission to perform the 'Microsoft.Network/applicationGateways/write' action over the scope of the required resource group, there may be other permissions that are required by the CreateOrUpdate operation depending on the complexity of the Application Gateway's configuration. As such, the list of permissions above should not be considered as comprehensive.
If the managed Application Gateway is integrated with Azure Key Vault per the discussion in the Certificates Imported to Application Gateways from Azure Key Vault section, perform one of the following actions for each Key Vault with certificates imported to App Gateways:
- Azure role-based access control - Create a Role Assignment that grants the Application/Service Principal the Key Vault Secrets User built-in role.
- Vault access policy - Create an Access Policy that grants the Application/Service Principal the Get secret permission for each Azure Key Vault.
Beginning in version 3.0.0, the Azure Application Gateway Orchestrator extension supports both client certificate authentication and client secret authentication.
-
Client Secret - Follow Microsoft's documentation to create a Client Secret. This secret will be used as the Server Password field in the Certificate Store Configuration section.
-
Client Certificate - Create a client certificate key pair with the Client Authentication extended key usage. The client certificate will be used in the ClientCertificate field in the Certificate Store Configuration section. If you have access to Keyfactor Command, the instructions in this section walk you through enrolling a certificate and ensuring that it's in the correct format. Once enrolled, follow Microsoft's documentation to add the public key certificate (no private key) to the service principal used for authentication.
The certificate can be in either of the following formats:
- Base64-encoded PKCS#12 (PFX) with a matching private key.
- Base64-encoded PEM-encoded certificate and PEM-encoded PKCS8 private key. Make sure that the certificate and private key are separated with a newline. The order doesn't matter - the extension will determine which is which.
If the private key is encrypted, the encryption password will replace the Server Password field in the Certificate Store Configuration section.
Creating and Formatting a Client Certificate using Keyfactor Command
To get started quickly, you can follow the instructions below to create and properly format a client certificate to authenticate to the Microsoft Graph API.
- In Keyfactor Command, hover over Enrollment and select PFX Enrollment.
- Select a Template that supports Client Authentication as an extended key usage.
- Populate the certificate subject as appropriate for the Template. It may be sufficient to only populate the Common Name, but consult your IT policy to ensure that this certificate is compliant.
- At the bottom of the page, uncheck the box for Include Chain, and select either PFX or PEM as the certificate Format.
- Make a note of the password on the next page - it won't be shown again.
- Prepare the certificate and private key for Azure and the Orchestrator extension:
-
If you downloaded the certificate in PEM format, use the commands below:
# Verify that the certificate downloaded from Command contains the certificate and private key. They should be in the same file cat <your_certificate.pem> # Separate the certificate from the private key openssl x509 -in <your_certificate.pem> -out pubkeycert.pem # Base64 encode the certificate and private key cat <your_certificate.pem> | base64 > clientcertkeypair.pem.base64
-
If you downloaded the certificate in PFX format, use the commands below:
# Export the certificate from the PFX file openssl pkcs12 -in <your_certificate.pfx> -clcerts -nokeys -out pubkeycert.pem # Base64 encode the PFX file cat <your_certificate.pfx> | base64 > clientcert.pfx.base64
-
- Follow Microsoft's documentation to add the public key certificate to the service principal used for authentication.
You will use
clientcert.[pem|pfx].base64
as the ClientCertificate field in the Certificate Store Configuration section. -
Create Certificate Store Types for the Azure Application Gateway Orchestrator extension.
-
Using kfutil:
# Azure Application Gateway Certificate Binding kfutil store-types create AppGwBin
-
Manually:
-
-
Install the Azure Application Gateway Universal Orchestrator extension.
-
Using kfutil: On the server that that hosts the Universal Orchestrator, run the following command:
# Windows Server kfutil orchestrator extension -e azure-appgateway-orchestrator@latest --out "C:\Program Files\Keyfactor\Keyfactor Orchestrator\extensions" # Linux kfutil orchestrator extension -e azure-appgateway-orchestrator@latest --out "/opt/keyfactor/orchestrator/extensions"
-
Manually: Follow the official Command documentation to install the latest Azure Application Gateway Universal Orchestrator extension.
-
-
Create new certificate stores in Keyfactor Command for the Sample Universal Orchestrator extension.
Apache License 2.0, see LICENSE.