Documentation
¶
Overview ¶
Package adlsauth holds the part of the Azure FileIO's authentication order that code outside io/gocloud/azure has to agree with. The REST catalog uses it to keep a vended adls.token from being shadowed by inherited credentials, and the io/gocloud/azure tests pin it against the bucket factory's actual selection, so a change to the factory's order fails a test instead of silently shadowing the token again.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearTokenShadowingCredentials ¶
ClearTokenShadowingCredentials deletes from props, the properties of an IO for acct, the credentials the Azure bucket factory selects ahead of a nonempty adls.token: any shared key, the SAS token for acct's host and the connection string for acct's name. SAS tokens and connection strings for other accounts are keyed by account, never apply to acct, and are kept.
The shared key is cleared whichever account it names, because the factory does not scope it: a configured shared key signs requests to every account, so one for another account would sign acct's requests with the wrong key. Callers pass a copy, so the shared key stays in the configuration other accounts' IO is built from.
Types ¶
type Account ¶
type Account struct {
// Host keys SAS tokens, for example myaccount.dfs.core.windows.net.
Host string
// Name keys connection strings, for example myaccount.
Name string
}
Account identifies the storage account an ADLS location authenticates against, in the two forms the Azure bucket factory keys per-account credentials by.
func AccountFor ¶
AccountFor returns the storage account for location, or false if location has no account.
func AccountForURL ¶
AccountForURL returns the storage account for a parsed location, or false if it has no account. The Azure bucket factory derives its account through this too, so credentials are cleared under the same keys they are looked up by.