firefly

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRSASize

func GetRSASize(rsaSize int) (int, error)

func NewResponseError

func NewResponseError(b []byte) (*responseError, error)

Types

type AlternativeNames

type AlternativeNames struct {
	DnsNames       []string `json:"dnsNames,omitempty"`
	IpAddresses    []string `json:"ipAddresses,omitempty"`
	EmailAddresses []string `json:"emailAddresses,omitempty"`
	Uris           []string `json:"uris,omitempty"`
}

type Connector

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

Connector contains the base data needed to communicate with a Firefly Server

func NewConnector

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

NewConnector creates a new Firefly Connector object used to communicate with Firefly

func (*Connector) Authenticate

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

func (*Connector) Authorize

func (c *Connector) Authorize(auth *endpoint.Authentication) (token *oauth2.Token, err error)

Authorize Get an OAuth access token

func (*Connector) GenerateRequest

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

GenerateRequest should generate a CertificateRequest based on the zone configuration when the csrOrigin was set to LocalGeneratedCSR but given that is not supported by Firefly yet, then it's only validating if the CSR was provided when the csrOrigin was set to UserProvidedCSR

func (*Connector) GetPolicy

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

func (*Connector) GetType

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

func (*Connector) GetZonesByParent

func (c *Connector) GetZonesByParent(_ string) ([]string, error)

func (*Connector) ImportCertificate

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

func (*Connector) IsCSRServiceGenerated

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

func (*Connector) ListCertificates

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

func (*Connector) Ping

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

func (*Connector) ReadPolicyConfiguration

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

func (*Connector) ReadZoneConfiguration

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

func (*Connector) RenewCertificate

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

func (*Connector) RequestCertificate

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

RequestCertificate submits the CSR to the Venafi Firefly API for processing

func (*Connector) RequestSSHCertificate

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

func (*Connector) ResetCertificate

func (c *Connector) ResetCertificate(_ *certificate.Request, _ bool) (err error)

func (*Connector) RetireCertificate

func (c *Connector) RetireCertificate(_ *certificate.RetireRequest) error

func (*Connector) RetrieveAvailableSSHTemplates

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

func (*Connector) RetrieveCertificate

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

func (*Connector) RetrieveCertificateMetaData

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

func (*Connector) RetrieveSSHCertificate

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

func (*Connector) RetrieveSshConfig

func (*Connector) RetrieveSystemVersion

func (c *Connector) RetrieveSystemVersion() (string, error)

func (*Connector) RevokeCertificate

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

func (*Connector) SearchCertificate

func (c *Connector) SearchCertificate(_ string, _ string, _ *certificate.Sans, _ time.Duration) (certificateInfo *certificate.CertificateInfo, err error)

func (*Connector) SearchCertificates

func (*Connector) SetHTTPClient

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

func (*Connector) SetPolicy

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

func (*Connector) SetZone

func (c *Connector) SetZone(zone string)

func (*Connector) SupportSynchronousRequestCertificate

func (c *Connector) SupportSynchronousRequestCertificate() bool

SupportSynchronousRequestCertificate returns if the connector support synchronous calls to request a certificate.

func (*Connector) SynchronousRequestCertificate

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

SynchronousRequestCertificate It's not supported yet in VaaS

func (*Connector) WriteLog

func (c *Connector) WriteLog(_ *endpoint.LogRequest) error

type DevAuthStatus

type DevAuthStatus int
const (
	Unknown DevAuthStatus = iota
	AuthorizationPending
	SlowDown
	AccessDenied
	ExpiredToken
)

func GetDevAuthStatus

func GetDevAuthStatus(devAuthStatus string) DevAuthStatus

func GetDevAuthStatusFromError added in v5.2.0

func GetDevAuthStatusFromError(err error) DevAuthStatus

func (DevAuthStatus) String

func (das DevAuthStatus) String() string

type DeviceCred

type DeviceCred struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURL string `json:"verification_url"` //Google use this to return the URL to share to the user
	VerificationURI string `json:"verification_uri"` // others like Okta, Auth0 and WSO2 use this one to return the URI to share to the user
	Interval        int64  `json:"interval"`
	ExpiresIn       int64  `json:"expires_in"`
}

DeviceCred It's the representation of the info returned when a Device Code is requested to the OAuth 2.0 Identity Provider to request an access code

type ErrCertNotFound

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

func (*ErrCertNotFound) Error

func (e *ErrCertNotFound) Error() string

func (*ErrCertNotFound) Unwrap

func (e *ErrCertNotFound) Unwrap() error

type Subject

type Subject struct {
	CommonName   string   `json:"commonName,omitempty"`
	Organization string   `json:"organization,omitempty"`
	OrgUnits     []string `json:"orgUnits,omitempty"`
	Locality     string   `json:"locality,omitempty"`
	State        string   `json:"state,omitempty"`
	Country      string   `json:"country,omitempty"`
}

Jump to

Keyboard shortcuts

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