-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
quota_project_id
is not currently passed through to _get_gcloud_sdk_credentials
. This bit of code still results in the end user credentials warning:
import google.auth
credentials, project_id = google.auth.default(quota_project_id="my-project")
google-auth-library-python/google/auth/_default.py
Lines 177 to 195 in 09e0389
def _get_gcloud_sdk_credentials(): | |
"""Gets the credentials and project ID from the Cloud SDK.""" | |
from google.auth import _cloud_sdk | |
_LOGGER.debug("Checking Cloud SDK credentials as part of auth process...") | |
# Check if application default credentials exist. | |
credentials_filename = _cloud_sdk.get_application_default_credentials_path() | |
if not os.path.isfile(credentials_filename): | |
_LOGGER.debug("Cloud SDK credentials not found on disk; not using them") | |
return None, None | |
credentials, project_id = load_credentials_from_file(credentials_filename) | |
if not project_id: | |
project_id = _cloud_sdk.get_project_id() | |
return credentials, project_id |
google-auth-library-python/google/auth/_default.py
Lines 73 to 75 in 09e0389
def load_credentials_from_file( | |
filename, scopes=None, default_scopes=None, quota_project_id=None, request=None | |
): |
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.