discovery

package
v0.0.0-...-a57b771 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package discovery implements logic for paged certificate discovery on a VMware AVI host

Index

Constants

View Source
const (
	// DefaultPageSize is the constant representing the number of results per paged request to VMware
	DefaultPageSize = 10
	// DefaultCertificateSearch will include only system and virtual service certificates -- excluding CA certificates
	DefaultCertificateSearch = "(type,SSL_CERTIFICATE_TYPE_SYSTEM)|(type,SSL_CERTIFICATE_TYPE_VIRTUALSERVICE)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateInstallation

type CertificateInstallation struct {
	// The hostname or IP Address
	Hostname string `json:"hostname"`
	// The IP Address
	IPAddress string `json:"ipAddress"`
	// The port number
	Port int `json:"port"`
}

CertificateInstallation is a Venafi defined struct that represents usage of a discovered certificate

type DiscoverCertificatesConfiguration

type DiscoverCertificatesConfiguration struct {
	ExcludeExpiredCertificates  bool   `json:"excludeExpiredCertificates"`
	ExcludeInactiveCertificates bool   `json:"excludeInactiveCertificates"`
	Tenants                     string `json:"tenants"`
	// contains filtered or unexported fields
}

DiscoverCertificatesConfiguration represents the discovery configuration settings defined by the manifest.json

type DiscoverCertificatesRequest

type DiscoverCertificatesRequest struct {
	Configuration DiscoverCertificatesConfiguration `json:"discovery"`
	Connection    *domain.Connection                `json:"connection"`
	Control       DiscoveryControl                  `json:"discoveryControl"`
	Page          *DiscoveryPage                    `json:"discoveryPage,omitempty"`
}

DiscoverCertificatesRequest contains the request details for a discovery

type DiscoverCertificatesResponse

type DiscoverCertificatesResponse struct {
	// The current pagination state for the current discovery request.
	// If the discovery is completed in the current discovery request then this value should be nil.
	Page *DiscoveryPage `json:"discoveryPage"`
	// The certificates and usage discovered during the current discovery request.
	Messages []*DiscoveredCertificate `json:"messages"`
}

DiscoverCertificatesResponse represents the response to a discovery request

type DiscoveredCertificate

type DiscoveredCertificate struct {
	// The raw certificate bytes as a base64 encoded string
	Certificate string `json:"certificate"`
	// The issuing chain of certificates ordered from the last intermediate issuing certificate to the root CA certificate
	CertificateChain []string `json:"certificateChain"`
	// The collection of virtual services using the certificate
	Installations []*CertificateInstallation `json:"installations"`
	// The collection of machine identities for the certificate
	MachineIdentities []*MachineIdentity `json:"machineIdentities"`
}

DiscoveredCertificate is a Venafi defined struct that represents a single certificate and it's usage found during a discovery

type DiscoveryControl

type DiscoveryControl struct {
	MaxResults int `json:"maxResults"`
}

DiscoveryControl represents the Venafi defined definitions for discovery result processing

type DiscoveryPage

type DiscoveryPage struct {
	// The name of the tenant to start at when continuing the next discovery request
	Tenant *string `json:"discoveryType,omitempty"`
	// The value for using when continuing the next discovery request.  This value is defined by the connector.
	Paginator string `json:"paginator"`
}

DiscoveryPage represents the current pagination state of an active discovery as defined by the discoveryPage definition in the manifest.json.

type DiscoveryService

type DiscoveryService struct {
	ClientServices vmwareavi.ClientServices
}

DiscoveryService implementation of ClientServices

func NewDiscoveryService

func NewDiscoveryService(clientServices vmwareavi.ClientServices) *DiscoveryService

NewDiscoveryService create a new DiscoveryService

func (*DiscoveryService) DiscoverCertificates

func (svc *DiscoveryService) DiscoverCertificates(c echo.Context) error

DiscoverCertificates will attempt to start or continue a discovery of certificates

type MachineIdentity

type MachineIdentity struct {
	// The keystore values for a certificate as defined in the manifest.json
	Keystore *domain.Keystore `json:"keystore"`
	// The binding values for a certificate as defined in the manifest.json
	Binding *domain.Binding `json:"binding"`
}

MachineIdentity is a Venafi defined struct that represents a certificate usage as found during a discovery

type TenantNames

type TenantNames []string

TenantNames is an alias declaration for a collection of tenant names

Jump to

Keyboard shortcuts

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