Azure function which performs PGP encryption using PgpCore. The public key can be passed as a query parameter, stored in an environment variable, or in Azure Key Vault and accessed using Managed Service Identity.
- Make a request to the function with the unencrypted data in the body
- Option 1: Pass the Base64 encoded public key as a query parameter called public-key
- Option 2: Store the Base64 encoded public key in an environment variable and pass the variable name as a query parameter called public-key-environment-variable
- Option 3: Store the Base64 encoded public key in Azure Key Vault and pass the Key Vault Secret Identifier (e.g. https://vaultname.vault.azure.net/secrets/secretname/) as a query parameter called public-key-secret-id
- Enable Managed Service Identity for your Function App
- Add an Access Policy in Key Vault which gives Get permissions for Secrets to your Function App Principal
- Add a Base64 encoded public key as an Azure Key Vault Secret