certs_vault

package
v1.12.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 GetCAInfo

func GetCAInfo(params GetCAInfoRequest) (*lib.GetCAInfoResponse, error)

func GetClient

func GetClient(spec *hlfv1alpha1.VaultSpecConf, clientset *kubernetes.Clientset) (*vault.Client, 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 EnrollUserRequest struct {
	MSPID      string
	User       string
	Hosts      []string
	CN         string
	Attributes []*api.AttributeRequest
}

type FabricCAParams

type FabricCAParams struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
}

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 FabricConfigUser struct {
	Key  FabricPem `yaml:"key"`
	Cert FabricPem `yaml:"cert"`
}

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 FabricPem

type FabricPem struct {
	Pem string `yaml:"pem"`
}

type FabricRegistrar

type FabricRegistrar struct {
	EnrollID     string `yaml:"enrollId"`
	EnrollSecret string `yaml:"enrollSecret"`
}

type GetCAInfoRequest

type GetCAInfoRequest struct {
	TLSCert string
	URL     string
	Name    string
	MSPID   string
}

type GetUserRequest

type GetUserRequest struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
	User         string
}

type ReenrollUserRequest

type ReenrollUserRequest struct {
	EnrollID   string
	MSPID      string
	Hosts      []string
	CN         string
	Attributes []*api.AttributeRequest
}

type RegisterUserRequest

type RegisterUserRequest struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
	User         string
	Secret       string
	Type         string
	Attributes   []api.Attribute
}

type RevokeUserRequest

type RevokeUserRequest struct {
	TLSCert           string
	URL               string
	Name              string
	MSPID             string
	EnrollID          string
	EnrollSecret      string
	RevocationRequest *api.RevocationRequest
}

Jump to

Keyboard shortcuts

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