venafi

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SecretsEngine = iota
	MonitorEngine
)

Variables

This section is empty.

Functions

func ConfigureVenafiSecret

func ConfigureVenafiSecret(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	venafiClient venafi_wrapper.VenafiWrapper,
	secretPath string,
	secretValue VenafiConnectionConfig,
	pluginType PluginType,
	zone *string,
) error

func RequestVenafiCertificate

func RequestVenafiCertificate(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	rolePath string, certRequest CertificateRequest,
) error

func VerifyVenafiSecret

func VerifyVenafiSecret(reportSection reporter.Section, vaultClient api.VaultAPIClient, secretPath string, secretValue VenafiConnectionConfig) error

Types

type CertificateRequest

type CertificateRequest struct {
	CommonName   string `hcl:"common_name"`
	OU           string `hcl:"ou"`
	Organisation string `hcl:"organisation"`
	Locality     string `hcl:"locality"`
	Province     string `hcl:"province"`
	Country      string `hcl:"country"`
	TTL          string `hcl:"ttl"`
}

func AskForTestCertificates

func AskForTestCertificates(questioner questions.Questioner) ([]CertificateRequest, error)

func GenerateCertRequestConfig

func GenerateCertRequestConfig(questioner questions.Questioner) (*CertificateRequest, error)

func (*CertificateRequest) ToMap

func (c *CertificateRequest) ToMap() map[string]interface{}

func (*CertificateRequest) WriteHCL

func (c *CertificateRequest) WriteHCL(hclBody *hclwrite.Body)

type OptionalConfig

type OptionalConfig struct {
	GenerateLease bool   `hcl:"generate_lease,optional"`
	AllowAnyName  bool   `hcl:"allow_any_name,optional"`
	TTL           string `hcl:"ttl,optional"`
	MaxTTL        string `hcl:"max_ttl,optional"`
}

func GenerateOptionalQuestions

func GenerateOptionalQuestions(questioner questions.Questioner) (*OptionalConfig, error)

func (*OptionalConfig) GetAsMap

func (oc *OptionalConfig) GetAsMap() map[string]interface{}

func (*OptionalConfig) Validate

func (oc *OptionalConfig) Validate() error

func (*OptionalConfig) WriteHCL

func (oc *OptionalConfig) WriteHCL(hclBody *hclwrite.Body)

type PluginType

type PluginType int

type VenafiConnectionConfig

type VenafiConnectionConfig interface {
	GetAsMap(pluginType PluginType, venafiClient venafi_wrapper.VenafiWrapper) (map[string]interface{}, error)
}

type VenafiSecret

type VenafiSecret struct {
	VaaS *VenafiVaaSConnection `hcl:"venafi_vaas,block"`
	TPP  *VenafiTPPConnection  `hcl:"venafi_tpp,block"`
}

VenafiSecret Used to create either VaaS or TPP style secrets. This is not used directly, but extended by consuming plugins

func (VenafiSecret) GetAsMap

func (v VenafiSecret) GetAsMap(pluginType PluginType, venafiClient venafi_wrapper.VenafiWrapper) (map[string]interface{}, error)

func (*VenafiSecret) Validate

func (v *VenafiSecret) Validate() error

func (*VenafiSecret) WriteHCL

func (v *VenafiSecret) WriteHCL(hclBody *hclwrite.Body)

type VenafiTPPConnection

type VenafiTPPConnection struct {
	URL      string `hcl:"url"`
	Username string `hcl:"username"`
	Password string `hcl:"password"`
}

func (*VenafiTPPConnection) Validate

func (c *VenafiTPPConnection) Validate() error

func (*VenafiTPPConnection) WriteHCL

func (c *VenafiTPPConnection) WriteHCL(hclBody *hclwrite.Body)

type VenafiVaaSConnection

type VenafiVaaSConnection struct {
	APIKey string `hcl:"apikey"`
}

func (*VenafiVaaSConnection) Validate

func (c *VenafiVaaSConnection) Validate() error

func (*VenafiVaaSConnection) WriteHCL

func (c *VenafiVaaSConnection) WriteHCL(hclBody *hclwrite.Body)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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