Skip to content

Commit

Permalink
docs(readme): add example for service_account_impersonation_url in cl…
Browse files Browse the repository at this point in the history
…ientOptions (#1902)

* docs(readme): add service_account_impersonation_url example for AwsSupplier

The service_account_impersonation_url must be passed in the clientOptions
when using a custom AwsSupplier to avoid permissions errors. Updated the
README to include this information.

* docs(config): add service_account_impersonation_url example to .partials.yml

Updated the .partials.yml file to include the service_account_impersonation_url
configuration example, ensuring consistency with the README file.
  • Loading branch information
varun27896 authored Jan 10, 2025
1 parent 0897882 commit f52a190
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .readme-partials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ body: |-
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
subject_token_type: 'urn:ietf:params:aws:token-type:aws4_request', // Set the subject token type.
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION") // Set the custom supplier.
service_account_impersonation_url: 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/$EMAIL:generateAccessToken', // Set the service account impersonation url.
}
// Create a new Auth client and use it to create service client, i.e. storage.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ const clientOptions = {
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
subject_token_type: 'urn:ietf:params:aws:token-type:aws4_request', // Set the subject token type.
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION") // Set the custom supplier.
service_account_impersonation_url: 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/$EMAIL:generateAccessToken', // Set the service account impersonation url.
}

// Create a new Auth client and use it to create service client, i.e. storage.
Expand Down

0 comments on commit f52a190

Please sign in to comment.