-
Notifications
You must be signed in to change notification settings - Fork 23
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
Signed URL support #170
Comments
Hey, Seems you have everything needed available:
let client: GoogleApi<IamCredentialsClient<GoogleAuthMiddleware>> = GoogleApi::from_function(
IamCredentialsClient::new,
"https://iamcredentials.googleapis.com",
None,
)
.await?;
let resp = client
.get()
.sign_blob(
tonic::Request::new(
gcloud_sdk::google::iam::credentials::v1::SignBlobRequest {
name: "projects/-/serviceAccounts/<your-sa@email>".to_string(),
delegates: vec![],
payload: canonical_req.as_bytes().to_vec(),
}
)
)
.await?; If you want to make an auxiliary function to help others, feel free to open PR for sure :) |
Does this mean I need to extend the Credentials enum, and if the service accout is present, load it into ring and use ring to sign right? gcloud-sdk-rs/gcloud-sdk/src/token_source/credentials.rs Lines 14 to 19 in db03cc9
|
If you can use Otherwise, no need to introduce any other type, you just need to read JSON file using existing functions like from_well_known_file/from_file/fron_json to read Credentials. |
Hello and thank you for this amazing library.
I've been working with this library for quite a while and it's really good. I wanna ask is it possible to support signed url generation for google cloud storage with this crate? I am willing to contribute to make it happen. Thank you.
The text was updated successfully, but these errors were encountered: