pki_backend

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureVenafiRole

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

func VerifyVenafiRole

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

Types

type Role

type Role struct {
	Name      string                      `hcl:"role,label"`
	Secret    ZonedSecret                 `hcl:"secret,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 VenafiPKIBackendConfig

type VenafiPKIBackendConfig struct {
	// MountPath is not decoded directly by using the struct tags, and is instead populated by
	// ParseConfig when it is initialised
	MountPath string
	// Version is not decoded directly by using the struct tags, and is instead populated by ParseConfig
	// when it is initialised
	Version string
	// BuildArch allows defining the build architecture
	BuildArch string `hcl:"build_arch,optional"`

	Roles []Role `hcl:"role,block"`
}

func (*VenafiPKIBackendConfig) Check

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

func (*VenafiPKIBackendConfig) Configure

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

func (*VenafiPKIBackendConfig) GenerateConfigAndWriteHCL

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

func (*VenafiPKIBackendConfig) GetDownloadURL

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

func (*VenafiPKIBackendConfig) ParseConfig

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

func (*VenafiPKIBackendConfig) ValidateConfig

func (c *VenafiPKIBackendConfig) ValidateConfig() error

type ZonedSecret added in v0.1.0

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

ZonedSecret Used to overly the zone requirement on VenafiSecrets with PKI Backend plugin

func (*ZonedSecret) Validate added in v0.1.0

func (s *ZonedSecret) Validate() error

func (*ZonedSecret) WriteHCL added in v0.1.0

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

Jump to

Keyboard shortcuts

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