steampipe-plugin-googleworkspace
steampipe-plugin-googleworkspace copied to clipboard
can we use the refresh token in ./config/gcloud/application_default_credentials.json?
I am using method 2 from https://hub.steampipe.io/plugins/turbot/googleworkspace. I acquire the credentials file like so:
gcloud auth application-default login --client-id-file=client_secret.json --scopes="https://www.googleapis.com/auth/calendar.readonly,https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/contacts.readonly,https://www.googleapis.com/auth/directory.readonly,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/spreadsheets.readonly"
After a couple of days this happens:
googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.
I can, and do, reacquire the credentials file. But there's a refresh token in it, shouldn't the underlying Go SDK use that to refresh the access token?
per @cbruno10:
here’s a possibly relevant discussion from the SDK repo - https://github.com/googleapis/google-api-go-client/issues/111
If that works it will also benefit the Google Directory and Google Sheets plugins.
@judell thanks for opening this issue. We are looking into this issue. Seems like the access token is not getting refreshed after getting expired. We have checked the SDK and seems like ReUseTokenSource is probable solution. We will provide an update on this ASAP.
'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
'This issue was closed because it has been stalled for 90 days with no activity.'
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 90 days with no activity.
@judell after reviewing the issue, we've determined that it is not currently a priority in our roadmap. While we acknowledge its importance, we need to focus on higher-priority tasks at this time.
We’re closing this issue for now, but we encourage further discussion if there are critical concerns. If priorities shift in the future, we may revisit this.
Thanks again for your input!