Documentation

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

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    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.

          Types

          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.