This guide covers certificate generation across different OS environments and the subsequent deployment to Azure.
1. Generating Certificates (By Operating System)
Windows (using PowerShell)
Windows users can use the native New-SelfSignedCertificate cmdlet. This is the easiest way to generate a certificate compatible with Azure without installing third-party tools.
# 1. Create the certificate$cert =New-SelfSignedCertificate-Subject "CN=MyApp"-CertStoreLocation "Cert:\CurrentUser\My"-NotAfter (Get-Date).AddYears(2)# 2. Export the Public keyExport-Certificate-Cert $cert -FilePath "C:\AzureProject.cer"# 3. Export the Private keyExport-PfxCertificate-Cert $cert -FilePath "C:\AzureProject.pfx"-Password (ConvertTo-SecureString"YourPassword123"-AsPlainText -Force)
macOS & Linux (using OpenSSL)
Most macOS and Linux distributions come with OpenSSL pre-installed. This method creates a standard RSA key pair.
# Step 1: Generate the Key and Certopenssl req -x509 -newkey rsa:2048-nodes -keyout myapp-key.pem -out myapp-cert.pem -days 730-subj "/CN=myapp.com"# Step 2: Create PFX with a hardcoded passwordopenssl pkcs12 -export -out myapp-identity.pfx -inkey myapp-key.pem -in myapp-cert.pem -passout pass:YourSecurePassword123
2. Uploading to Azure
This guide walks you through the process of uploading a certificate to an Azure App Registration for authentication purposes.
Prerequisites
Access to Azure Portal
An existing App Registration or permissions to create one
A certificate file (.cer, .pem, or .crt format)
Step 1: Access Microsoft Entra ID
Navigate to the Azure Portal (portal.azure.com)
From the Azure services section on the homepage, click on Microsoft Entra ID
Microsoft Entra ID
Step 2: Navigate to App Registrations
In the Microsoft Entra ID overview page, locate the left navigation menu
Under the Manage section, click on App registrations
App registrations
Step 3: Select Your Application
In the App registrations page, you'll see three tabs:
All applications
Owned applications
Deleted applications
Use the search box to find your application (e.g., "test-azure-cert")
Click on the application name from the search results
Applications
Step 4: Access Certificates & Secrets
Once in the application details page, locate the left navigation menu
Under the Manage section, click on Certificates & secrets
Certificates & Secrets
Step 5: Upload the Certificate
In the Certificates & secrets page, you'll see three tabs:
Certificates
Client secrets
Federated credentials
Ensure you're on the Certificates tab
Click the Upload certificate button
Certificates Panel
Step 6: Complete the Upload Form
In the "Upload certificate" dialog box:
Click the folder icon to browse and select your certificate file
Supported file types: .cer, .pem, .crt
Enter a Description for the certificate (e.g., "test-azure-cert-file")
Click Add to complete the upload
Upload certificate
Important Notes
Certificates can be used as secrets to prove the application's identity when requesting a token
Certificates can also be referred to as public keys
The certificate count is displayed in parentheses on the Certificates tab (e.g., "Certificates (3)")
Ensure your certificate is in the correct format before uploading
Verification
After successful upload, your certificate will appear in the certificates list with:
Certificate name
Expiration date
Thumbprint
Status indicator
3. Azure Configuration - Certificate Upload
This guide provides step-by-step instructions for configuring Azure using certificate-based authentication in FSProtect.