c2pa-azure

Crates.ioc2pa-azure
lib.rsc2pa-azure
version0.73.2
created_at2025-10-15 19:12:59.752354+00
updated_at2026-01-05 19:02:03.426668+00
descriptionRust helpers for issuing C2PA signatures via Azure Trusted Signing.
homepagehttps://github.com/duggaraju/c2pa-azure
repositoryhttps://github.com/duggaraju/c2pa-azure
max_upload_size
id1884826
size140,523
Prakash Duggaraju (duggaraju)

documentation

https://github.com/duggaraju/c2pa-azure#readme

README

c2pa-azure

c2pa-azure is a Rust library that leverages the c2pa-rs library and Azure Code Signing service to add content credentials to media files. This library provides a robust solution for ensuring the authenticity and integrity of digital media by embedding cryptographic signatures and metadata.

Features

  • Content Credentials: Utilize c2pa-rs to embed content credentials into media files, ensuring their authenticity.
  • Thumbnail Generation: Automatically generates thumbnails for image files.
  • Ingredient support: Add the original file as an ingredient.
  • Custom Assertions: Ability to add custom assertions.
  • Azure Code Signing: Integrate with Azure Code Signing service to securely sign media content.
  • Command Line Utility: A command line tools for running locally or in a container in azure to sign a file.
  • Azure Container App Support: Support to create a container and deploy to Azure Container Apps for running and scaling using Keda.

Building

Add the following to your Cargo.toml:

cargo build

Manifest and assertsion.

The default manifest settings are stored in manifest.json. It can be edited to add or remove assertsion or ingredients as necessary.

Command Line Utility

Adding Content Credentials

az login
cargo run --bin cli -- -i input.png -o output.png -e https://eus.codesigning.azure.net -a signing_account -c certificate_profile [-m manifest.json]

Azure Container App

Deploy the library as an Azure Container App to automate the signing process for media files uploaded to your Azure storage. It needs the following steps.

  1. Edit common.bicepparm and container-app.bicepparm with the names of the resources you want to use.
  2. Create the common resoures like azure code signing account, container registry etc.
cd deployment
az group create group-name -location 'WestUS'
az deployment group create --resource-group group-name  --template-file common.bicep --parameters common.bicepparam
  1. Build the container and push to the ACR. The registry name is same as what you entered in step 1.
./build.sh -n registry-name
  1. Deploy the continer app with a managed identity and give the required permissions.
az deployment group create --resource-group group-name  --template-file container-app.bicep --parameters container-app.bicepparam

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Commit count: 26

cargo fmt