feat: Add support for Notation signature media type
Relates to issue #2114 (closed)
Changes
This MR adds support for the Notation signature media type application/vnd.cncf.notary.signature to the GitLab Container Registry, enabling users to sign container images using AWS Signer via the CNCF Notary Project.
Database Migration
File: registry/datastore/migrations/premigrations/20260211000000_add_notation_signature_media_type.go
- Created a new database migration following the established pattern
- Used the idempotent
INSERT ... EXCEPT SELECTpattern from the WASM media types migration - Followed the package/imports structure from the Cosign v3 migration
- Includes both
UpandDownmigration paths for safe rollback capability
Documentation Update
File: docs/supported-media-types.md
- Added
application/vnd.cncf.notary.signatureto the supported media types list - Inserted at line 82, between
application/vnd.cncf.openpolicyagent.config.v1+jsonandapplication/vnd.cncf.helm.config.v1+json - Maintained alphabetical descending order as required
Expected Outcome
After deploying these changes:
-
✅ The registry will accept manifests with theapplication/vnd.cncf.notary.signaturemedia type -
✅ Users can successfully sign container images using AWS Signer via Notation -
✅ The media type is properly documented and discoverable -
✅ The database migration is idempotent and safe for production deployment
This eliminates the "manifest invalid: unknown media type: application/vnd.cncf.notary.signature" error and enables AWS Signer integration via the CNCF Notary Project.
Edited by Duo Developer