Skip to content

Commit

Permalink
when using a service account, audience should not be set
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Dec 5, 2024
1 parent 70ba282 commit f3110c8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/rattler_networking/src/gcs_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ impl Middleware for GCSMiddleware {

/// Auth to GCS
async fn authenticate_with_google_cloud(mut req: Request) -> MiddlewareResult<Request> {
let audience = "https://storage.googleapis.com/";
let scopes = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.read_only",
];
let scopes = ["https://www.googleapis.com/auth/devstorage.read_only"];

let config = Config::default()
.with_audience(audience)
.with_scopes(&scopes);
let config = Config::default().with_scopes(&scopes);

match DefaultTokenSourceProvider::new(config).await {
Ok(provider) => match provider.token_source().token().await {
Expand Down

0 comments on commit f3110c8

Please sign in to comment.