Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyTypeForPCKS1 = "PKCS#1" KeyTypeForPCKS8 = "PKCS#8" )
View Source
const (
GroupKuscia = "kuscia"
)
Variables ¶
This section is empty.
Functions ¶
func InitServiceHolder ¶
func InitServiceHolder(config *cmconfig.ConfManagerConfig) error
Types ¶
type CertConfig ¶
type CertConfig struct { CertValue *atomic.Value PrivateKey *rsa.PrivateKey }
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
func (*Holder) CertificateService ¶
func (s *Holder) CertificateService() ICertificateService
CertificateService exports CertificateService instance.
func (*Holder) ConfigurationService ¶
func (s *Holder) ConfigurationService() IConfigurationService
ConfigurationService exports ConfigurationService instance.
type HolderExporter ¶
type HolderExporter interface { ConfigurationService() IConfigurationService CertificateService() ICertificateService Ready() bool }
var Exporter HolderExporter = &serviceHolderInstance
type ICertificateService ¶
type ICertificateService interface { // ValidateGenerateKeyCertsRequest check request. ValidateGenerateKeyCertsRequest(ctx context.Context, request *confmanager.GenerateKeyCertsRequest) *errorcode.Errs // GenerateKeyCerts create a pair of x509 key and cert with domain ca cert. GenerateKeyCerts(context.Context, *confmanager.GenerateKeyCertsRequest) *confmanager.GenerateKeyCertsResponse }
ICertificateService is service which manager x509 keys and certificates. It can be used by grpc-mtls/https/process-call.
func NewCertificateService ¶
func NewCertificateService(config CertConfig) (ICertificateService, error)
type IConfigurationService ¶
type IConfigurationService interface { // CreateConfiguration create a configuration with confID/content/cn. CreateConfiguration(context.Context, *confmanager.CreateConfigurationRequest, string) confmanager.CreateConfigurationResponse // QueryConfiguration query a configuration with confIDs/cn. QueryConfiguration(context.Context, *confmanager.QueryConfigurationRequest, string) confmanager.QueryConfigurationResponse }
IConfigurationService is service which manager conf from/to secret backend. It can be used by grpc-mtls/https/process-call.
func NewConfigurationService ¶
func NewConfigurationService(backend secretbackend.SecretDriver, enableAuth bool) (IConfigurationService, error)
Click to show internal directories.
Click to hide internal directories.