-
Notifications
You must be signed in to change notification settings - Fork 58
[DRAFT] Add RekorV2Client #1400
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
Conversation
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
I'll look at cleaning up some tests next:
In fact I don't think we need to test with multiple instances at all in the RekorClient test -- we will have integration tests later for the whole client |
Note to self:
I'll look into this later this week. EDIT: I have done this change: the log submitter abstraction is now less leaky |
* Make sure the exposed signatures actually are abstract: the request payload can be just a dict so both clients actually implement the same API * There is still a "EntryRequest" NewType being used instead of dict just to make the intent clear Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
todo for this pr:
|
resp = self.session.post( | ||
f"{self.url}/log/entries", | ||
json=payload, | ||
timeout=CREATE_ENTRIES_TIMEOUT_SECONDS, | ||
) |
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 does not really do what the rekor docs say... Session timeout is the maximum allowed time between any two bytes the server sends as response. So the effective total timeout could still be effectively infinite.
I don't think the setting here is harmful but it strongly suggests that we're enforcing the rekor documented overall timeout when we're really not... We could either not have a timeout (we don't in other places) or mention in a comment that this is not the same thing as the rekor 20 sec recommendation
* Don't pretend these are unit tests: just have something simple that proves the client roughly does what it should * We should have real unit tests (that don't require the whole staging infra as current tests do) and integration tests but this is what I have now Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
I've replaced the tests with two very simple staging tests -- they're definitely not unit tests but essentially integration tests (with a small hack since the integration does not exist yet) that prove the client is at some level operational. I think I'll move this branch to origin -- that should make the staging tests run (since the GH token should be available)... |
closing for #1422 (the branch is the same, but now in origin so staging tests run on CI) |
Client support for Rekor V2: sigstore-python #289
Summary
Adds a new
RekorV2Client
class, for use as a library, not yet within the CLI.With the same pending TODOs in #1387
Testing
TODOS
get_tile
,get_entry_bundle
,get_checkpoint
....V_0_0_2
is changed to...V002
Release Note
RekorV2Client
for posting new entries to a Rekor V2 instance.Documentation
TODO