To get started, open the organization settings page and navigate to the “Encryption keys” tab.Only organization administrators may change the encryption settings.
Key permissions
- Google Cloud Platform (GCP)
- Amazon Web Services (AWS)
BuildBuddy infrastructure will access the supplied key using the
[email protected]
service account. You must grant this service account permissions to use the supplied key. At a minimum, the service
account must be granted both of the following IAM permissions:Considerations
Propagation delay
Propagation delay
When enabling or disabling customer-managed encryption keys, it may take up to 10 minutes for the change to propagate
through the system. If there are active builds during this window, they may experience “not found” errors while the
change propagates.
Existing artifacts
Existing artifacts
Artifacts written prior to enabling this feature will not be retroactively encrypted using the new key, but will
become effectively inaccessible and will be evicted from the cache as part of the regular cache lifecycle.
Key caching
Key caching
The key used for encryption and decryption may be cached in memory by the BuildBuddy infrastructure for up to 10
minutes for performance reasons.
Key rotation
Key rotation
The customer-managed key may be rotated. During rotation, the old key material must remain accessible for at least 24
hours to ensure existing cached artifacts remain accessible.
Implementation details
Key management
When the feature is enabled, two internal 256-bit keys are generated by BuildBuddy:Customer Key generation
The first key (“Customer Key”) is generated and encrypted using the customer-supplied KMS key before being stored within BuildBuddy systems.
BuildBuddy Key generation
The second key (“BuildBuddy Key”) is generated and encrypted using a BuildBuddy-managed key before storage.
During operation, the Derived Key may be cached in memory by BuildBuddy systems for up to 10 minutes for performance
reasons.
Content encryption and decryption
The Derived Key is used to encrypt and decrypt content using the XChaCha20-Poly1305 algorithm.Algorithm
XChaCha20-Poly1305Industry-standard authenticated encryption with associated data (AEAD)
Key Size
256-bitProvides strong cryptographic security
Performance
High throughputOptimized for encrypting large cache artifacts
Authentication
Built-in verificationPoly1305 MAC ensures data integrity
Setup guide
Create or select a KMS key
Create a new key or use an existing symmetric encryption key in your cloud provider’s KMS service (GCP Cloud KMS or AWS KMS).
Grant permissions
Follow the instructions in the Key permissions section above to grant BuildBuddy access to your key.
Configure in BuildBuddy
Navigate to your organization settings → Encryption keys tab, and enter your KMS key identifier:
- GCP:
projects/PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME - AWS:
arn:aws:kms:REGION:ACCOUNT:key/KEY_ID