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

spec_version compliance #206

Closed
jku opened this issue Jan 18, 2022 · 8 comments
Closed

spec_version compliance #206

jku opened this issue Jan 18, 2022 · 8 comments

Comments

@jku
Copy link
Member

jku commented Jan 18, 2022

data/types.go sets the default specVersion value to "1.0".

I think strictly speaking this is not compliant with the spec which states that "format follows semver". Semver says

version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers

So I think it should be "1.0.28" (or "1.0.0" or whatever the highest known supported version is) instead of "1.0".

I'm mostly bringing this up because currently metadata generated with go-tuf is incompatible with python-tuf ngclient. python-tuf might end up supporting "X.Y" (theupdateframework/python-tuf#1751) but I thought I should mention this here as well.

@trishankatdatadog
Copy link
Member

Unfortunately, this might break compatibility with Rust implementations of TUF (awslabs/tough and rust-tuf), needs double-checking...

@jku
Copy link
Member Author

jku commented Jan 24, 2022

For the record, I'm not suggesting go-tuf should necessarily reject "X.Y" in existing metadata, I'm suggesting go-tuf probably should not create new metadata with "X.Y": this seems not specification compliant.

AWS tough seems to be fine with X.Y.Z but based on a quick look the other rust implementation has chosen to only accept spec_version: "1.0" (so not just X.Y but exact version match) during deserialization. This seems like a decision (conscious or not) that should not prevent others from using spec_version as intended. A bug report on rust-tuf might be in order?

@trishankatdatadog
Copy link
Member

Yes, I don't think we can close this issue until we can make sure that go-tuf/python-tuf/rust-tuf can interoperate with each other with this change

@HLeithner
Copy link

Just for the record php-tuf failed to validate go-tuf spec_version because of this. tuf-python generated 1.0.0...

@HLeithner
Copy link

Any progress on this topic?

@rdimitrov
Copy link
Contributor

I've opened a PR fixing the initial values for metadata roles 👍 I also did not find a place where go-tuf actually acts differently(i.e. rejects something) based on the spec_version field. Nevertheless, it's good to note that if there's an implementation that depends on a non-spec compliant versioning it may be affected by this change. We should decide whether this is something we want to support/encourage or not.

@HLeithner
Copy link

Thanks for the pull request hopefully this get merged.

@rdimitrov
Copy link
Contributor

rdimitrov commented Jan 31, 2024

Closing since the code base changed and the new one doesn't have this issue anymore.

Thanks for raising this! 👍

cc: @HLeithner @LadySolveig

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

No branches or pull requests

4 participants