We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Feature request to support service account impersonation provided by iamcredentials.generateAccessToken()
iamcredentials.generateAccessToken()
This will allow one set of credentials to assume another set for use in the coud libraries:
sample usage:
String cred_env = "/path/to/svc_account.json"; ServiceAccountCredentials source_credentials = ServiceAccountCredentials .fromStream(new FileInputStream(cred_env)); source_credentials = (ServiceAccountCredentials) source_credentials .createScoped(Arrays.asList("https://www.googleapis.com/auth/iam")); ImpersonatedCredentials target_credentials = ImpersonatedCredentials.create( source_credentials, "impersonated-account@fabled-ray-104117.iam.gserviceaccount.com", null, Arrays.asList("https://www.googleapis.com/auth/devstorage.read_only"), 3600); Storage storage_service = StorageOptions.newBuilder().setProjectId("project-id") .setCredentials(target_credentials).build().getService(); for (Bucket b : storage_service.list().iterateAll()) System.out.println(b);
ref:
in python: googleapis/google-auth-library-python#299
in golang: golang/oauth2#335
The text was updated successfully, but these errors were encountered:
Added in #211 and released in 0.12.0.
Sorry, something went wrong.
chingor13
No branches or pull requests
Feature request to support service account impersonation provided by
iamcredentials.generateAccessToken()
This will allow one set of credentials to assume another set for use in the coud libraries:
sample usage:
ref:
in python: googleapis/google-auth-library-python#299
in golang: golang/oauth2#335
The text was updated successfully, but these errors were encountered: