Documentation
¶
Index ¶
- func CreateCA(ctx context.Context, req CreateCARequest, clientset *kubernetes.Clientset, ...) (*x509.Certificate, *ecdsa.PrivateKey, error)
- func CreateDefaultCAWithVault(ctx context.Context, fabricCA *hlfv1alpha1.FabricCA, ...) (*x509.Certificate, *ecdsa.PrivateKey, error)
- func EnrollUser(clientSet kubernetes.Interface, vaultConf *hlfv1alpha1.VaultSpecConf, ...) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)
- func GetCAInfo(params GetCAInfoRequest) (*lib.GetCAInfoResponse, error)
- func GetClient(spec *hlfv1alpha1.VaultSpecConf, clientset kubernetes.Interface) (*vault.Client, error)
- func ReenrollUser(clientSet kubernetes.Interface, spec *hlfv1alpha1.VaultSpecConf, ...) (*x509.Certificate, *x509.Certificate, error)
- func RegisterUser(params RegisterUserRequest) (string, error)
- func RevokeUser(params RevokeUserRequest) error
- type CreateCARequest
- type EnrollUserRequest
- type FabricCAParams
- type FabricConfig
- type FabricConfigCA
- type FabricConfigClient
- type FabricConfigConnection
- type FabricConfigOrg
- type FabricConfigTimeout
- type FabricConfigTimeoutParams
- type FabricConfigUser
- type FabricCredentialStore
- type FabricCryptoStore
- type FabricHttpOptions
- type FabricMultiplePem
- type FabricPem
- type FabricRegistrar
- type GetCAInfoRequest
- type GetUserRequest
- type ReenrollUserRequest
- type RegisterUserRequest
- type RevokeUserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCA ¶
func CreateCA(ctx context.Context, req CreateCARequest, clientset *kubernetes.Clientset, vaultClient *vault.Client) (*x509.Certificate, *ecdsa.PrivateKey, error)
CreateCA creates a CA certificate in Vault's PKI backend
func CreateDefaultCAWithVault ¶
func CreateDefaultCAWithVault(ctx context.Context, fabricCA *hlfv1alpha1.FabricCA, conf hlfv1alpha1.FabricCAItemConf, clientset *kubernetes.Clientset, vaultClient *vault.Client, caReq CreateCARequest) (*x509.Certificate, *ecdsa.PrivateKey, error)
CreateDefaultCAWithVault creates a default CA certificate in Vault
func EnrollUser ¶
func EnrollUser(clientSet kubernetes.Interface, vaultConf *hlfv1alpha1.VaultSpecConf, request *hlfv1alpha1.VaultPKICertificateRequest, params EnrollUserRequest) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)
func GetCAInfo ¶
func GetCAInfo(params GetCAInfoRequest) (*lib.GetCAInfoResponse, error)
func GetClient ¶
func GetClient(spec *hlfv1alpha1.VaultSpecConf, clientset kubernetes.Interface) (*vault.Client, error)
func ReenrollUser ¶
func ReenrollUser(clientSet kubernetes.Interface, spec *hlfv1alpha1.VaultSpecConf, request *hlfv1alpha1.VaultPKICertificateRequest, params ReenrollUserRequest, certPem string, ecdsaKey *ecdsa.PrivateKey) (*x509.Certificate, *x509.Certificate, error)
func RegisterUser ¶
func RegisterUser(params RegisterUserRequest) (string, error)
func RevokeUser ¶
func RevokeUser(params RevokeUserRequest) error
Types ¶
type CreateCARequest ¶
type CreateCARequest struct {
Name string
Subject hlfv1alpha1.FabricCASubject
SerialNumber *big.Int
}
type EnrollUserRequest ¶
type FabricCAParams ¶
type FabricConfig ¶
type FabricConfig struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Client FabricConfigClient `yaml:"client"`
Organizations map[string]FabricConfigOrg `yaml:"organizations"`
CertificateAuthorities map[string]FabricConfigCA `yaml:"certificateAuthorities"`
}
type FabricConfigCA ¶
type FabricConfigCA struct {
URL string `yaml:"url"`
CaName string `yaml:"caName"`
TLSCACerts FabricMultiplePem `yaml:"tlsCACerts"`
Registrar FabricRegistrar `yaml:"registrar"`
HTTPOptions FabricHttpOptions `yaml:"httpOptions"`
}
type FabricConfigClient ¶
type FabricConfigClient struct {
Organization string `yaml:"organization"`
CredentialStore FabricCredentialStore `yaml:"credentialStore,omitempty"`
Connection FabricConfigConnection `yaml:"connection"`
}
type FabricConfigConnection ¶
type FabricConfigConnection struct {
Timeout FabricConfigTimeout `yaml:"timeout"`
}
type FabricConfigOrg ¶
type FabricConfigOrg struct {
Mspid string `yaml:"mspid"`
CryptoPath string `yaml:"cryptoPath"`
Users map[string]FabricConfigUser `yaml:"users,omitempty"`
CredentialStore FabricCredentialStore `yaml:"credentialStore,omitempty"`
CertificateAuthorities []string `yaml:"certificateAuthorities"`
}
type FabricConfigTimeout ¶
type FabricConfigTimeout struct {
Peer FabricConfigTimeoutParams `yaml:"peer"`
}
type FabricConfigTimeoutParams ¶
type FabricConfigTimeoutParams struct {
Endorser string `yaml:"endorser"`
}
type FabricConfigUser ¶
type FabricCredentialStore ¶
type FabricCredentialStore struct {
Path string `yaml:"path"`
CryptoStore FabricCryptoStore `yaml:"cryptoStore"`
}
type FabricCryptoStore ¶
type FabricCryptoStore struct {
Path string `yaml:"path"`
}
type FabricHttpOptions ¶
type FabricHttpOptions struct {
Verify bool `yaml:"verify"`
}
type FabricMultiplePem ¶
type FabricMultiplePem struct {
Pem []string `yaml:"pem"`
}
type FabricRegistrar ¶
type GetCAInfoRequest ¶
type GetUserRequest ¶
type ReenrollUserRequest ¶
type RegisterUserRequest ¶
type RevokeUserRequest ¶
Click to show internal directories.
Click to hide internal directories.