types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types contains the config file structs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	MatchPrincipal string       `yaml:"match_principal"`
	Credentials    []Credential `yaml:"credentials"`
}

ACL is a mapping between a given principal and the credentials for services it will gain access to.

func (*ACL) Validate

func (a *ACL) Validate() []error

type ConfigFile

type ConfigFile struct {
	SPIFFE *SpiffeConfig `yaml:"spiffe"`
	ACLs   []ACL         `yaml:"acls"`
}

ConfigFile represents the config file that will be loaded from disk, or some other mechanism.

func (*ConfigFile) Validate

func (c *ConfigFile) Validate() []error

type Credential

type Credential struct {
	Provider        string `yaml:"provider"`
	ObjectReference string `yaml:"object_reference"`
}

Credential represents any remote credential that the connector can give out.

func (*Credential) Key

func (c *Credential) Key() string

type Files

type Files struct {
	TrustDomainCA string `yaml:"trust_domain_ca"`
	SVIDCert      string `yaml:"svid_cert"`
	SVIDKey       string `yaml:"svid_key"`
}

type InMemory

type InMemory struct {
	TrustDomainCA []byte
	SVIDCert      []byte
	SVIDKey       []byte
}

InMemory is only used in testing

type SVIDSources

type SVIDSources struct {
	WorkloadAPI *WorkloadAPI `yaml:"workload_api,omitempty"`
	Files       *Files       `yaml:"files,omitempty"`

	// InMemory is only used in testing
	InMemory *InMemory
}

SVIDSources determines where spiffe-connector will obtain its own SVID and trust domain information. The SPIFFE Workload API and Static files are supported.

type SpiffeConfig

type SpiffeConfig struct {
	SVIDSources SVIDSources `yaml:"svid_sources"`
}

SpiffeConfig represents the SPIFFE configuration section of spiffe-connector's config file

type WorkloadAPI

type WorkloadAPI struct {
	SocketPath string `yaml:"socket_path"`
}

Jump to

Keyboard shortcuts

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