Documentation
¶
Overview ¶
Package certs contains the domain concept definitions needed to support SuperMQ certs service functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFailedCertCreation failed to create certificate. ErrFailedCertCreation = errors.New("failed to create client certificate") // ErrFailedCertRevocation failed to revoke certificate. ErrFailedCertRevocation = errors.New("failed to revoke certificate") ErrFailedToRemoveCertFromDB = errors.New("failed to remove cert serial from db") ErrFailedReadFromPKI = errors.New("failed to read certificate from PKI") )
View Source
var ErrMissingCerts = errors.New("CA path or CA key path not set")
Functions ¶
func LoadCertificates ¶
func LoadCertificates(caPath, caKeyPath string) (tls.Certificate, *x509.Certificate, error)
Types ¶
type PageMetadata ¶
type PageMetadata struct { Total uint64 `json:"total,omitempty"` Offset uint64 `json:"offset,omitempty"` Limit uint64 `json:"limit,omitempty"` ClientID string `json:"client_id,omitempty"` Token string `json:"token,omitempty"` CommonName string `json:"common_name,omitempty"` Revoked string `json:"revoked,omitempty"` }
type Service ¶
type Service interface { // IssueCert issues certificate for given client id if access is granted with token IssueCert(ctx context.Context, domainID, token, clientID, ttl string) (Cert, error) // ListCerts lists certificates issued for a given client ID ListCerts(ctx context.Context, clientID string, pm PageMetadata) (CertPage, error) // ListSerials lists certificate serial IDs issued for a given client ID ListSerials(ctx context.Context, clientID string, pm PageMetadata) (CertPage, error) // ViewCert retrieves the certificate issued for a given serial ID ViewCert(ctx context.Context, serialID string) (Cert, error) // RevokeCert revokes a certificate for a given client ID RevokeCert(ctx context.Context, domainID, token, clientID string) (Revoke, error) }
Service specifies an API that must be fulfilled by the domain service implementation, and all of its decorators (e.g. logging & metrics).
Directories
¶
Path | Synopsis |
---|---|
Package api contains implementation of certs service HTTP API.
|
Package api contains implementation of certs service HTTP API. |
Package mocks contains mocks for testing purposes.
|
Package mocks contains mocks for testing purposes. |
pki
|
|
vault
Package pki contains the domain concept definitions needed to support SuperMQ Certs service functionality.
|
Package pki contains the domain concept definitions needed to support SuperMQ Certs service functionality. |
Package tracing provides tracing instrumentation for SuperMQ Users Groups service.
|
Package tracing provides tracing instrumentation for SuperMQ Users Groups service. |
Click to show internal directories.
Click to hide internal directories.