Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedKeyConfiguration ¶
type AllowedKeyConfiguration struct {
KeyType certificate.KeyType
KeySizes []int
KeyCurves []certificate.EllipticCurve
}
AllowedKeyConfiguration contains an allowed key type with its sizes or curves
type Authentication ¶
Authentication provides a data construct for authentication data
type Connector ¶
type Connector interface {
GetType() ConnectorType
SetBaseURL(url string) (err error)
SetZone(z string)
Ping() (err error)
Register(email string) (err error)
Authenticate(auth *Authentication) (err error)
ReadZoneConfiguration(zone string) (config *ZoneConfiguration, err error)
GenerateRequest(config *ZoneConfiguration, req *certificate.Request) (err error)
RequestCertificate(req *certificate.Request, zone string) (requestID string, err error)
RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)
RevokeCertificate(req *certificate.RevocationRequest) error
RenewCertificate(req *certificate.RenewalRequest) (requestID string, err error)
ImportCertificate(req *certificate.ImportRequest) (*certificate.ImportResponse, error)
ReadPolicyConfiguration(zone string) (policy *Policy, err error)
}
Connector provides a common interface for external communications with TPP or Venafi Cloud
type ConnectorType ¶
type ConnectorType int
ConnectorType represents the available connectors
const ( ConnectorTypeUndefined ConnectorType = iota // ConnectorTypeFake is a fake connector for tests ConnectorTypeFake // ConnectorTypeCloud represents the Cloud connector type ConnectorTypeCloud // ConnectorTypeTPP represents the TPP connector type ConnectorTypeTPP )
func (ConnectorType) String ¶
func (t ConnectorType) String() string
type ErrCertificatePending ¶
ErrCertificatePending provides a common error structure for a timeout while retrieving a certificate
func (ErrCertificatePending) Error ¶
func (err ErrCertificatePending) Error() string
type ErrRetrieveCertificateTimeout ¶
type ErrRetrieveCertificateTimeout struct {
CertificateID string
}
ErrRetrieveCertificateTimeout provides a common error structure for a timeout while retrieving a certificate
func (ErrRetrieveCertificateTimeout) Error ¶
func (err ErrRetrieveCertificateTimeout) Error() string
type Policy ¶
type Policy struct {
SubjectCNRegexes []string
SubjectORegexes []string
SubjectOURegexes []string
SubjectSTRegexes []string
SubjectLRegexes []string
SubjectCRegexes []string
AllowedKeyConfigurations []AllowedKeyConfiguration
DnsSanRegExs []string
IpSanRegExs []string
EmailSanRegExs []string
UriSanRegExs []string
UpnSanRegExs []string
AllowWildcards bool
AllowKeyReuse bool
}
type ZoneConfiguration ¶
type ZoneConfiguration struct {
Organization string
OrganizationalUnit []string
Country string
Province string
Locality string
Policy
HashAlgorithm x509.SignatureAlgorithm
CustomAttributeValues map[string]string
}
ZoneConfiguration provides a common structure for certificate request data provided by the remote endpoint
func NewZoneConfiguration ¶
func NewZoneConfiguration() *ZoneConfiguration
NewZoneConfiguration creates a new zone configuration which creates the map used in the configuration
func (*ZoneConfiguration) UpdateCertificateRequest ¶
func (z *ZoneConfiguration) UpdateCertificateRequest(request *certificate.Request)
UpdateCertificateRequest updates a certificate request based on the zone configurataion retrieved from the remote endpoint
func (*ZoneConfiguration) ValidateCertificateRequest ¶
func (z *ZoneConfiguration) ValidateCertificateRequest(request *certificate.Request) error
ValidateCertificateRequest validates the request against the zone configuration