azure: add SAS authentication option

This commit is contained in:
Roger Gammans
2022-03-05 18:16:13 +00:00
committed by Michael Eischer
parent 6cbeb4a9f9
commit 64a7ec5341
6 changed files with 55 additions and 4 deletions
+4
View File
@@ -596,6 +596,10 @@ func parseConfig(loc location.Location, opts options.Options) (interface{}, erro
cfg.AccountKey = options.NewSecretString(os.Getenv("AZURE_ACCOUNT_KEY"))
}
if cfg.AccountSAS.String() == "" {
cfg.AccountSAS = options.NewSecretString(os.Getenv("AZURE_ACCOUNT_SAS"))
}
if err := opts.Apply(loc.Scheme, &cfg); err != nil {
return nil, err
}