Use Policy to Verify Image Signature
Alauda Container Security allows you to ensure the integrity of container images in your clusters by verifying image signatures against pre-configured keys. You can create policies to block unsigned images or images without a verified signature, and enforce these policies using the admission controller to prevent unauthorized deployments.
TOC
Supported Signature Verification Methods
Alauda Container Security supports the following signature verification methods:
- Cosign public keys
- Cosign certificates
Note:
- Only Cosign signatures and Cosign Public Keys/Certificates verification are supported. For more information, see Cosign overview.
- Communication with the transparency log Rekor is not supported.
- At least one Cosign verification method must be configured for signature verification.
- For all deployed and watched images:
- Signatures are fetched and verified every 4 hours.
- Signatures are verified whenever you update signature integration verification data.
Prerequisites
Configure Signature Integration
Using Cosign Public Keys
- In the Alauda Container Security portal, go to Platform Configuration > Integrations.
- Scroll to Signature Integrations and click Signature.
- Click New integration.
- Enter a name for the integration.
- Click Cosign public Keys and then Add a new public key.
- Enter the public key name and the PEM-encoded public key value.
- (Optional) Add more public keys as needed.
- Click Save.
Using Cosign Certificates
- In the Alauda Container Security portal, go to Platform Configuration > Integrations.
- Scroll to Signature Integrations and click Signature.
- Click New integration.
- Enter a name for the integration.
- Click Cosign certificates and then Add a new certificate verification.
- Enter the Certificate OIDC Issuer (regular expressions in RE2 Syntax are supported).
- Enter the Certificate identity (regular expressions in RE2 Syntax are supported).
- (Optional) Enter the Certificate Chain PEM encoded to verify certificates. If not provided, certificates are verified against the Fulcio root.
- (Optional) Enter the Certificate PEM encoded to verify the signature.
- (Optional) Add more certificate verifications as needed.
- Click Save.
Create and Enforce Image Signature Verification Policies
Prerequisites
- At least one Cosign public key must be configured in a signature integration.
Procedure
- When creating or editing a policy, drag the Not verified by trusted image signers criteria into the policy field under Policy criteria.
- Click Select.
- Choose the trusted image signers from the list and click Save.
To prevent the use of unsigned images, enable the Contact Image Scanners feature in your cluster configuration. Then, when creating a security policy to enforce signature verification, select the Inform and enforce option.
For more information, refer to the official Cosign documentation.