iam

package
v0.0.0-...-3bb9bf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBatchAuthorizer

func GetBatchAuthorizer(creds config.Credentials) (autorest.Authorizer, error)

GetBatchAuthorizer gets an OAuthTokenAuthorizer for Azure Batch.

func GetGraphAuthorizer

func GetGraphAuthorizer(creds config.Credentials) (autorest.Authorizer, error)

GetGraphAuthorizer gets an OAuthTokenAuthorizer for graphrbac API.

func GetGroupsAuthorizer

func GetGroupsAuthorizer(creds config.Credentials) (autorest.Authorizer, error)

GetGroupsAuthorizer gets an OAuthTokenAuthorizer for resource group API.

func GetKeyvaultAuthorizer

func GetKeyvaultAuthorizer(creds config.Credentials) (autorest.Authorizer, error)

GetKeyvaultAuthorizer gets an OAuthTokenAuthorizer for use with Key Vault keys and secrets. Note that Key Vault *Vaults* are managed by Azure Resource Manager.

func GetMSITokenForResource

func GetMSITokenForResource(resource string) (*adal.ServicePrincipalToken, error)

GetMSITokenForResource returns the MSI token for a resource

func GetMSITokenForResourceByClientID

func GetMSITokenForResourceByClientID(resource string, clientID string) (*adal.ServicePrincipalToken, error)

GetMSITokenForResourceByClientID returns the MSI token for a resource by the client ID

func GetMSITokenProviderForResource

func GetMSITokenProviderForResource(resource string) (func() (string, error), error)

GetMSITokenProviderForResource gets a token provider for the given resource. A token provider is just a function that returns the OAuth token when called

func GetMSITokenProviderForResourceByClientID

func GetMSITokenProviderForResourceByClientID(resource string, clientID string) (func() (string, error), error)

func GetResourceManagementAuthorizer

func GetResourceManagementAuthorizer(creds config.Credentials) (autorest.Authorizer, error)

GetResourceManagementAuthorizer gets an OAuthTokenAuthorizer for Azure Resource Manager

Types

type OAuthGrantType

type OAuthGrantType int

OAuthGrantType specifies which grant type to use.

const (
	// OAuthGrantTypeServicePrincipal for client credentials flow
	OAuthGrantTypeServicePrincipal OAuthGrantType = iota
	// OAuthGrantTypeDeviceFlow for device flow
	OAuthGrantTypeDeviceFlow
	// OAuthGrantTypeManagedIdentity for aad-pod-identity
	OAuthGrantTypeManagedIdentity
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL