Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Manage compute_engine.Credentials default service_account_email case #12

Closed
loicsikidi opened this issue Mar 30, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@loicsikidi
Copy link
Owner

loicsikidi commented Mar 30, 2023

Context

When the library runs on GCP infrastructure, compute_engine.Credentials is used by google.application.default().

For some strange reason, the value given to service_account_email property is default (see more here).

The latter is updated (with the correct value) only after the refresh process (see more here).

The bug is only observable in the following use-case (when the target_principal is deducted from the source_credentials):

source_credentials, _ = google.auth.default()

delegated_credentials = dwd_credentials.Credentials(
  subject=subject,
  source_credentials=source_credentials,
  target_scopes = target_scopes,
)

The lib must handle this scenario!

@loicsikidi loicsikidi added the bug Something isn't working label Mar 30, 2023
@loicsikidi loicsikidi self-assigned this Mar 30, 2023
loicsikidi pushed a commit that referenced this issue Mar 30, 2023
Note:
 * fix: manage default service_account_email
loicsikidi added a commit that referenced this issue Mar 30, 2023
#12 improve compute_engine.Credentials case

Note:
 * fix: manage default service_account_email
loicsikidi added a commit that referenced this issue Mar 30, 2023
loicsikidi added a commit that referenced this issue Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant