Back to godoc.org
go.aporeto.io/midgard-lib/tokenmanager/providers

package providers

v1.69.1
Latest Go to latest
Published: Feb 26, 2020 | License: Apache-2.0 | Module: go.aporeto.io/midgard-lib

Overview

Package providers contains helpers to retrieve tokens from cloud provider. This package should not be in here. It will move. Don't use it.

Index

func AWSServiceRoleToken

func AWSServiceRoleToken() (roleData string, err error)

AWSServiceRoleToken gets the service role data of the VM.

func AzureServiceIdentityToken

func AzureServiceIdentityToken() (string, error)

AzureServiceIdentityToken will retrieve the service account token for the VM using the Metadata Identity Service of Azure.

func GCPServiceAccountToken

func GCPServiceAccountToken(ctx context.Context, validity time.Duration) (string, error)

GCPServiceAccountToken will retrieve the service account token and call the midgard library.

type AzureToken

type AzureToken struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    string `json:"expires_in"`
	ExpiresOn    string `json:"expires_on"`
	NotBefore    string `json:"not_before"`
	Resource     string `json:"resource"`
	TokenType    string `json:"token_type"`
}

AzureToken is the standard OAUTH token provided by Azure.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier