vals

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package `vals` inherits from [here](https://github.com/variantdev/vals), it is a tool for managing configuration values and secrets. All kusion supported secret stores configuration can be found here.

Index

Constants

View Source
const (
	VaultPrefix = "ref+vault://"
)

Variables

This section is empty.

Functions

func IsSecured

func IsSecured(str string) (string, bool)

func ParseSecretRef

func ParseSecretRef(prefix, src string, ss *SecretStores) (string, error)

Types

type SecretStores

type SecretStores struct {
	Vault *Vault `json:"vault,omitempty" yaml:"vault,omitempty"`
}

func (*SecretStores) IsValid

func (ss *SecretStores) IsValid() bool

A valid SecretStore must has one backend at least

type Vault

type Vault struct {
	Address    string `json:"address" yaml:"address"`
	Proto      string `json:"proto" yaml:"proto"`
	Host       string `json:"host" yaml:"host"`
	Namespace  string `json:"namespace" yaml:"namespace"`
	AuthMethod string `json:"auth_method" yaml:"auth_method"`
	TokenEnv   string `json:"token_env" yaml:"token_env"`
	TokenFile  string `json:"token_file" yaml:"token_file"`
	RoleID     string `json:"role_id" yaml:"role_id"`
	SecretID   string `json:"secret_id" yaml:"secret_id"`
	Version    string `json:"version" yaml:"version"`
}

Vault supports two auth methods, token and approle. if token is used, TokenFile or TokeEnv is required; if approle is used, RoleID and SecretID are required. And supports two kinds of server address, Address or Proto&Host.

Jump to

Keyboard shortcuts

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