cloud

package
v4.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertZipBytesToPem added in v4.16.0

func ConvertZipBytesToPem(dataByte []byte, rootFirst bool) (*certificate.PEMCollection, error)

func Load32KeyByte added in v4.16.0

func Load32KeyByte(keyBytes []byte) (*[32]byte, error)

func PolicyExist added in v4.14.0

func PolicyExist(policyName string, c *Connector) (bool, error)

Types

type ApplicationDetails added in v4.13.0

type ApplicationDetails struct {
	ApplicationId             string               `json:"id,omitempty"`
	CitAliasToIdMap           map[string]string    `json:"certificateIssuingTemplateAliasIdMap,omitempty"`
	CompanyId                 string               `json:"companyId,omitempty"`
	Name                      string               `json:"name,omitempty"`
	Description               string               `json:"description,omitempty"`
	OwnerIdType               []policy.OwnerIdType `json:"ownerIdsAndTypes,omitempty"`
	InternalFqDns             []string             `json:"internalFqDns,omitempty"`
	ExternalIpRanges          []string             `json:"externalIpRanges,omitempty"`
	InternalIpRanges          []string             `json:"internalIpRanges,omitempty"`
	InternalPorts             []string             `json:"internalPorts,omitempty"`
	FullyQualifiedDomainNames []string             `json:"fullyQualifiedDomainNames,omitempty"`
	IpRanges                  []string             `json:"ipRanges,omitempty"`
	Ports                     []string             `json:"ports,omitempty"`
	FqDns                     []string             `json:"fqDns,omitempty"`
	OrganizationalUnitId      string               `json:"organizationalUnitId,omitempty"`
}

type Certificate

type Certificate struct {
	Id                            string              `json:"id"`
	ManagedCertificateId          string              `json:"managedCertificateId"`
	CertificateRequestId          string              `json:"certificateRequestId"`
	SubjectCN                     []string            `json:"subjectCN"`
	SubjectAlternativeNamesByType map[string][]string `json:"subjectAlternativeNamesByType"`
	SerialNumber                  string              `json:"serialNumber"`
	Fingerprint                   string              `json:"fingerprint"`
	ValidityStart                 string              `json:"validityStart"`
	ValidityEnd                   string              `json:"validityEnd"`
}

func (Certificate) ToCertificateInfo

func (c Certificate) ToCertificateInfo() certificate.CertificateInfo

type CertificateSearchResponse

type CertificateSearchResponse struct {
	Count        int           `json:"count"`
	Certificates []Certificate `json:"certificates"`
}

func ParseCertificateSearchResponse

func ParseCertificateSearchResponse(httpStatusCode int, body []byte) (searchResult *CertificateSearchResponse, err error)

type CertificateStatusErrorInformation

type CertificateStatusErrorInformation struct {
	Type    string   `json:"type,omitempty"`
	Code    int      `json:"code,omitempty"`
	Message string   `json:"message,omitempty"`
	Args    []string `json:"args,omitempty"`
}

type CertificateTemplates added in v4.14.0

type CertificateTemplates struct {
	CertificateTemplates []certificateTemplate `json:"certificateIssuingTemplates"`
}

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector contains the base data needed to communicate with the Venafi Cloud servers

func NewConnector

func NewConnector(url string, zone string, verbose bool, trust *x509.CertPool) (*Connector, error)

NewConnector creates a new Venafi Cloud Connector object used to communicate with Venafi Cloud

func (*Connector) Authenticate

func (c *Connector) Authenticate(auth *endpoint.Authentication) (err error)

Authenticate authenticates the user with Venafi Cloud using the provided API Key

func (*Connector) GenerateRequest

func (c *Connector) GenerateRequest(config *endpoint.ZoneConfiguration, req *certificate.Request) (err error)

GenerateRequest generates a CertificateRequest based on the zone configuration, and returns the request along with the private key.

func (*Connector) GetPolicy added in v4.14.0

func (c *Connector) GetPolicy(name string) (*policy.PolicySpecification, error)

func (*Connector) GetPolicyWithRegex added in v4.16.0

func (c *Connector) GetPolicyWithRegex(name string) (*policy.PolicySpecification, error)

func (*Connector) GetType

func (c *Connector) GetType() endpoint.ConnectorType

func (*Connector) ImportCertificate

func (c *Connector) ImportCertificate(req *certificate.ImportRequest) (*certificate.ImportResponse, error)

func (*Connector) IsCSRServiceGenerated added in v4.16.0

func (c *Connector) IsCSRServiceGenerated(req *certificate.Request) (bool, error)

func (*Connector) ListCertificates

func (c *Connector) ListCertificates(filter endpoint.Filter) ([]certificate.CertificateInfo, error)

func (*Connector) Ping

func (c *Connector) Ping() (err error)

Ping attempts to connect to the Venafi Cloud API and returns an errror if it cannot

func (*Connector) ReadPolicyConfiguration

func (c *Connector) ReadPolicyConfiguration() (policy *endpoint.Policy, err error)

func (*Connector) ReadZoneConfiguration

func (c *Connector) ReadZoneConfiguration() (config *endpoint.ZoneConfiguration, err error)

ReadZoneConfiguration reads the Zone information needed for generating and requesting a certificate from Venafi Cloud

func (*Connector) RenewCertificate

func (c *Connector) RenewCertificate(renewReq *certificate.RenewalRequest) (requestID string, err error)

RenewCertificate attempts to renew the certificate

func (*Connector) RequestCertificate

func (c *Connector) RequestCertificate(req *certificate.Request) (requestID string, err error)

RequestCertificate submits the CSR to the Venafi Cloud API for processing

func (*Connector) RequestSSHCertificate added in v4.15.0

func (c *Connector) RequestSSHCertificate(req *certificate.SshCertRequest) (response *certificate.SshCertificateObject, err error)

func (*Connector) RetrieveAvailableSSHTemplates added in v4.17.1

func (c *Connector) RetrieveAvailableSSHTemplates() (response []certificate.SshAvaliableTemplate, err error)

func (*Connector) RetrieveCertificate

func (c *Connector) RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)

RetrieveCertificate retrieves the certificate for the specified ID

func (*Connector) RetrieveCertificateMetaData added in v4.17.1

func (c *Connector) RetrieveCertificateMetaData(dn string) (*certificate.CertificateMetaData, error)

func (*Connector) RetrieveSSHCertificate added in v4.15.0

func (c *Connector) RetrieveSSHCertificate(req *certificate.SshCertRequest) (response *certificate.SshCertificateObject, err error)

func (*Connector) RetrieveSshConfig added in v4.15.2

func (c *Connector) RetrieveSshConfig(ca *certificate.SshCaTemplateRequest) (*certificate.SshConfig, error)

func (*Connector) RevokeCertificate

func (c *Connector) RevokeCertificate(revReq *certificate.RevocationRequest) (err error)

RevokeCertificate attempts to revoke the certificate

func (*Connector) SearchCertificates added in v4.17.0

func (c *Connector) SearchCertificates(req *certificate.SearchRequest) (*certificate.CertSearchResponse, error)

func (*Connector) SetHTTPClient

func (c *Connector) SetHTTPClient(client *http.Client)

func (*Connector) SetPolicy added in v4.14.0

func (c *Connector) SetPolicy(name string, ps *policy.PolicySpecification) (string, error)

func (*Connector) SetZone

func (c *Connector) SetZone(z string)

type CsrAttributes added in v4.16.0

type CsrAttributes struct {
	CommonName                    *string                        `json:"commonName,omitempty"`
	Organization                  *string                        `json:"organization,omitempty"`
	OrganizationalUnits           []string                       `json:"organizationalUnits,omitempty"`
	Locality                      *string                        `json:"locality,omitempty"`
	State                         *string                        `json:"state,omitempty"`
	Country                       *string                        `json:"country,omitempty"`
	SubjectAlternativeNamesByType *SubjectAlternativeNamesByType `json:"subjectAlternativeNamesByType,omitempty"`
}

type EdgeEncryptionKey added in v4.16.0

type EdgeEncryptionKey struct {
	Key string `json:"key,omitempty"`
}

type Expression

type Expression struct {
	Operator Operator  `json:"operator,omitempty"`
	Operands []Operand `json:"operands,omitempty"`
}

type Field

type Field string

type KeyStoreRequest added in v4.16.0

type KeyStoreRequest struct {
	ExportFormat                  string `json:"exportFormat,omitempty"`
	EncryptedPrivateKeyPassphrase string `json:"encryptedPrivateKeyPassphrase"`
	EncryptedKeystorePassphrase   string `json:"encryptedKeystorePassphrase"`
	CertificateLabel              string `json:"certificateLabel"`
}

type Operand

type Operand struct {
	Field    Field       `json:"field"`
	Operator Operator    `json:"operator"`
	Value    interface{} `json:"value"`
}

type Operator

type Operator string
const (
	EQ    Operator = "EQ"
	FIND  Operator = "FIND"
	GT    Operator = "GT"
	GTE   Operator = "GTE"
	IN    Operator = "IN"
	LT    Operator = "LT"
	LTE   Operator = "LTE"
	MATCH Operator = "MATCH"
	AND   Operator = "AND"
)

type Paging

type Paging struct {
	PageNumber int `json:"pageNumber"`
	PageSize   int `json:"pageSize"`
}

type SearchRequest

type SearchRequest struct {
	Expression *Expression  `json:"expression"`
	Ordering   *interface{} `json:"ordering,omitempty"`
	Paging     *Paging      `json:"paging,omitempty"`
}

type SubjectAlternativeNamesByType added in v4.16.0

type SubjectAlternativeNamesByType struct {
	DnsNames []string `json:"dnsNames,omitempty"`
}

Jump to

Keyboard shortcuts

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