Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAType ¶ added in v1.0.1
type CAType int
func ParseCAType ¶ added in v1.0.1
func (CAType) ToVaultPath ¶ added in v1.0.1
type Cert ¶ added in v1.0.1
type Cert struct { // The status of the CA // required: true // example: issued | expired Status string `json:"status,omitempty"` // The serial number of the CA // required: true // example: 7e:36:13:a5:31:9f:4a:76:10:64:2e:9b:0a:11:07:b7:e6:3e:cf:94 SerialNumber string `json:"serial_number,omitempty"` // The name/alias of the CA // required: true // example: Lamassu-CA Name string `json:"name,omitempty"` KeyMetadata KeyInfo `json:"key_metadata"` Subject Subject `json:"subject"` CertContent CertContent `json:"certificate"` // Expiration period of the new emmited CA // required: true // example: 262800h CaTTL int `json:"ca_ttl,omitempty"` EnrollerTTL int `json:"enroller_ttl,omitempty"` ValidFrom string `json:"valid_from"` ValidTo string `json:"valid_to"` }
type CertContent ¶ added in v1.0.1
type Certs ¶ added in v1.0.1
type Certs struct {
Certs []Cert `json:"certs"`
}
CAs represents a list of CAs with minimum information swagger:model
type KeyInfo ¶ added in v1.0.1
type KeyInfo struct { // Algorithm used to create CA key // required: true // example: RSA KeyType string `json:"type"` // Length used to create CA key // required: true // example: 4096 KeyBits int `json:"bits"` // Strength of the key used to the create CA // required: true // example: low KeyStrength string `json:"strength"` }
type Secrets ¶
type Secrets interface { GetSecretProviderName(ctx context.Context) string GetCAs(ctx context.Context, caType CAType) (Certs, error) GetCA(ctx context.Context, caType CAType, caName string) (Cert, error) CreateCA(ctx context.Context, caType CAType, caName string, ca Cert) (Cert, error) ImportCA(ctx context.Context, caType CAType, caName string, caImport CAImport) error DeleteCA(ctx context.Context, caType CAType, caName string) error GetIssuedCerts(ctx context.Context, caType CAType, caName string) (Certs, error) GetCert(ctx context.Context, caType CAType, caName string, serialNumber string) (Cert, error) DeleteCert(ctx context.Context, caType CAType, caName string, serialNumber string) error SignCertificate(ctx context.Context, caType CAType, CAcaName string, csr *x509.CertificateRequest) (string, error) }
type Subject ¶ added in v1.0.1
type Subject struct { // Common name of the CA certificate // required: true // example: Lamassu-Root-CA1-RSA4096 CN string `json:"common_name"` // Organization of the CA certificate // required: true // example: Lamassu IoT O string `json:"organization"` // Organization Unit of the CA certificate // required: true // example: Lamassu IoT department 1 OU string `json:"organization_unit"` // Country Name of the CA certificate // required: true // example: ES C string `json:"country"` // State of the CA certificate // required: true // example: Guipuzcoa ST string `json:"state"` // Locality of the CA certificate // required: true // example: Arrasate L string `json:"locality"` }
Click to show internal directories.
Click to hide internal directories.