midgard-lib: go.aporeto.io/midgard-lib/tokenmanager/providers Index | Files

package providers

import "go.aporeto.io/midgard-lib/tokenmanager/providers"

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


Package Files

aws.go azure.go doc.go gcp.go

func AWSServiceRoleToken Uses

func AWSServiceRoleToken() (roleData string, err error)

AWSServiceRoleToken gets the service role data of the VM.

func AzureServiceIdentityToken Uses

func AzureServiceIdentityToken() (string, error)

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

func GCPServiceAccountToken Uses

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

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

type AzureToken Uses

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.

Package providers imports 8 packages (graph) and is imported by 1 packages. Updated 2019-11-15. Refresh now. Tools for package owners.