-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Scopes not configured for service account error #341
Copy link
Copy link
Closed
Labels
🚨 criticalP0 critical issue. Requires immediate fixP0 critical issue. Requires immediate fixapi: coreauthtriage meI really want to be triaged.I really want to be triaged.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.
Metadata
Metadata
Assignees
Labels
🚨 criticalP0 critical issue. Requires immediate fixP0 critical issue. Requires immediate fixapi: coreauthtriage meI really want to be triaged.I really want to be triaged.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This error occurs to me when I try to use default credentials created from the GOOGLE_APPLICATION_CREDENTIALS variable. This is the error I get whenever I try to issue a request:
It seems that to create default credentials based on the env variable we must supply the service scopes. This can be done by changing this line to:
This would require, however, to change our
AuthCredentials.createApplicationDefaultsmethod to accept a set of scopes as a parameter.Noticeably, scopes are not required to be passed when Google Cloud SDK credentials are used. Is this a desired behavior of the auth library? Should we add this
scopesparameter?