Secardeo certPort Azure Deployment Guide

1 Introduction

1.1 Purpose of this document

This guide describes the deployment of the Secardeo certPort software as an Azure App Service in Microsoft Azure. It serves as a guideline for planning, deploying, configuring, and operating certPort.

This document combines the supported Azure deployment methods in a single guide. certPort can be deployed using the Azure Marketplace, or with Terraform. While the individual deployment steps differ depending on the selected method, the required prerequisites and many post-deployment configuration steps are identical.

Alternatively, certPort can also be installed on a Windows Server using the provided executable installer. This deployment model is not covered in this document and is described separately in the certPort Manual Deployment Guide. For more information, please contact Secardeo at info@secardeo.com.

1.2 Functions and architecture

certPort is a proxy for automatically enrolling certificates for servers, clients, devices, and users from public and private certification authorities.

certPort supports the following protocols for certificate requests:

  • ACME
  • EST
  • SCEP

certPort is installed as an Azure web app that is running in Azure. certPort uses an SQL database which can be hosted in Azure SQL, Azure Database for MySQL, MSSQL or MySQL. To retrieve necessary information from Entra ID, certPort communicates with your Azure tenant over the Graph API. The permissions for this are managed via an Azure app registration. An Azure Key Vault is used for storing of credentials that are required for certPort.

certPort deployment guide figure 1
Figure 1: certPort architecture
2 Prerequisites

2.1 Backend CA

For the issuance of digital certificates, a certification authority (CA) is required. certPort supports various private or public CAs. Currently the following certification authorities are supported:

  • ACME
  • AWS ACM-PCA
  • DigiCert CertCentral
  • DogTag CA
  • D-Trust
  • EJBCA
  • GlobalSign Atlas
  • GlobalTrust SOAP
  • OpenXPKI
  • Secardeo certVault CA
  • Sectigo Certificate Manager (SCM) REST
  • SwissSign CMC
  • TOPKI REST
  • Windows CA HTTP

For the configuration of certPort, you need to prepare required API credentials and information about the certificate products/profiles that you want to request. These values are different depending on the chosen certification authority and are described further in the manual.

2.2 Application package URL

To deploy certPort, you require a URL containing the application package from Secardeo. The URL will be required as a parameter in later deployment steps. If you haven't received the URL yet, please contact info@secardeo.com.

2.3 Database requirements

certPort stores relevant information about certificates, requests, and configurations in a database. A database connection is always required for certPort to function. certPort supports the following database types:

Managed:

  • Azure SQL (recommended)
  • Azure Database for MySQL

Self-hosted:

  • Microsoft SQL Server 2016 or higher
  • MySQL v9 or higher

The database requires approximately 90 KB per enrolled certificate (including expired certificates).

certPort supports SQL authentication for all database types. If Azure SQL is used, Entra authentication is available and recommended.

Please refer to chapter 5.3.3 for more information on the database configuration.

2.4 License

certPort follows a bring-your-own license (BYOL) model. Upon installation, a 90-day demo license is automatically applied for trial usage. To use certPort productively, a valid license must be provided for continued use.

To obtain a serial number for the license, please contact info@secardeo.com. After receiving your serial number, follow the steps described in the certPort manual to install and activate your license.

2.5 Azure permissions

The certPort deployment consists of two steps: starting the deployment in Azure through the marketplace and running a deployment script. Both steps should be performed by a user with the following permissions:

Azure:

The user needs one of the following permissions on the target resource group or subscription:

  • Owner, or
  • Contributor plus User Access Administrator

Microsoft Entra ID:

  • Global Administrator, or
  • Privileged Role Administrator

These permissions are only needed for the deployment and the setup script, not for configuring certPort as described in the manual.

3 Azure Marketplace deployment

3.1 Starting the deployment

Complete the deployment in the following order:

1. Sign in to the Azure portal as the deploying user. The user must have the permissions described in chapter 2.5.

2. Open the Azure Marketplace and search for certPort. Select the plan "certPort" and your subscription and click "Create".

3. Complete the deployment by entering the information described in the following chapters. Required fields are marked with the "*" symbol.

3.2 Basics

The first page contains the general Azure deployment settings:

Field Description
Subscription Select the subscription where certPort should be deployed.
Resource group Select or create an empty resource group in your subscription. All resources required for certPort will be created there.
Region Select the region where your resources should be created
Web app name Globally unique, 2 to 60 letters, digits or hyphens. certPort will be reachable over <name>.azurewebsites.net. The names of the other resources are derived from it.
Application package URL You should receive this value from Secardeo before deployment. If you have not received the URL yet, please contact info@secardeo.com.
certPort deployment guide figure 2
Figure 2: Marketplace basics

3.3 Advanced settings

The settings on this page are optional and can be skipped for a basic deployment.

Customize plan and network

Field Description Default
App Service Plan Create a new Windows plan or use an existing one in the same subscription and region. New plan
App Service pricing tier Select a pricing tier for the App Service plan with which certPort should be deployed. This can be changed later. Recommendations are described in appendix A). B1
Network integration You can select whether to create a new VNet or if certPort should use an existing VNet. No VNet integration

Configure custom domain

The deployed certPort web app automatically receives a default domain name in the shape of <name>.azurewebsites.net. If you want to configure a different domain name such as certport.contoso.com, you can configure it in the field "Custom domain name". Before running the deployment script, you must set the following DNS tokens at your DNS provider. The exact values can be taken from the outputs of the deployment after you finish the deployment. The values are available in the attribute "customDomainDns":

Type Name Value
CNAME certport.contoso.com The Web App's default hostname (cnameRecordValue, e.g. <app>.azurewebsites.net)
TXT asuid.certport.contoso.com The Web App's domain verification ID (txtRecordValue)

Enable Application Insights

Application Insights can be used for additional application monitoring like performance or error tracking.

Customize administrator group

By default, certPort will create the required groups during the post-deployment script. You can modify the names with which the groups will be created. If groups with these names already exist, the existing groups will be used.

Field Description Default
Administrator Group Users of this group will be able to log into the certPort administration interface. certPort-<web-app-name>- Administrators
Create the administrator group if it does not exist If true, the administrator group will be created with the configured administrator group name. If false, the group should be created manually. True

Enable audit logging

certPort writes audit events to the table certPortAudit_CL in the Log Analytics workspace. A data export copies them continuously into a storage account whose container is protected by a locked, time-based immutability policy and a CanNotDelete resource lock.

Field Description Default
Enable audit logging Writes certPort audit events to Azure Monitor and archives them in an immutable storage account. Selected
Audit archive retention (days) How long each exported audit record is protected against changes and deletion. Shown only if audit logging is enabled. 30

Important: The lock is irreversible. It can't be removed, and the retention period can't be shortened. The audit storage account can't be deleted until the retention period has passed since the last exported audit event. Enable audit logging only for installations you intend to keep.

3.4 Start the deployment

The page "After the deployment" shows the PowerShell command that will be required to complete the deployment. You can copy the command and press on "Review + Create" and "Create" to start the deployment.

After the deployment is completed (after about 5-10 minutes), you will need to continue with the copied command in the chapter 5.

If you did not copy the command, you can find it after the deployment under Deployment -> Outputs in the value setupCommand.

4 Terraform Deployment

The Terraform configuration must be executed in a Windows PowerShell session. Ensure that Terraform is installed and that you are authenticated to the target Azure tenant and subscription.

1. Install Terraform as described in Install | Terraform | HashiCorp Developer. To verify the installed version, restart Powershell and run:

 terraform version 

2. Login to Azure:

 az login 

3. List available subscriptions and target your desired subscription:

 az account list --output table
az account set --subscription "<subscription-name-or-id>" 

4. Verify the active subscription

 az account show 

5. Download the certPort Terraform deployment package and extract it

 Invoke-WebRequest -Uri "https://secardeo.blob.core.windows.net/certport/certPort-Terraform.zip" -OutFile "certPort-Terraform.zip"
Expand-Archive -Path ".\certPort-Terraform.zip" -DestinationPath ".\certPort-Terraform"
cd .\certPort-Terraform 

6. Review and update the Terraform variable values in terraform.tfvars or provide them as input variables. Ensure that the required values are set, including:

a. resource_group_name: the name of the resource group

b. location: the Azure region

c. web_app_name: the name of the web app

d. app_service_sku: the app service plan SKU. Use either "B1", "P0v3" or "P1v3". See Appendix A) for reference on the platform requirements.

e. application_package_url: the URL of the deployed certPort application package (.zip)

f. certport_enable_audit_logging: Specifies whether certPort audit logging is enabled.

7. Initialize the terraform working directory:

 terraform init 

8. Review the execution plan:

 terraform plan 

9. Apply the terraform configuration

 terraform apply 

10. After entering the required values and confirming the deployment, the certPort infrastructure will be deployed. The deployment typically takes about 5 minutes.

11. Show the setup command and continue with chapter 5:

 terraform output -raw setupCommand 
5 Complete the setup

The deployment creates the Azure resources of certPort. The separate PowerShell script creates the following:

  • the administrator group
  • the app registration and enterprise application
  • the API permissions and admin consent
  • the client secret, which is stored in the Key Vault
  • the Azure role assignments of the application

Run the script once after the deployment, as a user with the permissions described in chapter 2.5. It is safe to run it again: it reuses existing objects and repairs only what is missing.

5.1 Run the setup script

1. You must run the PowerShell script on a machine where the Azure CLI is installed. You can also use the Azure Cloud Shell for this (https://shell.azure.com/powershell).

2. Run the following command. For more advanced deployment options, please refer to chapter 5.2 before running the command.

 Invoke-WebRequest https://secardeo.blob.core.windows.net/certport/Complete-CertPortSetup.ps1 -OutFile Complete-CertPortSetup.ps1
./Complete-CertPortSetup.ps1 -WebAppName <web-app-name> 

3. The script shows its progress and ends with a summary of what is still required.

After completing all steps, you can access certPort at the URL that is shown in the output of the script. The configuration of certPort is described in the certPort manual. The following information should be prepared to configure certPort:

1. The connection parameters for the backend CA (FQDN of CA server and CA credentials)

2. For setting up the database connection:

a. FQDN or IP of the SQL server

b. The corresponding port of the SQL server

c. The database name

d. Credentials for accessing the database (username and password; user must have read and write permissions)

3. Optional: For e-mail notifications (Exchange Online):

a. E-mail address of originator and recipient (operator)

4. Optional: For e-mail notifications (SMTP):

a. DNS name of the mail server

b. E-mail address of originator and recipient (operator)

c. Optional: username and password for mail server authentication

d. Depending on the SMTP server the firewalls must allow the port 25, 465 or 587. Please check with your mail server administrator for the correct port

e. Consider for each certificate status, who should receive an e-mail regarding the status change

5.2 Groups and app registration

The following groups are used by certPort. The groups are automatically created by the deployment script unless a group with the configured group exists already. You will have to manually add the relevant users to these groups.

Group Default name
Administrators certPort-<web-app-name>-Administrators

During the deployment of certPort, an app registration is generated automatically with the name "certPort - <web-app-name>". If you want to manually grant the app registration permissions, you can follow these steps:

1. Run the setup script with -SkipAdminConsent.

2. A Global Administrator or Privileged Role Administrator grants consent:

a. Open Microsoft Entra ID -> App registrations.

b. Select certPort-<web-app-name>.

c. Open API permissions and select Grant admin consent for <tenant>.

3. Run the same command again, still with -SkipAdminConsent. The script checks the consent, validates the client secret and completes the setup.

This app registration is given the following permissions:

API Permission Type
Intune scep_challenge_provider Application
Microsoft Graph DeviceManagementManagedDevices.Read.All Application
Microsoft Graph Directory.Read.All Application
Microsoft Graph Group.Read.All Application
Microsoft Graph GroupMember.Read.All Application
Microsoft Graph User.Read.All Application
Microsoft Graph Mail.Send Application
Microsoft Graph Application.ReadWrite.OwnedBy Application

The application's enterprise application is also assigned these Azure roles:

Role Scope
Monitoring Metrics Publisher certPort resource group
Web Plan Contributor certPort app service plan
Website Contributor certPort resource group
Log Analytics Reader certPort Log Analytics workspace
Key Vault Secrets Officer certPort Key Vault

The certPort app registration is assigned as the owner of the certPort app service.

5.3 Optional configuration

5.3.1 IoT Hub permissions

If you want to use an Azure IoT Hub in combination with certPort where IoT devices request certificates at certPort then the app registration requires the following roles in Azure. certPort can automatically create and deactivate devices in an IoT Hub or through a Device Provisioning Service. More information can be found in the certPort manual.

  • Reader on the subscription or resource group (only to select the services from the list)
  • Device Provisioning Service Data Contributor on the Device Provisioning Service
  • IoT Hub Registry Contributor on every IoT hub that the devices use
  • Contributor on the Device Provisioning Service or IoT hub (only required to set up the trust automatically)

5.3.2 Disable automatic software updates

Per default, certPort automatically updates itself to the newest released version.

If you want to disable the automatic software update, please contact us at support@secardeo.com.

5.3.3 Configuration of a new database server

5.3.3.1 Create database server

certPort requires a database server. There are different options for deploying the database:

1. Managed (recommended): Deploy a fully managed database server in Azure (e.g. Azure SQL or Azure Database for MySQL). This is recommended for production use due to easier maintenance, backups and high availability

2. Self-hosted: You can use your own existing database server (for example, an on-premises MS SQL Server or MySQL server that you manage)

If you choose the Managed option and don't have an already existing database server yet, we suggest creating one in your Azure Tenant. You can choose between Azure SQL or MySQL.

5.3.3.1.1 Create managed Azure SQL server

1. In the Azure portal, search for "SQL servers" in the top search bar.

2. Click "Create" and enter a globally unique server name.

3. Under "Basics -> Authentication method", choose the option that fits your setup:

a. "Use Microsoft Entra-only authentication" (see 5.3.3.3)

b. "Use both SQL and Microsoft Entra authentication", or

c. "Use SQL authentication"

Note: SQL authentication is often easier to configure, however Microsoft Entra authentication is recommended

4. Please decide the database administrator. Configure the "Microsoft Entra admin" and/or "Instance admin login" depending on the selection of the "Authentication method".

a. If you want to use SQL authentication, you must create a new user with a password that will be set as the administrator of the database. Please remember the credentials of the "Instance admin login" to create an additional database user for certPort. This is required in the database configuration step in the certPort manual.

b. If you choose "Microsoft Entra authentication", you must configure an Entra ID account that will be set as the administrator of the database server. If you want to configure Entra authentication as a login option, you must be able to login as the "Microsoft Entra admin" at the database server (see chapter 5.3.3.3).

5. In the "Networking" tab, toggle "Allow Azure services and resources to access this server" to "Yes".

6. In the "Security" tab, you don't need to configure anything

7. Configure the rest of the attributes according to your needs or leave them with the default

8. Click "Review + Create" and "Create"

9. After the database server is deployed, click on the database server.

10. Go to "Security" -> "Networking" and configure the networking. The database server must be accessible from the certPort web app.

5.3.3.1.2 Create managed MySQL server

1. Go to your Azure portal and search for "Azure Database for MySQL servers".

2. Click "Create" and enter a server name, e.g. "TOPKI".

3. For "Authentication method", choose at least "Use SQL authentication". certPort does not support Microsoft Entra authentication for MySQL databases.

4. Configure a "Server admin login" and password. This is the database administrator. Please remember the credentials. They are required in the database configuration step in the certPort manual.

5. In the "Networking" tab toggle "Allow Azure services and resources to access this server" to "Yes".

6. Configure the rest of the attributes according to your needs or leave the with the default.

5.3.3.2 Network configuration for Azure SQL server
5.3.3.2.1 Private endpoint

If public network access to the database server is disabled, certPort reaches the database through a private endpoint. This requires VNet integration of the web app (network integration "Create a dedicated VNet" or "Use an existing VNet", see chapter 3.3) and a separate subnet for the private endpoint, which the deployment does not create.

1. In the Azure portal, open your SQL server

2. Navigate to "Networking"

3. Select the "Private access" tab and click "Create a private endpoint"

certPort deployment guide figure 3
Figure 3: Create a private endpoint

4. In the "Basics" tab:

a. Select the correct subscription and the certPort resource group

b. "Name": Provide a name (e.g. pe-certPort-sql)

c. "Region": select the region of the certPort resource group

d. Click "Next: Resource"

5. In the "Resource" tab:

a. "Target sub-resource": "sqlServer"

b. Click "Next: Virtual Network"

6. In the "Virtual Network" tab:

a. "Virtual network": Select the vnet-certport virtual network created by the ARM template or Terraform deployment

b. "Subnet": select the subnet-private-endpoints subnet created by the ARM template or Terraform deployment

c. Click "Next: DNS"

7. In the "DNS" tab:

a. Integrate with private DNS zone: select "Yes"

8. Click "Next: Tags", "Next: Review + create" and "Create" to create the private endpoint

5.3.3.2.2 Public endpoint (only required for Entra authentication)

To enable Entra authentication, you must temporarily have network access to the SQL database from somewhere where you can run SQL commands.

Under "Public access - Networking - Firewall rules" click "Add your client IP address". Press "Save". You can remove this after the deployment is finished.

5.3.3.3 Configure Entra authentication for Azure SQL (Recommended)

certPort can connect to Azure SQL databases using Entra Authentication via the app registration. Alternatively, you can use SQL authentication to connect to the previously configured DB server. For this, the app registration user has to be created with proper permissions on the database server. For more information, please refer to the Microsoft documentation.

1. Go to the Azure portal to "Enterprise applications" -> "All applications"

2. Select the app registration "certPort - <web-app-name>" created by the setup scrip.

3. Copy the "Object ID"

4. Go in the Azure portal to "Azure SQL" and select the Azure SQL database server to get the "Microsoft Entra admin" account

5. Login to the database server as the "Microsoft Entra admin". You can use "Microsoft SQL Server Management Studio"

6. Create the external user for the app registration on the database server based on the "Object ID":

 CREATE USER [<name-of-app-registration>]
FROM EXTERNAL PROVIDER
WITH OBJECT_ID = '<object-id>';
GO
ALTER ROLE dbmanager ADD MEMBER [<name-of-app-registration>];
ALTER ROLE loginmanager ADD MEMBER [<name-of-app-registration>]; 

Note: The "[" and "]" symbols are required and must not be removed.

7. You can validate that the user was successfully created with the following command:

 SELECT name, type_desc, authentication_type_desc
FROM sys.database_principals
WHERE type IN ('E', 'X')
AND name = '<name-of-app-registration>'; 
6 Contact

Secardeo GmbH
Hohenadlstr. 4
D-85737 Ismaning
Germany
E-Mail: support@secardeo.com
Phone: +49 89 18 93 58 9-8

7 Appendix

A) Platform requirements

The target environment must meet the following technical requirements.

Web App Requirements:

  • B1 for testing and evaluation purposes
  • P0v3 for production use with up to 1000 active certificates,
  • P1v3 for production use with > 1000 users/active certificates

B) Marketplace template resources

The following resources are created by the Marketplace deployment:

Type Description
Microsoft.KeyVault/vaults Key Vault (Premium, RBAC authorization) for the application credentials, certificates and keys. The setup script stores the client secret in it.
Microsoft.Web/serverfarms App Service plan (Windows). Not created if an existing plan is selected.
Microsoft.Web/sites Web App with a system-assigned managed identity and the application settings: HTTPS only, TLS 1.2, HTTP/2, .NET 10, optional client certificates (EST).
Microsoft.Network/virtualNetworks Only with network integration "Create a dedicated VNet": virtual network with one subnet delegated to the App Service.
Microsoft.Web/sites/networkConfig Only with network integration: connects the Web App to the delegated subnet.
Microsoft.Insights/components Only if Application Insights is enabled.
Microsoft.OperationalInsights/workspaces Log Analytics workspace for certPort logging.
Microsoft.OperationalInsights/workspaces/tables Custom table certPortLogs_CL; certPortAudit_CL if audit logging is enabled.
Microsoft.Insights/dataCollectionEndpoints Data collection endpoint for log ingestion.
Microsoft.Insights/dataCollectionRules Data collection rule for the certPort logs; a second rule for audit records if audit logging is enabled.
Microsoft.Authorization/roleAssignments Key Vault Administrator on the Key Vault for the Web App identity; with audit logging also Storage Blob Data Owner on the audit storage account for the audit lock identity.
Microsoft.Storage/storageAccounts Audit logging only: storage account for the immutable audit archive.
Microsoft.Storage/storageAccounts/blobServices/containers Audit logging only: container am-certportaudit-cl that receives the audit export.
Microsoft.ManagedIdentity/userAssignedIdentities Audit logging only: identity of the deployment script that locks the audit archive.
Microsoft.Resources/deploymentScripts Audit logging only: creates and locks the time-based immutability policy of the audit container.
Microsoft.OperationalInsights/workspaces/dataExports Audit logging only: exports certPortAudit_CL to the audit archive.
Microsoft.Authorization/locks Audit logging only: CanNotDelete lock audit-archive-no-delete on the audit storage account.
Microsoft.KeyVault/vaults Key Vault (Premium, RBAC authorization) for the application credentials, certificates and keys. The setup script stores the client secret in it.
Microsoft.Web/serverfarms App Service plan (Windows). Not created if an existing plan is selected.

C) Terraform resources

The following resources are created by the Terraform deployment:

Type Description
azurerm_resource_group Creates the Azure resource group for the deployment.
azurerm_virtual_network Creates the virtual network used by the deployment.
azurerm_subnet Creates the delegated App Service integration subnet and the private endpoints subnet.
azurerm_service_plan Creates the Azure App Service plan for the certPort Web App.
azurerm_windows_web_app Creates the Azure Web App with a system-assigned managed identity and Entra ID authentication app settings.
azurerm_app_service_virtual_network_swift_connection Connects the Web App to the delegated subnet for VNet integration.
azurerm_key_vault Creates the Azure Key Vault used to store deployment secrets and certificate-related values.
azurerm_key_vault_certificate Creates the self-signed Key Vault certificate certport-auth used for app registration bootstrap.
azurerm_key_vault_secret Creates Key Vault secrets for AzureAd--ClientId and AzureAd--TenantId, and AzureAd--ClientSecret when a manual app registration is used.
azuread_application Creates the Entra ID app registration, including redirect URIs, SecurityGroup claims, and the required Microsoft Graph/API permissions.
azuread_service_principal Creates the service principal for the app registration.
azuread_application_certificate Adds the Key Vault certificate as an application certificate credential on the app registration.
azurerm_log_analytics_workspace Creates the Log Analytics workspace used for certPort logging.
azurerm_monitor_data_collection_endpoint Creates the data collection endpoint used for log ingestion.
azapi_resource Creates the custom Log Analytics table certPortLogs_CL and the data collection rule that maps the custom log stream into the workspace.
azurerm_role_assignment Assigns Azure roles required by the deployment, including temporary Key Vault Administrator for the Terraform executor, Key Vault Administrator for the Web App identity, Monitoring Metrics Publisher, Web Plan Contributor, Website Contributor, and Log Analytics Reader.
time_sleep Waits for the custom Log Analytics table to become available before creating the data collection rule.
azurerm_storage_account Creates the dedicated storage account used as the immutable audit archive.
azurerm_storage_container Creates the Blob Storage container that receives the Azure Monitor audit export.
azurerm_storage_container_immutability_policy Applies and locks the retention-based immutability policy for the audit archive container; no deletion lifecycle policy is configured.
azapi_resource Creates the custom Log Analytics table certPortAudit_CL for certPort audit records.
azapi_resource Creates the audit data collection rule and the Log Analytics data export that sends certPortAudit_CL records to the audit archive.
azurerm_management_lock Applies a CanNotDelete resource lock to protect the audit archive storage account from deletion.
azurerm_role_assignment Assigns the permissions required for the audit archive protection and export configuration, including access to the storage account.