Skip to content

Commit

Permalink
Update to yup_oauth11 ecosystem
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Oct 17, 2024
1 parent 024e942 commit 605bfe5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 113 deletions.
148 changes: 43 additions & 105 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ crc32c = "0.6.8"
diesel = { version = "2.2.4", features = ["postgres"] }
diesel_migrations = { version = "2.2.0" }
dropshot = { version = "0.12.0" }
google-cloudkms1 = "5.0.5"
google-cloudkms1 = "6.0.0"
heck = "0.5.0"
hex = "0.4.3"
http = "1"
Expand Down Expand Up @@ -51,4 +51,4 @@ tracing = "0.1.40"
url = "2.5.2"
uuid = "1.11.0"
valuable = "0.1.0"
yup-oauth2 = "9.0.0"
yup-oauth2 = "11.0.0"
4 changes: 2 additions & 2 deletions v-api/src/authn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crc32c::crc32c;
use dropshot::{HttpError, RequestContext, SharedExtractor};
use dropshot_authorization_header::bearer::BearerAuth;
use google_cloudkms1::{
api::AsymmetricSignRequest, hyper::client::HttpConnector, hyper_rustls::HttpsConnector,
CloudKMS,
api::AsymmetricSignRequest, hyper_rustls::HttpsConnector,
hyper_util::client::legacy::connect::HttpConnector, CloudKMS,
};
use rsa::{
pkcs1v15::Signature,
Expand Down
12 changes: 8 additions & 4 deletions v-api/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use diesel::result::{DatabaseErrorKind, Error as DieselError};
use google_cloudkms1::{hyper_rustls::HttpsConnector, CloudKMS};
use google_cloudkms1::{
hyper_rustls::{HttpsConnector, HttpsConnectorBuilder},
hyper_util::client::legacy::{connect::HttpConnector, Client},
hyper_util::rt::TokioExecutor,
CloudKMS,
};
use v_model::storage::StoreError;
use yup_oauth2::hyper::client::HttpConnector;

use crate::authn::CloudKmsError;

Expand Down Expand Up @@ -223,8 +227,8 @@ pub async fn cloud_kms_client() -> Result<CloudKMS<HttpsConnector<HttpConnector>
};

let gcp_kms = CloudKMS::new(
yup_oauth2::hyper::Client::builder().build(
yup_oauth2::hyper_rustls::HttpsConnectorBuilder::new()
Client::builder(TokioExecutor::new()).build(
HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
Expand Down

0 comments on commit 605bfe5

Please sign in to comment.