vault

package
v0.0.396 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ApproleAuthMethod = "approle"
	JwtAuthMethod     = "jwt"
	OidcAuthMethod    = "oidc"
)
View Source
const (
	VaultJwtAudience = "vault.namespace.systems"
)

Variables

View Source
var File_universe_vault_types_proto protoreflect.FileDescriptor

Functions

func AppRoleLogin added in v0.0.392

func AppRoleLogin(ctx context.Context)

func JwtLogin added in v0.0.392

func JwtLogin(ctx context.Context, client *vault.Client, authMount, audience string) (*vault.ResponseAuth, error)

func OidcLogin added in v0.0.392

func OidcLogin(ctx context.Context, client *vault.Client, authMount string) (*vault.ResponseAuth, error)

Types

type AppRole added in v0.0.360

type AppRole struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Mount string `protobuf:"bytes,4,opt,name=mount,proto3" json:"mount,omitempty"`
	// contains filtered or unexported fields
}

func (*AppRole) Descriptor deprecated added in v0.0.360

func (*AppRole) Descriptor() ([]byte, []int)

Deprecated: Use AppRole.ProtoReflect.Descriptor instead.

func (*AppRole) GetMount added in v0.0.361

func (x *AppRole) GetMount() string

func (*AppRole) GetName added in v0.0.360

func (x *AppRole) GetName() string

func (*AppRole) ProtoMessage added in v0.0.360

func (*AppRole) ProtoMessage()

func (*AppRole) ProtoReflect added in v0.0.360

func (x *AppRole) ProtoReflect() protoreflect.Message

func (*AppRole) Reset added in v0.0.360

func (x *AppRole) Reset()

func (*AppRole) String added in v0.0.360

func (x *AppRole) String() string

type AuthMethod added in v0.0.392

type AuthMethod string

type Certificate

type Certificate struct {
	CommonName string   `protobuf:"bytes,5,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"`
	Sans       []string `protobuf:"bytes,6,rep,name=sans,proto3" json:"sans,omitempty"`
	Mount      string   `protobuf:"bytes,7,opt,name=mount,proto3" json:"mount,omitempty"`
	Role       string   `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"`
	IpSans     []string `protobuf:"bytes,9,rep,name=ip_sans,json=ipSans,proto3" json:"ip_sans,omitempty"`
	// contains filtered or unexported fields
}

func (*Certificate) Descriptor deprecated

func (*Certificate) Descriptor() ([]byte, []int)

Deprecated: Use Certificate.ProtoReflect.Descriptor instead.

func (*Certificate) GetCommonName added in v0.0.361

func (x *Certificate) GetCommonName() string

func (*Certificate) GetIpSans added in v0.0.366

func (x *Certificate) GetIpSans() []string

func (*Certificate) GetMount added in v0.0.361

func (x *Certificate) GetMount() string

func (*Certificate) GetRole added in v0.0.361

func (x *Certificate) GetRole() string

func (*Certificate) GetSans added in v0.0.361

func (x *Certificate) GetSans() []string

func (*Certificate) ProtoMessage

func (*Certificate) ProtoMessage()

func (*Certificate) ProtoReflect

func (x *Certificate) ProtoReflect() protoreflect.Message

func (*Certificate) Reset

func (x *Certificate) Reset()

func (*Certificate) String

func (x *Certificate) String() string

type CertificateAuthority

type CertificateAuthority struct {
	Mount        string   `protobuf:"bytes,1,opt,name=mount,proto3" json:"mount,omitempty"`
	CommonName   string   `protobuf:"bytes,2,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"`
	Organization []string `protobuf:"bytes,3,rep,name=organization,proto3" json:"organization,omitempty"`
	Ttl          string   `protobuf:"bytes,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateAuthority) Descriptor deprecated

func (*CertificateAuthority) Descriptor() ([]byte, []int)

Deprecated: Use CertificateAuthority.ProtoReflect.Descriptor instead.

func (*CertificateAuthority) GetCommonName added in v0.0.369

func (x *CertificateAuthority) GetCommonName() string

func (*CertificateAuthority) GetMount added in v0.0.369

func (x *CertificateAuthority) GetMount() string

func (*CertificateAuthority) GetOrganization added in v0.0.369

func (x *CertificateAuthority) GetOrganization() []string

func (*CertificateAuthority) GetTtl added in v0.0.369

func (x *CertificateAuthority) GetTtl() string

func (*CertificateAuthority) ProtoMessage

func (*CertificateAuthority) ProtoMessage()

func (*CertificateAuthority) ProtoReflect

func (x *CertificateAuthority) ProtoReflect() protoreflect.Message

func (*CertificateAuthority) Reset

func (x *CertificateAuthority) Reset()

func (*CertificateAuthority) String

func (x *CertificateAuthority) String() string

type CertificateConfig added in v0.0.362

type CertificateConfig struct {
	BaseDomain  string   `protobuf:"bytes,1,opt,name=base_domain,json=baseDomain,proto3" json:"base_domain,omitempty"`
	SansDomains []string `protobuf:"bytes,2,rep,name=sans_domains,json=sansDomains,proto3" json:"sans_domains,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateConfig) Descriptor deprecated added in v0.0.362

func (*CertificateConfig) Descriptor() ([]byte, []int)

Deprecated: Use CertificateConfig.ProtoReflect.Descriptor instead.

func (*CertificateConfig) GetBaseDomain added in v0.0.362

func (x *CertificateConfig) GetBaseDomain() string

func (*CertificateConfig) GetSansDomains added in v0.0.368

func (x *CertificateConfig) GetSansDomains() []string

func (*CertificateConfig) ProtoMessage added in v0.0.362

func (*CertificateConfig) ProtoMessage()

func (*CertificateConfig) ProtoReflect added in v0.0.362

func (x *CertificateConfig) ProtoReflect() protoreflect.Message

func (*CertificateConfig) Reset added in v0.0.362

func (x *CertificateConfig) Reset()

func (*CertificateConfig) String added in v0.0.362

func (x *CertificateConfig) String() string

type ClientHandle added in v0.0.361

type ClientHandle struct {
	// contains filtered or unexported fields
}

func (*ClientHandle) Get added in v0.0.361

func (h *ClientHandle) Get(ctx context.Context) (*vault.Client, error)

type Credentials added in v0.0.360

type Credentials struct {
	AuthMethod AuthMethod `json:"auth_method,omitempty"`
	AuthMount  string     `json:"auth_mount,omitempty"`

	JwtAudience string `json:"jwt_audience,omitempty"`

	RoleId   string `json:"role_id,omitempty"`
	SecretId string `json:"secret_id,omitempty"`

	VaultAddress   string `json:"vault_address,omitempty"`
	VaultNamespace string `json:"vault_namespace,omitempty"`
}

func ParseCredentials added in v0.0.360

func ParseCredentials(data []byte) (*Credentials, error)

func ParseCredentialsFromEnv added in v0.0.360

func ParseCredentialsFromEnv(key string) (*Credentials, error)

func (*Credentials) ClientHandle added in v0.0.361

func (c *Credentials) ClientHandle(ctx context.Context, options ...vault.ClientOption) (*ClientHandle, error)

func (*Credentials) Encode added in v0.0.360

func (c *Credentials) Encode() ([]byte, error)

type Provider added in v0.0.363

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider added in v0.0.392

func NewProvider(creds *Credentials, opts ...vault.ClientOption) (*Provider, error)

func ProviderFromEnv added in v0.0.363

func ProviderFromEnv(key string, options ...vault.ClientOption) (*Provider, error)

func (*Provider) Get added in v0.0.363

func (p *Provider) Get(ctx context.Context) (*vault.Client, error)

type Secret added in v0.0.370

type Secret struct {

	// Secret reference in format - <mount>/<path>:<key>.
	SecretReference string `protobuf:"bytes,1,opt,name=secret_reference,json=secretReference,proto3" json:"secret_reference,omitempty"`
	// contains filtered or unexported fields
}

func (*Secret) Descriptor deprecated added in v0.0.370

func (*Secret) Descriptor() ([]byte, []int)

Deprecated: Use Secret.ProtoReflect.Descriptor instead.

func (*Secret) GetSecretReference added in v0.0.370

func (x *Secret) GetSecretReference() string

func (*Secret) ProtoMessage added in v0.0.370

func (*Secret) ProtoMessage()

func (*Secret) ProtoReflect added in v0.0.370

func (x *Secret) ProtoReflect() protoreflect.Message

func (*Secret) Reset added in v0.0.370

func (x *Secret) Reset()

func (*Secret) String added in v0.0.370

func (x *Secret) String() string

type TlsBundle added in v0.0.359

type TlsBundle struct {
	PrivateKeyPem  string   `json:"private_key_pem,omitempty"`
	CertificatePem string   `json:"certificate_pem,omitempty"`
	CaChainPem     []string `json:"ca_chain_pem,omitempty"`
}

func ParseTlsBundle added in v0.0.360

func ParseTlsBundle(data []byte) (*TlsBundle, error)

func ParseTlsBundleFromEnv added in v0.0.360

func ParseTlsBundleFromEnv(key string) (*TlsBundle, error)

func (TlsBundle) CAPool added in v0.0.359

func (tb TlsBundle) CAPool() *x509.CertPool

func (TlsBundle) Certificate added in v0.0.359

func (tb TlsBundle) Certificate() (tls.Certificate, error)

func (TlsBundle) ClientConfig added in v0.0.359

func (tb TlsBundle) ClientConfig() (*tls.Config, error)

func (TlsBundle) Encode added in v0.0.359

func (tb TlsBundle) Encode() ([]byte, error)

func (TlsBundle) ServerConfig added in v0.0.359

func (tb TlsBundle) ServerConfig() (*tls.Config, error)

type VaultProvider added in v0.0.360

type VaultProvider struct {
	Address    string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	AuthMount  string `protobuf:"bytes,3,opt,name=auth_mount,json=authMount,proto3" json:"auth_mount,omitempty"`
	AuthMethod string `protobuf:"bytes,4,opt,name=auth_method,json=authMethod,proto3" json:"auth_method,omitempty"`
	// contains filtered or unexported fields
}

func (*VaultProvider) Descriptor deprecated added in v0.0.360

func (*VaultProvider) Descriptor() ([]byte, []int)

Deprecated: Use VaultProvider.ProtoReflect.Descriptor instead.

func (*VaultProvider) GetAddress added in v0.0.360

func (x *VaultProvider) GetAddress() string

func (*VaultProvider) GetAuthMethod added in v0.0.361

func (x *VaultProvider) GetAuthMethod() string

func (*VaultProvider) GetAuthMount added in v0.0.360

func (x *VaultProvider) GetAuthMount() string

func (*VaultProvider) GetNamespace added in v0.0.360

func (x *VaultProvider) GetNamespace() string

func (*VaultProvider) ProtoMessage added in v0.0.360

func (*VaultProvider) ProtoMessage()

func (*VaultProvider) ProtoReflect added in v0.0.360

func (x *VaultProvider) ProtoReflect() protoreflect.Message

func (*VaultProvider) Reset added in v0.0.360

func (x *VaultProvider) Reset()

func (*VaultProvider) String added in v0.0.360

func (x *VaultProvider) String() string

Jump to

Keyboard shortcuts

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