A lightweight web application that provides a human-readable inventory of TLS/SSL certificates and client certificates in your Azure App Service Linux environment.
- Lists public certificates (DER format) from
/var/ssl/certs - Lists private certificates (P12 format) from
/var/ssl/private - Displays certificate metadata including:
- Subject and issuer information
- Validity dates and expiration status
- Serial numbers and fingerprints
- File details for password-protected certificates
- Shows environment variables related to certificates
- Simple, clean, responsive web interface
- An Azure App Service (Linux)
- GitHub account to host the repository
- Access to GitHub Actions or Azure DevOps pipelines
- Fork or clone this repository to your GitHub account
- In your GitHub repository settings, add these secrets:
AZURE_WEBAPP_NAME: Your App Service nameAZURE_WEBAPP_PUBLISH_PROFILE: Your publish profile XML content (download from Azure Portal)
- Push to the main branch, and GitHub Actions will deploy to your Azure App Service
- Clone this repository to your local machine
- In the Azure Portal, navigate to your App Service
- Go to Deployment Center
- Choose your preferred deployment method (Local Git, GitHub, etc.)
- Follow the prompts to connect your repository
- Deploy the code to your App Service
# Login to Azure
az login
# Set your subscription
az account set --subscription <subscription-id>
# Deploy to App Service
az webapp up --name <app-name> --resource-group <resource-group-name> --runtime "PYTHON:3.9"Ensure your App Service has these configurations:
- Runtime Stack: Python 3.9 or later
- Startup Command:
gunicorn --bind=0.0.0.0 --timeout 600 app:app - Application Settings:
SCM_DO_BUILD_DURING_DEPLOYMENT: Set totruePYTHONPATH:/home/site/wwwroot
To monitor and manage deployments through the Azure Portal:
- Navigate to your App Service in the Azure Portal
- Select "Deployment Center" from the left navigation menu
- If using GitHub Actions, you'll see your deployments listed here
- Select a deployment to view logs and status details
- Use "Logs" tab to troubleshoot any deployment issues
For the application to access certificates:
- The application needs read access to
/var/ssl/certsfor public DER certificates - The application needs read access to
/var/ssl/privatefor private P12 certificates - Ensure
WEBSITE_LOAD_CERTIFICATESis set to*to load all certificates or specific thumbprints to load individual certificates
# Clone repository
git clone https://github.com/yourusername/azure-cert-inventory.git
cd azure-cert-inventory
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the app locally
python app.pyFlask==2.3.3
pyOpenSSL==23.2.0
cryptography==41.0.3
Contributions are welcome! Please feel free to submit a Pull Request.
