Documentation ¶
Index ¶
- Constants
- Variables
- func CAUpdateRegister(uri string, cb func(string)) error
- func CAUpdateUnregister(uri string) error
- func CheckDomain(endpoints []string, domain string) (string, error)
- func CreateCert(endpoints []string, domain string, fqdn string, retData *VaultCertData) error
- func CreateInsecureHTTPClient(timeoutSecs int) (*retryablehttp.Client, error)
- func CreateRetryableInsecureHTTPClient(timeoutSecs int, maxRetryCount int, maxRetrySecs int) (*retryablehttp.Client, error)
- func CreateRetryableSecureHTTPClient(caURI string, timeoutSecs int, maxRetryCount int, maxRetrySecs int) (*retryablehttp.Client, error)
- func CreateSecureHTTPClient(timeoutSecs int, caURI string) (*retryablehttp.Client, error)
- func DeleteCertData(domainID string, force bool) error
- func FetchCAChain(uri string) (string, error)
- func Init(loggerP *logrus.Logger)
- func InitInstance(loggerP *logrus.Logger, inst string)
- func NewlineToTuple(pemStr string) string
- func StoreCertData(domainID string, certData VaultCertData) error
- func TupleToNewline(pemStr string) string
- type CertInfo
- type CertStorage
- type Config
- type HTTPClientPair
- func (p *HTTPClientPair) CloseIdleConnections()
- func (p *HTTPClientPair) Do(req *http.Request) (*http.Response, error)
- func (p *HTTPClientPair) Get(url string) (*http.Response, error)
- func (p *HTTPClientPair) Head(url string) (*http.Response, error)
- func (p *HTTPClientPair) Post(url, contentType string, body io.Reader) (*http.Response, error)
- func (p *HTTPClientPair) PostForm(url string, data url.Values) (*http.Response, error)
- type VaultCertData
Constants ¶
View Source
const ( CertDomainCabinet = "CERT_DOMAIN_CABINET" CertDomainChassis = "CERT_DOMAIN_CHASSIS" CertDomainBlade = "CERT_DOMAIN_BLADE" CertDomainBMC = "CERT_DOMAIN_BMC" VaultCAChainURI = "vault://pki_common/ca_chain" )
Variables ¶
View Source
var ConfigParams = Config{VaultKeyBase: vaultKeyBase, CertKeyBasePath: certKeyBasePath, VaultPKIBase: vaultPKIBase, PKIPath: pkiPath, CAChainPath: caChainPath, LogInsecureFailover: true, }
Functions ¶
func CAUpdateRegister ¶
func CAUpdateUnregister ¶
func CreateCert ¶
func CreateCert(endpoints []string, domain string, fqdn string, retData *VaultCertData) error
func CreateSecureHTTPClient ¶
func DeleteCertData ¶
func FetchCAChain ¶
func InitInstance ¶
func NewlineToTuple ¶
func StoreCertData ¶
func StoreCertData(domainID string, certData VaultCertData) error
func TupleToNewline ¶
Types ¶
type CertInfo ¶
type CertInfo struct { CAChain []string `json:"ca_chain"` Certificate string `json:"certificate"` Expiration int `json:"expiration"` IssuingCA string `json:"issuing_ca"` PrivateKey string `json:"private_key"` PrivateKeyType string `json:"private_key_type"` SerialNumber string `json:"serial_number"` FQDN string `json:"fqdn,omitempty"` }
type CertStorage ¶
type HTTPClientPair ¶
type HTTPClientPair struct { SecureClient *retryablehttp.Client InsecureClient *retryablehttp.Client MaxRetryCount int MaxRetryWait int FailedOver bool //true if most recent op failed over }
func CreateHTTPClientPair ¶
func CreateHTTPClientPair(caURI string, timeoutSecs int) (*HTTPClientPair, error)
func (*HTTPClientPair) CloseIdleConnections ¶
func (p *HTTPClientPair) CloseIdleConnections()
type VaultCertData ¶
type VaultCertData struct { RequestID string `json:"request_id"` LeaseID string `json:"lease_id"` Renewable bool `json:"renewable"` LeaseDuration int `json:"lease_duration"` Data CertInfo `json:"data"` }
func FetchCertData ¶
func FetchCertData(xname string, domain string) (VaultCertData, error)
Click to show internal directories.
Click to hide internal directories.