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

Should POUF-1 allow whitespace for prettified output? #161

Open
erickt opened this issue Sep 23, 2022 · 2 comments
Open

Should POUF-1 allow whitespace for prettified output? #161

erickt opened this issue Sep 23, 2022 · 2 comments

Comments

@erickt
Copy link

erickt commented Sep 23, 2022

In this conversation on #tuf, I'm in the process of renaming rust-tuf's interchange types to pouf, since that's more aligned with the tuf project. One complication though is that rust-tuf supports a prettified version of pouf-1 with JsonPretty. We use this to generate golden files to make sure code changes don't unintentionally change pregenerated metadata. It's much easier to read pretty json than minified json. However, according to pouf-1, this format uses OLPC's canonical json format, which disallows whitespace.

rust-tuf, and I'm guessing all the other implementations of POUF-1, can work with prettified metadata without issue. Should this be something that's formally supported? Or should implementations like this be treated as a non-standard POUF? If the latter, how should we refer to things like this? Should we avoid using the term POUF with things like this?

@trishankatdatadog
Copy link
Member

My vote is yes: POUF-1 should allow whitespace

@mnm678
Copy link
Contributor

mnm678 commented Sep 27, 2022

As long as the implementations are compatible, they should be able to share a POUF number. We should update POUF-1 accordingly.

erickt added a commit to erickt/rust-tuf that referenced this issue Sep 28, 2022
After a discussion with the TUF community, we decided it made more sense
to name our implementation of [POUF-1] as `Pouf1`, not `Json`, because it
has additional restrictions on top of JSON. Furthermore, it doesn't make
sense to call this [CJSON] since TUF doesn't allow for raw bytes in
strings.

This also moves `JsonPretty` into the interop-tests, since this is only
used to make the interop tests easier to review. I've filed [161] with
the TUF spec to consider allowing whitespace in POUF-1. If this is accepted
we can move this back into the tuf::pouf submodule.

[POUF-1]: https://github.com/theupdateframework/taps/blob/master/POUFs/reference-POUF/pouf1.md
[161]: theupdateframework/taps#161
[CJSON]: https://wiki.laptop.org/go/Canonical_JSON
erickt added a commit to erickt/rust-tuf that referenced this issue Sep 28, 2022
After a discussion with the TUF community, we decided it made more sense
to name our implementation of [POUF-1] as `Pouf1`, not `Json`, because it
has additional restrictions on top of JSON. Furthermore, it doesn't make
sense to call this [CJSON] since TUF doesn't allow for raw bytes in
strings.

This also moves `JsonPretty` into the interop-tests, since this is only
used to make the interop tests easier to review. I've filed [161] with
the TUF spec to consider allowing whitespace in POUF-1. If this is accepted
we can move this back into the tuf::pouf submodule.

[POUF-1]: https://github.com/theupdateframework/taps/blob/master/POUFs/reference-POUF/pouf1.md
[161]: theupdateframework/taps#161
[CJSON]: https://wiki.laptop.org/go/Canonical_JSON
erickt added a commit to theupdateframework/rust-tuf that referenced this issue Sep 28, 2022
After a discussion with the TUF community, we decided it made more sense
to name our implementation of [POUF-1] as `Pouf1`, not `Json`, because it
has additional restrictions on top of JSON. Furthermore, it doesn't make
sense to call this [CJSON] since TUF doesn't allow for raw bytes in
strings.

This also moves `JsonPretty` into the interop-tests, since this is only
used to make the interop tests easier to review. I've filed [161] with
the TUF spec to consider allowing whitespace in POUF-1. If this is accepted
we can move this back into the tuf::pouf submodule.

[POUF-1]: https://github.com/theupdateframework/taps/blob/master/POUFs/reference-POUF/pouf1.md
[161]: theupdateframework/taps#161
[CJSON]: https://wiki.laptop.org/go/Canonical_JSON
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

3 participants