Documentation ¶
Overview ¶
Package auth contains utilities for azure sdk authentication
Index ¶
- func GetArmAuthorizerFromCLI(params cli.GetAccessTokenParams) (autorest.Authorizer, error)
- func GetArmAuthorizerFromEnvironment() (autorest.Authorizer, error)
- func GetArmAuthorizerFromSdkAuth(auth SDKAuth) (autorest.Authorizer, error)
- func GetArmAuthorizerFromSdkAuthJSON(path string, resourceManagerEndpoint string) (autorest.Authorizer, error)
- func GetArmAuthorizerFromSdkAuthJSONString(credentials string, resourceManagerEndpoint string) (autorest.Authorizer, error)
- type SDKAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArmAuthorizerFromCLI ¶
func GetArmAuthorizerFromCLI(params cli.GetAccessTokenParams) (autorest.Authorizer, error)
GetArmAuthorizerFromCLI creates an ARM authorizer from the local azure cli
func GetArmAuthorizerFromEnvironment ¶
func GetArmAuthorizerFromEnvironment() (autorest.Authorizer, error)
GetArmAuthorizerFromEnvironment creates an ARM authorizer from a MSI (e.g. AAD Pod Identity)
func GetArmAuthorizerFromSdkAuth ¶
func GetArmAuthorizerFromSdkAuth(auth SDKAuth) (autorest.Authorizer, error)
GetArmAuthorizerFromSdkAuth creates an ARM authorizer from an Sp Deprecated: Use SDKAuth.GetResourceManagerAuthorizer instead.
func GetArmAuthorizerFromSdkAuthJSON ¶
func GetArmAuthorizerFromSdkAuthJSON(path string, resourceManagerEndpoint string) (autorest.Authorizer, error)
GetArmAuthorizerFromSdkAuthJSON creats am ARM authorizer from the passed sdk auth file
func GetArmAuthorizerFromSdkAuthJSONString ¶
func GetArmAuthorizerFromSdkAuthJSONString(credentials string, resourceManagerEndpoint string) (autorest.Authorizer, error)
GetArmAuthorizerFromSdkAuthJSONString creates an ARM authorizer from the sdk auth credentials
Types ¶
type SDKAuth ¶
type SDKAuth struct { ClientID string `json:"clientId"` ClientSecret string `json:"clientSecret"` SubscriptionID string `json:"subscriptionId"` TenantID string `json:"tenantId"` ARMEndpointURL string `json:"resourceManagerEndpointUrl"` ADEndpointURL string `json:"activeDirectoryEndpointUrl"` }
SDKAuth represents an Azure AD Service Principal
func GetSdkAuthFromString ¶
GetSdkAuthFromString builds from the cmd flags a ServicePrincipal Deprecated: Use SDKAuth.FromString instead.
func (*SDKAuth) FromString ¶
FromString fills the struct with the information from the input json string
func (*SDKAuth) GetResourceManagerAuthorizer ¶
func (auth *SDKAuth) GetResourceManagerAuthorizer() (autorest.Authorizer, error)
GetResourceManagerAuthorizer builds an autorest.Authorizer for the Azure Resource Manager using the given credentials