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

Upload generated timestamps #336

Merged
merged 5 commits into from
Jun 23, 2021

Conversation

asraa
Copy link
Contributor

@asraa asraa commented Jun 17, 2021

Thanks to @loosebazooka rekor stores RFC 3161 timestaps, so this PR adds create log entries whenever a timestamp is generated.

The output now looks like

$ ./rekor timestamp --artifact file.txt --rekor_server http://localhost:3000
Artifact timestamped at 2021-06-17 19:24:00 +0000 UTC
Wrote timestamp response to response.tsr
Created entry at index 104, available at: http://localhost:3000/api/v1/log/entries/333bf5fd9d3d09057d3b6e5bd7a909940e1889e449c27bc72b7fa1d80958cc7e

Signed-off-by: Asra Ali asraa@google.com

Signed-off-by: Asra Ali <asraa@google.com>
cmd/rekor-cli/app/timestamp.go Outdated Show resolved Hide resolved
pkg/api/entries.go Outdated Show resolved Hide resolved
pkg/api/entries.go Outdated Show resolved Hide resolved
ProposedEntry: createRFC3161FromBytes(resp),
}

logEntry, code, msg, err := createLogEntry(ctx, entryParams)
Copy link
Member

Choose a reason for hiding this comment

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

I vaguely remember something about this being behind a flag like --log or something, not sure if we care about that anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think looking back on it we probably want all timestamps to be logged (even if only using as a timestamping machine) just for sake of transparency. But I'm open to creating a default upload flag and making it configurable per req.

@loosebazooka
Copy link
Member

LGTM.

@cpanato cpanato added this to the 0.3.0 milestone Jun 18, 2021
Signed-off-by: Asra Ali <asraa@google.com>
@asraa
Copy link
Contributor Author

asraa commented Jun 21, 2021

/request review from @bobcallaway. would love input on this "middleware chain" (really not sure if this was the best way)

Signed-off-by: Asra Ali <asraa@google.com>
@cpanato cpanato requested a review from bobcallaway June 21, 2021 14:56
Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

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

a couple thoughts, but overall looking pretty good.

openapi.yaml Show resolved Hide resolved
openapi.yaml Outdated Show resolved Hide resolved
pkg/api/timestamp.go Show resolved Hide resolved
pkg/api/timestamp.go Outdated Show resolved Hide resolved
pkg/api/timestamp.go Outdated Show resolved Hide resolved
asraa added 2 commits June 22, 2021 13:19
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

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

LGTM

@dlorenc dlorenc merged commit 34caf45 into sigstore:main Jun 23, 2021
@asraa asraa deleted the add-timestamp-upload-on-generate branch June 24, 2021 17:15
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.

5 participants