azure

package module
v0.0.0-...-85455fb Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureAuth

type AzureAuth struct {
	// contains filtered or unexported fields
}

func NewAzureAuth

func NewAzureAuth(roleName string, opts ...LoginOption) (*AzureAuth, error)

NewAzureAuth initializes a new Azure auth method interface to be passed as a parameter to the client.Auth().Login method.

Supported options: WithMountPath, WithResource

func (*AzureAuth) Login

func (a *AzureAuth) Login(ctx context.Context, client *api.Client) (*api.Secret, error)

Login sets up the required request body for the Azure auth method's /login endpoint, and performs a write to it.

type LoginOption

type LoginOption func(a *AzureAuth) error

func WithMountPath

func WithMountPath(mountPath string) LoginOption

func WithResource

func WithResource(url string) LoginOption

WithResource allows you to specify a different resource URL to use as the aud value on the JWT token than the default of Azure Public Cloud's ARM URL. This should match the resource URI that an administrator configured your Vault server to use.

See https://github.com/Azure/go-autorest/blob/master/autorest/azure/environments.go for a list of valid environments.

Jump to

Keyboard shortcuts

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