conf

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAG_CONFIG_FILE = "config-file"

	FLAG_VAULT_ADDRESS          = "vault-address"
	FLAG_VAULT_TOKEN            = "vault-token"
	FLAG_VAULT_ROLE_ID          = "vault-role-id"
	FLAG_VAULT_SECRET_ID        = "vault-secret-id"
	FLAG_VAULT_SECRET_ID_FILE   = "vault-secret-id-file"
	FLAG_VAULT_MOUNT_PKI        = "vault-mount-pki"
	FLAG_VAULT_PKI_BACKEND_ROLE = "vault-pki-role-name"
	FLAG_VAULT_MOUNT_APPROLE    = "vault-mount-approle"

	FLAG_ISSUE_FORCE_NEW_CERTIFICATE         = "force-new-certificate"
	FLAG_ISSUE_LIFETIME_THRESHOLD_PERCENTAGE = "lifetime-threshold-percent"
	FLAG_ISSUE_PRIVATE_KEY_FILE              = "private-key-file"

	FLAG_ISSUE_YUBIKEY_SLOT = "yubi-slot"
	FLAG_ISSUE_YUBIKEY_PIN  = "yubi-pin"

	FLAG_ISSUE_TTL          = "ttl"
	FLAG_ISSUE_IP_SANS      = "ip-sans"
	FLAG_ISSUE_COMMON_NAME  = "common-name"
	FLAG_ISSUE_ALT_NAMES    = "alt-names"
	FLAG_ISSUE_METRICS_FILE = "metrics-file"
	FLAG_ISSUE_HOOKS        = "hooks"

	FLAG_OUTPUT_FILE = "output-file"
	FLAG_DER_ENCODED = "der-encoding"

	FLAG_CERTIFICATE_FILE = "certificate-file"
	FLAG_CA_FILE          = "ca-file"
	FLAG_CSR_FILE         = "csr-file"
	FLAG_FILE_OWNER       = "owner"
	FLAG_FILE_GROUP       = "group"
)
View Source
const (
	FLAG_VAULT_PKI_BACKEND_ROLE_DEFAULT              = "my_role"
	FLAG_VAULT_MOUNT_APPROLE_DEFAULT                 = "approle"
	FLAG_ISSUE_LIFETIME_THRESHOLD_PERCENTAGE_DEFAULT = 33.
	FLAG_FILE_OWNER_DEFAULT                          = "root"

	FLAG_ISSUE_YUBIKEY_SLOT_DEFAULT = math.MaxUint32

	FLAG_VAULT_MOUNT_PKI_DEFAULT    = "pki_intermediate"
	FLAG_ISSUE_METRICS_FILE_DEFAULT = "/var/lib/node_exporter/vault_pki_issuer.prom"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend added in v1.6.0

type Backend struct {
	CertificateFile string
	PrivateKeyFile  string
	CaFile          string
	FileOwner       string
	FileGroup       string
}

func (*Backend) Validate added in v1.6.0

func (c *Backend) Validate() (errs []error)

type Config

type Config struct {
	VaultAddress      string
	VaultToken        string
	VaultRoleId       string
	VaultSecretId     string
	VaultSecretIdFile string
	VaultMountPki     string
	VaultMountApprole string
	VaultPkiRole      string

	SignArguments
	IssueArguments
	RevokeArguments
	FetchArguments
}

func (*Config) PrintConfig

func (c *Config) PrintConfig()

func (*Config) Validate

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

type FetchArguments added in v1.1.0

type FetchArguments struct {
	OutputFile string
	DerEncoded bool
}

func (*FetchArguments) PrintConfig added in v1.1.0

func (c *FetchArguments) PrintConfig()

func (*FetchArguments) Validate added in v1.1.0

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

type IssueArguments

type IssueArguments struct {
	CommonName          string
	Ttl                 string
	IpSans              []string
	AltNames            []string
	ForceNewCertificate bool

	Backends []Backend

	PostIssueHooks []string

	CertificateLifetimeThresholdPercentage float64

	YubikeyPin  string
	YubikeySlot uint32

	MetricsFile string
}

func (*IssueArguments) PrintConfig

func (c *IssueArguments) PrintConfig()

func (*IssueArguments) UsesYubikey added in v1.5.0

func (c *IssueArguments) UsesYubikey() bool

func (*IssueArguments) Validate

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

type RevokeArguments

type RevokeArguments struct {
	CertificateFile string
}

func (*RevokeArguments) PrintConfig

func (c *RevokeArguments) PrintConfig()

func (*RevokeArguments) Validate

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

type SignArguments added in v1.4.0

type SignArguments struct {
	CommonName string
	Ttl        string
	IpSans     []string
	AltNames   []string

	CsrFile         string
	CertificateFile string
	ChainFile       string
	FileOwner       string
	FileGroup       string

	MetricsFile string
}

func (*SignArguments) PrintConfig added in v1.4.0

func (c *SignArguments) PrintConfig()

func (*SignArguments) Validate added in v1.4.0

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

Jump to

Keyboard shortcuts

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