Documentation
¶
Overview ¶
Package azure is the Microsoft Azure credential provider: the client secrets of Entra ID applications (service principals), storage account keys, and shared access signatures.
None of the three carries a checksum, and only the client secret has a shape of its own, the `Q~` at its fifth character. A secret is useless without the tenant and the application it belongs to, and a storage key without its account, so Find looks for those next to the credential and keeps them apart in Token.Secret; the report says what it found. Verification is one client-credentials request to the tenant's token endpoint, one signed listing of the storage account's containers, or one HEAD of the resource a signature is for. Nothing here can be revoked by whoever holds it: the owner deletes the secret, rotates the key or the key that signed the signature, and the report carries the procedures.
Index ¶
Constants ¶
const ( // KindClientSecret is the client secret of an Entra ID application; its // name is the secret itself, the tenant and client id travel apart. KindClientSecret detect.Kind = "azure-client-secret" // KindStorageAccountKey is one of the two access keys of a storage // account, reported only next to the account's name. KindStorageAccountKey detect.Kind = "azure-storage-account-key" // KindSASToken is a shared access signature; its name is the `sig` // value, the URL or query it came in travels apart. KindSASToken detect.Kind = "azure-sas-token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// LoginURL is the Entra ID authority, https://login.microsoftonline.com
// by default; the tenant's token endpoint hangs off it.
LoginURL string
// BlobEndpoint is where a storage account's blob service is reached,
// with {account} standing for the account name.
BlobEndpoint string
Client *http.Client
// contains filtered or unexported fields
}
Provider implements detect.Provider for Azure.
func (*Provider) Find ¶
Find implements detect.Provider: client secrets by their anchor, storage keys by their padding, signatures by their `sig=` parameter, each paired with what it needs from the same object.
func (*Provider) Kinds ¶
Kinds implements detect.Provider. Nothing is revocable by the holder; every kind carries the owner's procedure.
func (*Provider) LocalSources ¶
func (*Provider) LocalSources() detect.LocalSources
LocalSources implements detect.Provider: the files the Azure CLI keeps service principal logins and tokens in, and the variables the SDKs, Terraform and the storage tools read. The tenant, client and account variables hold no secret but are listed so a secret or key next to them is paired the way it is in an .env file. Only fingerprints are compared.