provider

package
v1.11.57 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// PrepareKey creates/setup up a private key for use with the provider
	PrepareKey(string) (crypto.PrivateKey, error)

	// AttestationData returns the attestation data that can be used in the ZTS api
	AttestationData(string, crypto.PrivateKey, *signature.SignatureInfo) (string, error)

	// GetName returns the name of the current provider
	GetName() string

	// GetHostname returns the name of the hostname as recognized by the provider
	GetHostname(bool) string

	// GetCsrDn returns the x.509 Distinguished Name for use in the CSR
	GetCsrDn() pkix.Name

	// GetSanDns returns an array of provider specific SAN DNS entries
	GetSanDns(string, bool, bool, []string) []string

	// GetSanUri returns an array of provider specific SAN URI entries
	GetSanUri(string, ip.Opts, string, string) []*url.URL

	// GetEmail retuns an array of one email which can be used to identify the principal
	GetEmail(string) []string

	// GetRoleDnsNames returns an array of SanDNS entries that can be used for Role Cert
	GetRoleDnsNames(*x509.Certificate, string) []string

	// GetSanIp returns an array of IPs that can be included in San IPs from the list of IPs found on the box
	GetSanIp(map[string]bool, []net.IP, ip.Opts) []net.IP

	// GetSuffixes returns a list of suffixes for the current provider
	GetSuffixes() []string

	// CloudAttestationData gets the attestation data to prove the identity from metadata of the respective cloud
	CloudAttestationData(string, string, string) (string, error)

	// GetAccountDomainServiceFromMeta gets the account, domain and service info from the respective cloud
	GetAccountDomainServiceFromMeta(string) (string, string, string, error)

	// GetAccessManagementProfileFromMeta gets the profile info from the respective cloud
	GetAccessManagementProfileFromMeta(string) (string, error)

	// GetAdditionalSshHostPrincipals returns additional provider specific principals to be added in ssh host cert
	GetAdditionalSshHostPrincipals(string) (string, error)
}

Provider is the interface which wraps various Providers known to ZTS It has methods for providing attestationdata depending on provider type and generating sub-parts of DN to be including in the CSR and San DNS and URI entries

Jump to

Keyboard shortcuts

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