-
Notifications
You must be signed in to change notification settings - Fork 46
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
Feature request: Create equivalent of with_subject()
from python google.oauth2.service_account
#413
Comments
Do you have a service account that has domain-wide delegation of authority? I think gargle (and therefore googledrive and other packages) basically can already do this or at least it's very close. But I am not allowed to have such a service account in my organization's workspace, so the friction for figuring this out in the abstract has always been too high. But if I am communicating with a motivated user that has the necessary setup, that might be the incentive I need to sort this out finally. Roughly speaking, the experiment to start with is this: token <- gargle::credentials_service_account(scopes = "{YOUR DESIRED SCOPES}", path = "path/to/your/service/account.json", subject = "{USER YOU WANT TO IMPERSONATE}") |
Yes, I have a service account that has domain-wide delegation. Thank you for pointing me to this function! I'm trying it out; will report back after I pair with someone on an error I'm bumping into down in |
Here's a brief update: When using
Stepping through
So far I'm unable to figure out what is different between this code and our python implementation (using |
Brief update:
At this point, I think my feature request would be to support the |
Thanks for your continuing effort and sharing. I'm definitely interested in making this work and what you're doing is extremely helpful. |
No problem! FYI, I can confirm that after adding the additional scope, we are able to successfully accomplish our use case with |
Very interesting! I'm not entirely sure yet how to act on this, but this is a very useful finding. I mean: it is clear that |
I'm doing the most critical thing, which is to add |
The
googledrive::drive_auth
email
param requires that the email used to auth is also the email address of the service account used to perform actions within the Google Drive. In python, we can usewith_subject()
to specify a different email address from the one used to auth. Is there an equivalent function ingoogledrive
?The text was updated successfully, but these errors were encountered: