Skip to content

Support providing creds lifetime for GCP connection token#31651

Closed
hussein-awala wants to merge 2 commits into
apache:mainfrom
hussein-awala:gcp_creds_lifetime
Closed

Support providing creds lifetime for GCP connection token#31651
hussein-awala wants to merge 2 commits into
apache:mainfrom
hussein-awala:gcp_creds_lifetime

Conversation

@hussein-awala

Copy link
Copy Markdown
Member

related: #31648

Add a new field for GCP connection extra to override the token default lifetime.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@hussein-awala
hussein-awala requested review from jedcunningham, mik-laj and potiuk and removed request for jedcunningham June 1, 2023 10:46
if self.lifetime:
# Create new impersonated credentials with an extended expiration time
credentials = impersonated_credentials.Credentials(
source_credentials=credentials.source_credentials,

@joonsan-kim-moloco joonsan-kim-moloco Jun 2, 2023

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this comment on issue : #31648 (comment)

I think it's because there are two different Credentials here
It looks like credentials could be one of them according to self.target_principal

  1. Credentials from google.oauth2.service_account [source]
    : returned by self._get_credentials_using_* variations

  2. Credentials from google.auth.impersonated_credentials [source]
    : assigned by if self.target_principal:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:google Google (including GCP) related issues type:new-feature Changelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants