Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new oci compat mediatype for bundles #688

Merged
merged 1 commit into from
May 6, 2024

Conversation

loosebazooka
Copy link
Member

No description provided.

@loosebazooka loosebazooka force-pushed the protobuf-spec-oci-mediatype branch from c2d8b52 to e507ccc Compare May 2, 2024 19:15
@loosebazooka loosebazooka requested a review from vlsi May 2, 2024 19:15
haydentherapper
haydentherapper previously approved these changes May 2, 2024
@@ -59,8 +59,10 @@ class BundleFactoryInternal {
private static final String BUNDLE_V_0_1 = "application/vnd.dev.sigstore.bundle+json;version=0.1";
private static final String BUNDLE_V_0_2 = "application/vnd.dev.sigstore.bundle+json;version=0.2";
private static final String BUNDLE_V_0_3 = "application/vnd.dev.sigstore.bundle+json;version=0.3";
// media_type format switch: https://github.com/sigstore/protobuf-specs/pull/279
private static final String BUNDLE_V_0_3_1 = "application/vnd.dev.sigstore.bundle.v0.3+json";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To confirm, is there anywhere in the verification path where you need to treat BUNDLE_V_0_3_1 and BUNDLE_V_0_3 as equivalent bundles?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equivalent? We just parse them or we dont.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reality of this is we only have a single parser based on the protobuf spec build at v0.3.1, we're pretty permissive with the bundle mediatype. We don't punish v2, v1 bundles that use v3 features. If the v3 parser can parse it, we're okay and we use it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, we ignore that v1 allows no inclusion proof. Those bundles are invalid as far as we're concerned.

@loosebazooka loosebazooka merged commit af3c834 into main May 6, 2024
14 of 19 checks passed
@loosebazooka loosebazooka deleted the protobuf-spec-oci-mediatype branch May 6, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants