pki_monitor

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureIntermediateCertificate

func ConfigureIntermediateCertificate(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	mountPath string,
	request *venafi.CertificateRequest,
	venafiClient venafi_wrapper.VenafiWrapper,
	zone string,
) error

func ConfigureSelfsignedCertificate

func ConfigureSelfsignedCertificate(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	mountPath string,
	request *venafi.CertificateRequest,
) error

func ConfigureVenafiPolicy

func ConfigureVenafiPolicy(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	mountPath, policyName string,
	policyConfig map[string]interface{},
) error

func ConfigureVenafiRole

func ConfigureVenafiRole(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	rolePath string,
	roleParams map[string]interface{},
) error

func VerifyIntermediateCertificate

func VerifyIntermediateCertificate(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	policyPath, secretName string,
) error

func VerifyVenafiPolicy

func VerifyVenafiPolicy(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	mountPath, policyName, secretName, zone string,
) error

func VerifyVenafiRole

func VerifyVenafiRole(
	reportSection reporter.Section,
	vaultClient api.VaultAPIClient,
	rolePath, secretName string,
) error

Types

type IntermediateCertRequest

type IntermediateCertRequest struct {
	Zone                      string          `hcl:"zone"`
	venafi.CertificateRequest `hcl:",remain"` // gohcl currently ignores any field without hcl tags, even in an embedded struct with nested tagged fields
}

type Policy

type Policy struct {
	Zone string `hcl:"zone"`
}

type Role

type Role struct {
	Name string `hcl:"role,label"`

	Secret UnZonedSecret `hcl:"secret,block"`

	EnforcementPolicy *Policy `hcl:"enforcement_policy,block"`
	ImportPolicy      *Policy `hcl:"import_policy,block"`

	IntermediateCert *IntermediateCertRequest   `hcl:"intermediate_certificate,block"`
	RootCert         *venafi.CertificateRequest `hcl:"root_certificate,block"`

	TestCerts []venafi.CertificateRequest `hcl:"test_certificate,block"`

	OptionalConfig *venafi.OptionalConfig `hcl:"optional_config,block"`
}

func (*Role) Configure

func (r *Role) Configure(
	configurePluginSection reporter.Section,
	mountPath string,
	vaultClient api.VaultAPIClient,
	venafiClient venafi_wrapper.VenafiWrapper,
) error

func (*Role) Validate

func (r *Role) Validate() error

func (*Role) WriteHCL

func (r *Role) WriteHCL(hclBody *hclwrite.Body)

type UnZonedSecret added in v0.1.0

type UnZonedSecret struct {
	Name                string `hcl:"name,label"`
	venafi.VenafiSecret `hcl:",remain"`
}

UnZonedSecret Used to add the label, and to maintain consistent structure with other uses of VenafiSecret.

func (*UnZonedSecret) WriteHCL added in v0.1.0

func (s *UnZonedSecret) WriteHCL(hclBody *hclwrite.Body)

type VenafiPKIMonitorConfig

type VenafiPKIMonitorConfig struct {
	// MountPath is not decoded directly by using the struct tags, and is instead populated by plugins.LookupPlugin
	// when it is initialised
	MountPath string
	// Version is not decoded directly by using the struct tags, and is instead populated by plugins.LookupPlugin
	// when it is initialised
	Version string
	// BuildArch allows defining the build architecture
	BuildArch string

	Role Role `hcl:"role,block"`
}

func (*VenafiPKIMonitorConfig) Check

func (c *VenafiPKIMonitorConfig) Check(report reporter.Report, vaultClient api.VaultAPIClient) error

func (*VenafiPKIMonitorConfig) Configure

func (c *VenafiPKIMonitorConfig) Configure(report reporter.Report, vaultClient api.VaultAPIClient) error

func (*VenafiPKIMonitorConfig) GenerateConfigAndWriteHCL

func (c *VenafiPKIMonitorConfig) GenerateConfigAndWriteHCL(questioner questions.Questioner, hclBody *hclwrite.Body) error

func (*VenafiPKIMonitorConfig) GetDownloadURL

func (c *VenafiPKIMonitorConfig) GetDownloadURL() (string, error)

func (*VenafiPKIMonitorConfig) ParseConfig

func (c *VenafiPKIMonitorConfig) ParseConfig(config *plugins.PluginConfig, evalContext *hcl.EvalContext) error

func (*VenafiPKIMonitorConfig) ValidateConfig

func (c *VenafiPKIMonitorConfig) ValidateConfig() error

Jump to

Keyboard shortcuts

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