iterative / iterative/PyDrive2

no support for `google.auth.default`

Open
#179 6 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Python
Stars
670
Forks
75
PR merge metrics
No merged PRs in 30d

Description

To support CI workflows building off gh actions, I'd like to use the recommended auth method using `google.auth.default` with `google-github-actions/auth@v0.4.0` - [https://github.com/google-github-actions/auth](https://github.com/google-github-actions/auth).

This would (hopefully) allow the following, using the more modern `google.auth` lib:

```
gauth = GoogleAuth()
try:
gauth.credentials = ServiceAccountCredentials.from_json_keyfile_name(LOCAL_KEY, SCOPES) # support local dev
except FileNotFoundError:
credentials, _ = google.auth.default(SCOPES) # prod
gauth.credentials = credentials
```

This is defined here:
[https://google-auth.readthedocs.io/en/master/user-guide.html](https://google-auth.readthedocs.io/en/master/user-guide.html)

Unfortunately forcing auth with a local service account key file is a poor security implementation, and not really acceptable for cloud CI.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.