-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fulcio client #132
Fulcio client #132
Conversation
I want to rework this a bit I think. |
This might be better suited for |
I do still think expanding it and including it in the mainline would be useful, particularly in light of the protobuf-vs-json-vs-whatever discussions. By keeping it in the main tree, downstream users won't have to individually adapt to protocol changes. I do want to make it all Much Better. Ignore this for now (I'll mark it as a draft) and continue to iterate. |
btw, happy for a review now. |
Ok((id_token_claims.clone(), id_token.clone())) | ||
} | ||
|
||
pub async fn redirect_listener_async(self) -> Result<(CoreIdTokenClaims, CoreIdToken)> { |
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.
Could we could combine redirect_listener_async
and redirect_listener
, as they are largely the same apart from a single line (calling either http_client
or async_http_client
This supports usage without spawning blocking tasks, at least with actix_rt. Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
keypair and exchanging the pubkey for a signed certificate. Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
Refactor to allow static or OIDC flow for tokening. Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
bde235d
to
a9b9017
Compare
Signed-off-by: Bob McWhirter <bmcwhirt@redhat.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.
Just one more spotted, sorry about the slow reviews from me @bobmcwhirter
use url::Url; | ||
|
||
/// Default public Fulcio server root. | ||
pub const FULCIO_ROOT: &str = "https://fulcio.sigstore.dev/"; |
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 should be configurable , someone could be using their own instance of fulcio.
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.
The client takes a URL in the ctor. Const just handy for folks who want to use public fulcio.
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.
Just a couple of fmt changes to make, but lgtm!
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.
@bobmcwhirter Please fix the rustfmt errors, then we can go ahead and merge it. I'm good with it too
Signed-off-by: Bob McWhirter <bmcwhirt@redhat.com>
Done! |
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.
thanks for the last round of fixes
Enhancements ============ * update user-agent value to be specific to sigstore-rs (sigstore#122) * remove /api/v1/version from client by (sigstore#121) * crate async fulcio client (sigstore#132) * Removed ring dependency (sigstore#127) Others ====== * Update dependencies * Refactoring and examples for key interface (sigstore#123) * Fix doc test failures (sigstore#136) Contributors ============ * Bob Callaway (@bobcallaway) * Bob McWhirter (@bobmcwhirter) * Flavio Castelli (@flavio) * Luke Hinds (@lukehinds) * Xynnn (@Xynnn007) Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Fixes #131
Summary
Creates an async Fulcio client to make working with Fulcio more straightfoward.
Release Note
Documentation
Rust docs provided.