Content Addressable Storage (CAS) backend
As part of an attestation process, you might want to collect different pieces of evidence such as Software Bill Of Materials (SBOMs), test results, runner logs, etc and then attach them to the final in-toto attestation.
Chainloop helps with this process by providing a Content Addressable Storage API proxy that:
- Abstracts away the underlying storage backend. Currently, we support OCI registries as storage backends but you can expect blob storage, Artifactory and other storage backends to be supported in the future.
- Makes sure that the pieces of evidence are stored in a tamper-proof manner. This is achieved by storing the evidences named after their SHA256 content digest, which is calculated by the client, verified by the CAS server.
- Enables support of large pieces of evidence since the content digest reference is what will be stored in the attestation.
Manage Storage Backends
You can setup as many CAS backends as you want, but you can only have one enabled as default at the time. This default backend will be used during the attestation process to store the pieces of evidence.
You can manage your CAS backends in the Storage Backends Section.
You can manage your CAS backends in the Storage Backends Section.
In Chainloop, CAS backends can be managed with the chainloop cas-backend
command.
Storage Backend providers
New CAS Backends will be added over time. If yours is not implemented yet, please let us know
Inline (fallback)
Chainloop comes pre-configured with what we call an inline
backend that embeds the pieces of evidence in the resulting attestations.
Inline backend is useful to get started quickly but since the metadata is embedded in the attestation, its max size is limited.
We recommend to switch to a more robust backend such when moving to production.
OCI registry
Add a new OCI registry backend
AWS Container Registry is not supported yet.
Rotate credentials
Set as default
AWS S3
Chainloop also supports storing artifacts in AWS S3 Blob Storage.
Pre-requisites
To connect your AWS account to Chainloop you’ll need:
- S3 Bucket Name
- Bucket Region
- AccessKeyID
- SecretAccessKey
Create an S3 bucket
Create an S3 bucket and take note of the bucket name and region
Create an IAM user with access to that bucket
Next we are going to create a policy that has write/read permissions to the bucket.
You can use the snippet below by just replacing [bucketName]
with the actual name of the bucket you created in the step before.
Then create an user, attach the policy to it and click on “create access Key”
Then select third-party service and copy the access key ID and secret access key
We are now ready to connect our AWS account to Chainloop
Rotate credentials
Azure Blob Storage
Chainloop also supports storing artifacts in Azure Blob Storage.
Pre-requisites
To connect your Azure storage account you’ll need the following information
- Active Directory Tenant ID
- Service Principal ID
- Service Principal Secret
- Storage account name
We’ll walk you through the process of how to find this information
Register an application to create the service principal
First, you’ll need to register an application in your Azure Active Directory tenant. You can do this using the Azure CLI or from the Azure portal
Once done, in the application overview you should be able to find the tenantID, and Service principal ID
Next, let’s create a secret for the service principal
Create a storage account and give permissions to the service principal
Next, we’ll create a storage account (or you can use an existing one), take a note on the storage account name.
And once created, we’ll give permissions to the service principal, go to IAM assign-roles.
Search for the application we just registered and assign the Storage Blob Data Contributor role
At thi point we have all the information we need to connect our Azure storage account to Chainloop
Rotate credentials
Cloudflare R2
Cloudflare R2 is compatible with AWS S3 and can be configured in Chainloop by providing a custom endpoint.
Pre-requisites
- AccessKeyID
- SecretAccessKey
- Bucket Name
- Endpoint
Follow this instructions to create a compatible AccessKeyID and SecretAccessKey. Then copy the bucket name and endpoint from the bucket settings.
Finally register the Cloudflare R2 bucket using the aws-s3
provider and providing the custom endpoint.
Minio
Minio is an S3-compatible blob storage that can be configured in Chainloop by providing a custom endpoint.
Pre-requisites
- AccessKeyID
- SecretAccessKey
- Bucket Name
- Minio Endpoint
You can create a new AccessKey from the Minio console.
Then copy the bucket name and Minio endpoint.
Finally register the Minio bucket using the aws-s3
provider and providing the custom endpoint
Give it a try
If everything went well, you should be able to upload and download artifact materials, let’s give it a try