mirror of
https://github.com/restic/restic.git
synced 2025-08-26 09:28:01 +00:00
Automatically load Google auth
This change removes the hardcoded Google auth mechanism for the GCS backend, instead using Google's provided client library to discover and generate credential material. Google recommend that client libraries use their common auth mechanism in order to authorise requests against Google services. Doing so means you automatically support various types of authentication, from the standard GOOGLE_APPLICATION_CREDENTIALS environment variable to making use of Google's metadata API if running within Google Container Engine.
This commit is contained in:
@@ -8,13 +8,13 @@ import (
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config contains all configuration necessary to connect to a Google Cloud
|
||||
// Storage bucket.
|
||||
// Config contains all configuration necessary to connect to a Google Cloud Storage
|
||||
// bucket. We use Google's default application credentials to acquire an access token, so
|
||||
// we don't require that calling code supply any authentication material here.
|
||||
type Config struct {
|
||||
ProjectID string
|
||||
JSONKeyPath string
|
||||
Bucket string
|
||||
Prefix string
|
||||
ProjectID string
|
||||
Bucket string
|
||||
Prefix string
|
||||
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user