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

Stabilization plans? #6

Closed
woodruffw opened this issue Nov 1, 2022 · 6 comments
Closed

Stabilization plans? #6

woodruffw opened this issue Nov 1, 2022 · 6 comments
Labels
question Further information is requested

Comments

@woodruffw
Copy link
Member

Thanks a ton for breaking this repo out! I'm extremely excited to see these formats get developed, so that we can reuse them on sigstore-python.

To whit: is there a current roadmap/schedule for official stabilizing the protobuf definitions in this repo (in particular, the Sigstore bundle definition)? Once there's an official version, even a beta one, we can begin ingesting and emitting it on the Python client side 🙂

@znewman01
Copy link
Contributor

Great question!

I think we'd love feedback at this point. It's been through a bunch of iterations, and I think we've exhausted the use of code review without actual implementers. So we're at a chicken-and-egg point right now.

We may still break you a fair bit at this point :) However, I expect in the long run that most library implementations will implement roughly like:

def verify(artifact: bytes, bundle: sigstoreprotos.Bundle) -> bool:
   foo = _decode_foo(bundle.foo)
   bar = _ decode_bar(bundle.bar)
   return _verify_foo(bytes, foo) and _verify_bar(bytes, bar) && ...

So my hope is that it would be pretty doable to prototype now and deal with minor breakage. In return you'll get to shape the bundle format to make it really easy for you to consume!

I unfortunately don't have an exact schedule. If a bunch of clients try it out and are happy immediately, we can stabilize soon! Otherwise, we probably will need to wait a bit longer. (Sorry for the non-answer)

@woodruffw
Copy link
Member Author

As far as non-answers go, that's a good one 🙂

I'll start playing around with the definitions as they currently are (we'll probably gate them behind some kind of "unstable" or "experimental" flag), and see what rough edges we run up against!

@asraa
Copy link
Contributor

asraa commented Nov 2, 2022

However, I expect in the long run that most library implementations will implement roughly like:

I'd also expect the last major piece is the trusted root that's used for client initialization.

Personally I'm waiting for @kommendorkapten to PR out the verification pseudo-code: https://github.com/kommendorkapten/cosign/blob/bundle_verification/specs/dotsigstore_bundle/verify.md#input

@woodruffw
Copy link
Member Author

On a related note: is there a canonical JSON schema definition for every protobuf definition? My understanding (which might be wrong) of the work here is that both the protobuf wire format and JSON will be acceptable inputs for Sigstore clients.

@kommendorkapten
Copy link
Member

On a related note: is there a canonical JSON schema definition for every protobuf definition?

Yes, protobuf defines a JSON mapping: https://developers.google.com/protocol-buffers/docs/proto3#json

It's very important that clients rely on the proto-JSON serializers instead of any language existing JSON implementation, as the encoded JSON will be (subtly?) different. Examples are: int64 are encoded as a string in proto-JSON, as JSON/JS does not natively support integers; timestamps are always RFC3339 strings etc, attributes within a oneof will appear "direct" on the parent, whereas a native JSON serializer typically would create an intermediate object that holds the attribute.

@woodruffw
Copy link
Member Author

There have been a few bundle releases since I opened this, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants