google

package module
v0.0.0-...-9fa0802 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VaultTokenSource

func VaultTokenSource(tokenConfig *VaultTokenConfig) (oauth2.TokenSource, error)

VaultTokenSource returns a Google Cloud TokenSource derived from a HashiCorp Vault TOKEN

Use this TokenSource to derive a Google Cloud Credential from a HashiCorp Vault Token. You must configure a Vault policy the VAULT_TOKEN that returns a GCP access_token: https://www.vaultproject.io/docs/secrets/gcp/index.html#access-tokens

VaultToken (string): The VAULT_TOKEN capable of deriving a GCP access_token.
VaultPath (string): Vault gcp secrets policy endpoint. (eg "gcp/token/my-token-roleset")
VaultCAcert (string): The root CA Certificate for the Vault Server's endpoint
VaultAddr (string): Hostname/Address URI for the vault server (https://your_vault.server:8200/)

Types

type VaultTokenConfig

type VaultTokenConfig struct {
	VaultToken  string
	VaultPath   string
	VaultCAcert string
	VaultAddr   string
}

Jump to

Keyboard shortcuts

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