-
Notifications
You must be signed in to change notification settings - Fork 1
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
openapi: more hackery #5
Conversation
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
# LogEntry.body is incorrectly marked as an object in the current | ||
# schema; adjust to a string. Technically the same condition as | ||
# below, but separate for easy removal when fixed upstream. | ||
# https://github.com/sigstore/rekor/pull/2091 | ||
elif .key == "body" and .value.type? == "object" then | ||
.value = {"type": "string"} | ||
# Fix missing inner type on LogEntry.attestation.data. | ||
elif .key == "attestation" and .value.type? == "object" then | ||
.value = {"type": "object", "properties": { "data": {"type": "string", "format": "byte"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applies two fixes:
LogEntry.body
is marked as a JSON object in the upstream schema, but it's really a (base64) string.- The previous patch for
LogEntry.attestation
was slightly wrong, but went un-noticed since relatively few entries have an attestation:attestation
is an object not a string, but its innerdata
member is a bas64 string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty reasonable (or as reasonable as this pile of hacks can be); thanks for digging into this: I took the schema at its word when it claimed that LogEntry.body
was type: object
.
Signed-off-by: William Woodruff <william@trailofbits.com>
Blocked on merge of sigstore/rekor#2092. Once that's in, I can update the repo + ref for Rekor back to upstream. |
Signed-off-by: William Woodruff <william@trailofbits.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, feel free to merge when unblocked!
Signed-off-by: William Woodruff <william@trailofbits.com>
This is a temporary workaround for sigstore/rekor#2091:
LogEntry.body
is marked as an object but is really a base64 string.