-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Surely delete temporary credentials files of Google Cloud #10203
Labels
Comments
I havne't completely design how to enhance the functions around Google Cloud authorization. But, the official python SDK offers a couple of functions to safely refresh or revoke credentials. We can probably take advantage of them. from google.oauth2.credentials import Credentials
from google.auth.transport.requests import Request
from google.oauth2 import service_account
# Create a credentials object from a service account key file
creds = service_account.Credentials.from_service_account_file('path/to/keyfile.json')
# Make a request to revoke the credentials
creds.revoke(Request()) |
let's clean this up in the |
9 tasks
I will take care of this issue. |
This needs to be properly handled for multi project ingestion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Take the BigQuery connector, for instance. The set_google_credentials function can be called multiple times during ingesting BigQuery metadata, if we pass raw service account key information to a database source. In reality, the close method of BigQuerySource tries to delete the temporary credentials file. However, temp_credentials property isn’t set anywhere, if I am correct. Aside from that, the get_connection function creates a temporary credentials file every time. I am doubting created credentials files remains. If I am correct, I would like to know how to completely delete created temporary files.
Specifically, the issue happens with the configuration.
In my opinion, we can have the similar issue on other source connectors, as we don't have an abstract feature or function to surely delete used temporary credentials file. To avoid the situation, we can also improve functions to deal with connections.
Describe the solution you'd like
There are a couple of ideas to surely delete temporary credentials files:
BigQuerySource
.get_connection
by authenticating and removing credentials on the connection side. By doing so, we may have to redesign the way to deal with connections.Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: