You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to see how we can have our server send data to a google drive without interactive login being required. We want to find out how we can be treated as a service principal, daemon, whatever.
Acceptance Criteria
Prototype or really good documentation of how this can work.
Dev Notes
We really don't want to hardcode secrets if we can avoid it. But using google secrets manager is probably acceptable
Here's how we can access files with the the cloud run service account credential. We just need to share the desired folder with the service account compute email address
varcredential=GoogleCredential.GetApplicationDefault();varservice=newDriveService(newBaseClientService.Initializer(){HttpClientInitializer=credential,ApplicationName="Drive API .NET Quickstart",});// Define parameters of request.FilesResource.ListRequestlistRequest=service.Files.List();listRequest.PageSize=10;listRequest.Fields="nextPageToken, files(id, name)";// List files.IList<Google.Apis.Drive.v3.Data.File>files=listRequest.Execute().Files;stringreturnString="Files:\n";if(files!=null&&files.Count>0){foreach(varfileinfiles){returnString+=$"{file.Name} ({file.Id})";}}else{returnString="No files found.";}Console.WriteLine(returnString);
Description
We need to see how we can have our server send data to a google drive without interactive login being required. We want to find out how we can be treated as a service principal, daemon, whatever.
Acceptance Criteria
Dev Notes
Who should I contact?
@ryanrightmer
Size of Ticket
S
The text was updated successfully, but these errors were encountered: