pbmsp

package
v0.0.0-...-e3e94bd Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MSPPrincipal_Classification_name = map[int32]string{
		0: "ROLE",
		1: "ORGANIZATION_UNIT",
		2: "IDENTITY",
		3: "ANONYMITY",
		4: "COMBINED",
	}
	MSPPrincipal_Classification_value = map[string]int32{
		"ROLE":              0,
		"ORGANIZATION_UNIT": 1,
		"IDENTITY":          2,
		"ANONYMITY":         3,
		"COMBINED":          4,
	}
)

Enum value maps for MSPPrincipal_Classification.

View Source
var (
	MSPRole_MSPRoleType_name = map[int32]string{
		0: "MEMBER",
		1: "ADMIN",
		2: "CLIENT",
		3: "PEER",
		4: "ORDERER",
	}
	MSPRole_MSPRoleType_value = map[string]int32{
		"MEMBER":  0,
		"ADMIN":   1,
		"CLIENT":  2,
		"PEER":    3,
		"ORDERER": 4,
	}
)

Enum value maps for MSPRole_MSPRoleType.

View Source
var (
	MSPIdentityAnonymity_MSPIdentityAnonymityType_name = map[int32]string{
		0: "NOMINAL",
		1: "ANONYMOUS",
	}
	MSPIdentityAnonymity_MSPIdentityAnonymityType_value = map[string]int32{
		"NOMINAL":   0,
		"ANONYMOUS": 1,
	}
)

Enum value maps for MSPIdentityAnonymity_MSPIdentityAnonymityType.

View Source
var File_identities_proto protoreflect.FileDescriptor
View Source
var File_msp_config_proto protoreflect.FileDescriptor
View Source
var File_msp_principal_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CombinedPrincipal

type CombinedPrincipal struct {

	// Principals refer to combined principals
	Principals []*MSPPrincipal `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"`
	// contains filtered or unexported fields
}

CombinedPrincipal governs the organization of the Principal field of a policy principal when principal_classification has indicated that a combined form of principals is required

func (*CombinedPrincipal) Descriptor deprecated

func (*CombinedPrincipal) Descriptor() ([]byte, []int)

Deprecated: Use CombinedPrincipal.ProtoReflect.Descriptor instead.

func (*CombinedPrincipal) GetPrincipals

func (x *CombinedPrincipal) GetPrincipals() []*MSPPrincipal

func (*CombinedPrincipal) ProtoMessage

func (*CombinedPrincipal) ProtoMessage()

func (*CombinedPrincipal) ProtoReflect

func (x *CombinedPrincipal) ProtoReflect() protoreflect.Message

func (*CombinedPrincipal) Reset

func (x *CombinedPrincipal) Reset()

func (*CombinedPrincipal) String

func (x *CombinedPrincipal) String() string

type HyperchainCryptoConfig

type HyperchainCryptoConfig struct {

	// HashAlgorithm 定义了哈希算法,目前仅支持 SHA256 哈希算法。
	// 用于计算签名 (signature) 和身份标识符 (identity identifier) 时使用。
	HashAlgorithm string `protobuf:"bytes,1,opt,name=hash_algorithm,json=hashAlgorithm,proto3" json:"hash_algorithm,omitempty"`
	// contains filtered or unexported fields
}

HyperchainCryptoConfig contains configuration parameters for the cryptographic algorithms used by the MSP this configuration refers to

func (*HyperchainCryptoConfig) Descriptor deprecated

func (*HyperchainCryptoConfig) Descriptor() ([]byte, []int)

Deprecated: Use HyperchainCryptoConfig.ProtoReflect.Descriptor instead.

func (*HyperchainCryptoConfig) GetHashAlgorithm

func (x *HyperchainCryptoConfig) GetHashAlgorithm() string

func (*HyperchainCryptoConfig) ProtoMessage

func (*HyperchainCryptoConfig) ProtoMessage()

func (*HyperchainCryptoConfig) ProtoReflect

func (x *HyperchainCryptoConfig) ProtoReflect() protoreflect.Message

func (*HyperchainCryptoConfig) Reset

func (x *HyperchainCryptoConfig) Reset()

func (*HyperchainCryptoConfig) String

func (x *HyperchainCryptoConfig) String() string

type HyperchainMSPConfig

type HyperchainMSPConfig struct {

	// Name holds the identifier of the MSP; MSP identifier
	// is chosen by the application that governs this MSP.
	// For example, and assuming the default implementation of MSP,
	// that is X.509-based and considers a single Issuer,
	// this can refer to the Subject OU field or the Issuer OU field.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// RootCerts 存储本 msp 信任的 ca 证书的证书列表,存储格式为 ASN.1 DER PEM。
	RootCerts [][]byte `protobuf:"bytes,2,rep,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"`
	// IntermediateCerts 存储该 MSP 信任的中间证书列表;它们在证书验证时的使用方法如下:
	// 验证尝试从待验证证书(位于路径的一端)和根证书字段中的一个证书(位于路径的另一端)
	// 之间建立一条路径。如果路径长于 2,中间的证书将在 IntermediateCerts 池中搜索。
	IntermediateCerts [][]byte `protobuf:"bytes,3,rep,name=intermediate_certs,json=intermediateCerts,proto3" json:"intermediate_certs,omitempty"`
	// Admins 表示该 MSP 的管理员的身份。
	// x509 证书的 ASN.1 DER PEM 格式编码的数据。
	Admins [][]byte `protobuf:"bytes,4,rep,name=admins,proto3" json:"admins,omitempty"`
	// RevocationList 证书撤销列表。
	// x509 证书的 ASN.1 DER PEM 格式编码的数据。
	RevocationList [][]byte `protobuf:"bytes,5,rep,name=revocation_list,json=revocationList,proto3" json:"revocation_list,omitempty"`
	// SigningIdentity holds information on the signing identity
	// this peer is to use, and which is to be imported by the
	// MSP defined before
	SigningIdentity *SigningIdentityInfo `protobuf:"bytes,6,opt,name=signing_identity,json=signingIdentity,proto3" json:"signing_identity,omitempty"`
	// OrganizationalUnitIdentifiers holds one or more
	// hyperchain organizational unit identifiers that belong to
	// this MSP configuration
	OrganizationalUnitIdentifiers []*HyperchainOUIdentifier `` /* 150-byte string literal not displayed */
	// HyperchainCryptoConfig 定义了采用那种哈希算法。
	CryptoConfig *HyperchainCryptoConfig `protobuf:"bytes,8,opt,name=crypto_config,json=cryptoConfig,proto3" json:"crypto_config,omitempty"`
	// TlsRootCerts 该 MSP 信任的 TLS 根证书列表,x509 证书的 ASN.1 DER PEM 格式编码的数据。
	TlsRootCerts [][]byte `protobuf:"bytes,9,rep,name=tls_root_certs,json=tlsRootCerts,proto3" json:"tls_root_certs,omitempty"`
	// TlsIntermediateCerts 该 MSP 信任的 TLS 中级证书列表,x509 证书的 ASN.1 DER PEM 格式编码的数据。
	TlsIntermediateCerts [][]byte `protobuf:"bytes,10,rep,name=tls_intermediate_certs,json=tlsIntermediateCerts,proto3" json:"tls_intermediate_certs,omitempty"`
	// HyperchainNodeOus 包含 peer、admin、client、orderer 四类节点的 organizational unit 的配置信息。
	HyperchainNodeOus *HyperchainNodeOUs `protobuf:"bytes,11,opt,name=hyperchain_node_ous,json=hyperchainNodeOus,proto3" json:"hyperchain_node_ous,omitempty"`
	// contains filtered or unexported fields
}

HyperchainMSPConfig collects all the configuration information for a Hyperchain MSP. Here we assume a default certificate validation policy, where any certificate signed by any of the listed rootCA certs would be considered as valid under this MSP. This MSP may or may not come with a signing identity. If it does, it can also issue signing identities. If it does not, it can only be used to validate and verify certificates.

func (*HyperchainMSPConfig) Descriptor deprecated

func (*HyperchainMSPConfig) Descriptor() ([]byte, []int)

Deprecated: Use HyperchainMSPConfig.ProtoReflect.Descriptor instead.

func (*HyperchainMSPConfig) GetAdmins

func (x *HyperchainMSPConfig) GetAdmins() [][]byte

func (*HyperchainMSPConfig) GetCryptoConfig

func (x *HyperchainMSPConfig) GetCryptoConfig() *HyperchainCryptoConfig

func (*HyperchainMSPConfig) GetHyperchainNodeOus

func (x *HyperchainMSPConfig) GetHyperchainNodeOus() *HyperchainNodeOUs

func (*HyperchainMSPConfig) GetIntermediateCerts

func (x *HyperchainMSPConfig) GetIntermediateCerts() [][]byte

func (*HyperchainMSPConfig) GetName

func (x *HyperchainMSPConfig) GetName() string

func (*HyperchainMSPConfig) GetOrganizationalUnitIdentifiers

func (x *HyperchainMSPConfig) GetOrganizationalUnitIdentifiers() []*HyperchainOUIdentifier

func (*HyperchainMSPConfig) GetRevocationList

func (x *HyperchainMSPConfig) GetRevocationList() [][]byte

func (*HyperchainMSPConfig) GetRootCerts

func (x *HyperchainMSPConfig) GetRootCerts() [][]byte

func (*HyperchainMSPConfig) GetSigningIdentity

func (x *HyperchainMSPConfig) GetSigningIdentity() *SigningIdentityInfo

func (*HyperchainMSPConfig) GetTlsIntermediateCerts

func (x *HyperchainMSPConfig) GetTlsIntermediateCerts() [][]byte

func (*HyperchainMSPConfig) GetTlsRootCerts

func (x *HyperchainMSPConfig) GetTlsRootCerts() [][]byte

func (*HyperchainMSPConfig) ProtoMessage

func (*HyperchainMSPConfig) ProtoMessage()

func (*HyperchainMSPConfig) ProtoReflect

func (x *HyperchainMSPConfig) ProtoReflect() protoreflect.Message

func (*HyperchainMSPConfig) Reset

func (x *HyperchainMSPConfig) Reset()

func (*HyperchainMSPConfig) String

func (x *HyperchainMSPConfig) String() string

type HyperchainNodeOUs

type HyperchainNodeOUs struct {

	// If true then an msp identity that does not contain any of the specified OU will be considered invalid.
	Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	// OU Identifier of the clients
	ClientOuIdentifier *HyperchainOUIdentifier `protobuf:"bytes,2,opt,name=client_ou_identifier,json=clientOuIdentifier,proto3" json:"client_ou_identifier,omitempty"`
	// OU Identifier of the peers
	PeerOuIdentifier *HyperchainOUIdentifier `protobuf:"bytes,3,opt,name=peer_ou_identifier,json=peerOuIdentifier,proto3" json:"peer_ou_identifier,omitempty"`
	// OU Identifier of the admins
	AdminOuIdentifier *HyperchainOUIdentifier `protobuf:"bytes,4,opt,name=admin_ou_identifier,json=adminOuIdentifier,proto3" json:"admin_ou_identifier,omitempty"`
	// OU Identifier of the orderers
	OrdererOuIdentifier *HyperchainOUIdentifier `protobuf:"bytes,5,opt,name=orderer_ou_identifier,json=ordererOuIdentifier,proto3" json:"orderer_ou_identifier,omitempty"`
	// contains filtered or unexported fields
}

HyperchainNodeOUs contains configuration to tell apart clients from peers from orderers based on OUs. If NodeOUs recognition is enabled then an msp identity that does not contain any of the specified OU will be considered invalid.

func (*HyperchainNodeOUs) Descriptor deprecated

func (*HyperchainNodeOUs) Descriptor() ([]byte, []int)

Deprecated: Use HyperchainNodeOUs.ProtoReflect.Descriptor instead.

func (*HyperchainNodeOUs) GetAdminOuIdentifier

func (x *HyperchainNodeOUs) GetAdminOuIdentifier() *HyperchainOUIdentifier

func (*HyperchainNodeOUs) GetClientOuIdentifier

func (x *HyperchainNodeOUs) GetClientOuIdentifier() *HyperchainOUIdentifier

func (*HyperchainNodeOUs) GetEnable

func (x *HyperchainNodeOUs) GetEnable() bool

func (*HyperchainNodeOUs) GetOrdererOuIdentifier

func (x *HyperchainNodeOUs) GetOrdererOuIdentifier() *HyperchainOUIdentifier

func (*HyperchainNodeOUs) GetPeerOuIdentifier

func (x *HyperchainNodeOUs) GetPeerOuIdentifier() *HyperchainOUIdentifier

func (*HyperchainNodeOUs) ProtoMessage

func (*HyperchainNodeOUs) ProtoMessage()

func (*HyperchainNodeOUs) ProtoReflect

func (x *HyperchainNodeOUs) ProtoReflect() protoreflect.Message

func (*HyperchainNodeOUs) Reset

func (x *HyperchainNodeOUs) Reset()

func (*HyperchainNodeOUs) String

func (x *HyperchainNodeOUs) String() string

type HyperchainOUIdentifier

type HyperchainOUIdentifier struct {

	// Certificate represents the second certificate in a certification chain.
	// (Notice that the first certificate in a certification chain is supposed
	// to be the certificate of an identity).
	// It must correspond to the certificate of root or intermediate CA
	// recognized by the MSP this message belongs to.
	// Starting from this certificate, a certification chain is computed
	// and bound to the OrganizationUnitIdentifier specified
	Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// OrganizationUnitIdentifier defines the organizational unit under the
	// MSP identified with MSPIdentifier
	OrganizationalUnitIdentifier string `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

HyperchainOUIdentifier represents an organizational unit and its related chain of trust identifier.

func (*HyperchainOUIdentifier) Descriptor deprecated

func (*HyperchainOUIdentifier) Descriptor() ([]byte, []int)

Deprecated: Use HyperchainOUIdentifier.ProtoReflect.Descriptor instead.

func (*HyperchainOUIdentifier) GetCertificate

func (x *HyperchainOUIdentifier) GetCertificate() []byte

func (*HyperchainOUIdentifier) GetOrganizationalUnitIdentifier

func (x *HyperchainOUIdentifier) GetOrganizationalUnitIdentifier() string

func (*HyperchainOUIdentifier) ProtoMessage

func (*HyperchainOUIdentifier) ProtoMessage()

func (*HyperchainOUIdentifier) ProtoReflect

func (x *HyperchainOUIdentifier) ProtoReflect() protoreflect.Message

func (*HyperchainOUIdentifier) Reset

func (x *HyperchainOUIdentifier) Reset()

func (*HyperchainOUIdentifier) String

func (x *HyperchainOUIdentifier) String() string

type IdemixMSPConfig

type IdemixMSPConfig struct {

	// Name holds the identifier of the MSP
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ipk represents the (serialized) issuer public key
	Ipk []byte `protobuf:"bytes,2,opt,name=ipk,proto3" json:"ipk,omitempty"`
	// signer may contain crypto material to configure a default signer
	Signer *IdemixMSPSignerConfig `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
	// revocation_pk is the public key used for revocation of credentials
	RevocationPk []byte `protobuf:"bytes,4,opt,name=revocation_pk,json=revocationPk,proto3" json:"revocation_pk,omitempty"`
	// epoch represents the current epoch (time interval) used for revocation
	Epoch int64 `protobuf:"varint,5,opt,name=epoch,proto3" json:"epoch,omitempty"`
	// contains filtered or unexported fields
}

IdemixMSPConfig collects all the configuration information for an Idemix MSP.

func (*IdemixMSPConfig) Descriptor deprecated

func (*IdemixMSPConfig) Descriptor() ([]byte, []int)

Deprecated: Use IdemixMSPConfig.ProtoReflect.Descriptor instead.

func (*IdemixMSPConfig) GetEpoch

func (x *IdemixMSPConfig) GetEpoch() int64

func (*IdemixMSPConfig) GetIpk

func (x *IdemixMSPConfig) GetIpk() []byte

func (*IdemixMSPConfig) GetName

func (x *IdemixMSPConfig) GetName() string

func (*IdemixMSPConfig) GetRevocationPk

func (x *IdemixMSPConfig) GetRevocationPk() []byte

func (*IdemixMSPConfig) GetSigner

func (x *IdemixMSPConfig) GetSigner() *IdemixMSPSignerConfig

func (*IdemixMSPConfig) ProtoMessage

func (*IdemixMSPConfig) ProtoMessage()

func (*IdemixMSPConfig) ProtoReflect

func (x *IdemixMSPConfig) ProtoReflect() protoreflect.Message

func (*IdemixMSPConfig) Reset

func (x *IdemixMSPConfig) Reset()

func (*IdemixMSPConfig) String

func (x *IdemixMSPConfig) String() string

type IdemixMSPSignerConfig

type IdemixMSPSignerConfig struct {

	// cred represents the serialized idemix credential of the default signer
	Cred []byte `protobuf:"bytes,1,opt,name=cred,proto3" json:"cred,omitempty"`
	// sk is the secret key of the default signer, corresponding to credential Cred
	Sk []byte `protobuf:"bytes,2,opt,name=sk,proto3" json:"sk,omitempty"`
	// organizational_unit_identifier defines the organizational unit the default signer is in
	OrganizationalUnitIdentifier string `` /* 147-byte string literal not displayed */
	// role defines whether the default signer is admin, peer, member or client
	Role int32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"`
	// enrollment_id contains the enrollment id of this signer
	EnrollmentId string `protobuf:"bytes,5,opt,name=enrollment_id,json=enrollmentId,proto3" json:"enrollment_id,omitempty"`
	// credential_revocation_information contains a serialized CredentialRevocationInformation
	CredentialRevocationInformation []byte `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

IdemixMSPSIgnerConfig contains the crypto material to set up an idemix signing identity

func (*IdemixMSPSignerConfig) Descriptor deprecated

func (*IdemixMSPSignerConfig) Descriptor() ([]byte, []int)

Deprecated: Use IdemixMSPSignerConfig.ProtoReflect.Descriptor instead.

func (*IdemixMSPSignerConfig) GetCred

func (x *IdemixMSPSignerConfig) GetCred() []byte

func (*IdemixMSPSignerConfig) GetCredentialRevocationInformation

func (x *IdemixMSPSignerConfig) GetCredentialRevocationInformation() []byte

func (*IdemixMSPSignerConfig) GetEnrollmentId

func (x *IdemixMSPSignerConfig) GetEnrollmentId() string

func (*IdemixMSPSignerConfig) GetOrganizationalUnitIdentifier

func (x *IdemixMSPSignerConfig) GetOrganizationalUnitIdentifier() string

func (*IdemixMSPSignerConfig) GetRole

func (x *IdemixMSPSignerConfig) GetRole() int32

func (*IdemixMSPSignerConfig) GetSk

func (x *IdemixMSPSignerConfig) GetSk() []byte

func (*IdemixMSPSignerConfig) ProtoMessage

func (*IdemixMSPSignerConfig) ProtoMessage()

func (*IdemixMSPSignerConfig) ProtoReflect

func (x *IdemixMSPSignerConfig) ProtoReflect() protoreflect.Message

func (*IdemixMSPSignerConfig) Reset

func (x *IdemixMSPSignerConfig) Reset()

func (*IdemixMSPSignerConfig) String

func (x *IdemixMSPSignerConfig) String() string

type KeyInfo

type KeyInfo struct {

	// Identifier of the key inside the default keystore; this for
	// the case of Software BCCSP as well as the HSM BCCSP would be
	// the SKI of the key
	KeyIdentifier string `protobuf:"bytes,1,opt,name=key_identifier,json=keyIdentifier,proto3" json:"key_identifier,omitempty"`
	// KeyMaterial 密钥的 ASN.1 DER PEM 格式数据。
	KeyMaterial []byte `protobuf:"bytes,2,opt,name=key_material,json=keyMaterial,proto3" json:"key_material,omitempty"`
	// contains filtered or unexported fields
}

KeyInfo represents a (secret) key that is either already stored in the bccsp/keystore or key material to be imported to the bccsp key-store. In later versions it may contain also a keystore identifier

func (*KeyInfo) Descriptor deprecated

func (*KeyInfo) Descriptor() ([]byte, []int)

Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead.

func (*KeyInfo) GetKeyIdentifier

func (x *KeyInfo) GetKeyIdentifier() string

func (*KeyInfo) GetKeyMaterial

func (x *KeyInfo) GetKeyMaterial() []byte

func (*KeyInfo) ProtoMessage

func (*KeyInfo) ProtoMessage()

func (*KeyInfo) ProtoReflect

func (x *KeyInfo) ProtoReflect() protoreflect.Message

func (*KeyInfo) Reset

func (x *KeyInfo) Reset()

func (*KeyInfo) String

func (x *KeyInfo) String() string

type MSPConfig

type MSPConfig struct {

	// Config HyperchainMSPConfig 结构体的 protobuf 编码的字节。
	Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

MSPConfig collects all the configuration information for an MSP. The Config field should be unmarshalled in a way that depends on the Type

func (*MSPConfig) Descriptor deprecated

func (*MSPConfig) Descriptor() ([]byte, []int)

Deprecated: Use MSPConfig.ProtoReflect.Descriptor instead.

func (*MSPConfig) GetConfig

func (x *MSPConfig) GetConfig() []byte

func (*MSPConfig) ProtoMessage

func (*MSPConfig) ProtoMessage()

func (*MSPConfig) ProtoReflect

func (x *MSPConfig) ProtoReflect() protoreflect.Message

func (*MSPConfig) Reset

func (x *MSPConfig) Reset()

func (*MSPConfig) String

func (x *MSPConfig) String() string

type MSPIdentityAnonymity

type MSPIdentityAnonymity struct {
	AnonymityType MSPIdentityAnonymity_MSPIdentityAnonymityType `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

MSPIdentityAnonymity can be used to enforce an identity to be anonymous or nominal.

func (*MSPIdentityAnonymity) Descriptor deprecated

func (*MSPIdentityAnonymity) Descriptor() ([]byte, []int)

Deprecated: Use MSPIdentityAnonymity.ProtoReflect.Descriptor instead.

func (*MSPIdentityAnonymity) GetAnonymityType

func (*MSPIdentityAnonymity) ProtoMessage

func (*MSPIdentityAnonymity) ProtoMessage()

func (*MSPIdentityAnonymity) ProtoReflect

func (x *MSPIdentityAnonymity) ProtoReflect() protoreflect.Message

func (*MSPIdentityAnonymity) Reset

func (x *MSPIdentityAnonymity) Reset()

func (*MSPIdentityAnonymity) String

func (x *MSPIdentityAnonymity) String() string

type MSPIdentityAnonymity_MSPIdentityAnonymityType

type MSPIdentityAnonymity_MSPIdentityAnonymityType int32
const (
	MSPIdentityAnonymity_NOMINAL   MSPIdentityAnonymity_MSPIdentityAnonymityType = 0 // Represents a nominal MSP Identity
	MSPIdentityAnonymity_ANONYMOUS MSPIdentityAnonymity_MSPIdentityAnonymityType = 1 // Represents an anonymous MSP Identity
)

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) Descriptor

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) Enum

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor deprecated

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MSPIdentityAnonymity_MSPIdentityAnonymityType.Descriptor instead.

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) Number

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) String

func (MSPIdentityAnonymity_MSPIdentityAnonymityType) Type

type MSPPrincipal

type MSPPrincipal struct {

	// Classification describes the way that one should process
	// Principal. An Classification value of "ByOrganizationUnit" reflects
	// that "Principal" contains the name of an organization this MSP
	// handles. A Classification value "ByIdentity" means that
	// "Principal" contains a specific identity. Default value
	// denotes that Principal contains one of the groups by
	// default supported by all MSPs ("admin" or "member").
	PrincipalClassification MSPPrincipal_Classification `` /* 170-byte string literal not displayed */
	// Principal 可能是以下几种数据经过 proto.Marshal() 方法序列化后得到的字节切片:
	//  1. &MSPRole{}
	//  2. &SerializedIdentity{}
	//  3. &OrganizationUnit{}
	//  4. &MSPIdentityAnonymity{}
	Principal []byte `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
	// contains filtered or unexported fields
}

MSPPrincipal aims to represent an MSP-centric set of identities. In particular, this structure allows for definition of

  • a group of identities that are member of the same MSP
  • a group of identities that are member of the same organization unit in the same MSP
  • a group of identities that are administering a specific MSP
  • a specific identity

Expressing these groups is done given two fields of the fields below

  • Classification, that defines the type of classification of identities in an MSP this principal would be defined on; Classification can take three values: (i) ByMSPRole: that represents a classification of identities within MSP based on one of the two pre-defined MSP rules, "member" and "admin" (ii) ByOrganizationUnit: that represents a classification of identities within MSP based on the organization unit an identity belongs to (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single identity/certificate; this would mean that the Principal bytes message

func (*MSPPrincipal) Descriptor deprecated

func (*MSPPrincipal) Descriptor() ([]byte, []int)

Deprecated: Use MSPPrincipal.ProtoReflect.Descriptor instead.

func (*MSPPrincipal) GetPrincipal

func (x *MSPPrincipal) GetPrincipal() []byte

func (*MSPPrincipal) GetPrincipalClassification

func (x *MSPPrincipal) GetPrincipalClassification() MSPPrincipal_Classification

func (*MSPPrincipal) ProtoMessage

func (*MSPPrincipal) ProtoMessage()

func (*MSPPrincipal) ProtoReflect

func (x *MSPPrincipal) ProtoReflect() protoreflect.Message

func (*MSPPrincipal) Reset

func (x *MSPPrincipal) Reset()

func (*MSPPrincipal) String

func (x *MSPPrincipal) String() string

type MSPPrincipal_Classification

type MSPPrincipal_Classification int32
const (
	MSPPrincipal_ROLE MSPPrincipal_Classification = 0 // Represents the one of the dedicated MSP roles, the
	// one of a member of MSP network, and the one of an
	// administrator of an MSP network
	MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1 // Denotes a finer grained (affiliation-based)
	// groupping of entities, per MSP affiliation
	// E.g., this can well be represented by an MSP's
	// Organization unit
	MSPPrincipal_IDENTITY  MSPPrincipal_Classification = 2 // Denotes a principal that consists of a single identity
	MSPPrincipal_ANONYMITY MSPPrincipal_Classification = 3 // Denotes a principal that can be used to enforce an identity to be anonymous or nominal.
	MSPPrincipal_COMBINED  MSPPrincipal_Classification = 4 // Denotes a combined principal
)

func (MSPPrincipal_Classification) Descriptor

func (MSPPrincipal_Classification) Enum

func (MSPPrincipal_Classification) EnumDescriptor deprecated

func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int)

Deprecated: Use MSPPrincipal_Classification.Descriptor instead.

func (MSPPrincipal_Classification) Number

func (MSPPrincipal_Classification) String

func (MSPPrincipal_Classification) Type

type MSPRole

type MSPRole struct {

	// MSPIdentifier represents the identifier of the MSP this principal
	// refers to
	MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier,proto3" json:"msp_identifier,omitempty"`
	// MSPRoleType defines which of the available, pre-defined MSP-roles
	// an identiy should posess inside the MSP with identifier MSPidentifier
	Role MSPRole_MSPRoleType `protobuf:"varint,2,opt,name=role,proto3,enum=pbmsp.MSPRole_MSPRoleType" json:"role,omitempty"`
	// contains filtered or unexported fields
}

MSPRole governs the organization of the Principal field of an MSPPrincipal when it aims to define one of the two dedicated roles within an MSP: Admin and Members.

func (*MSPRole) Descriptor deprecated

func (*MSPRole) Descriptor() ([]byte, []int)

Deprecated: Use MSPRole.ProtoReflect.Descriptor instead.

func (*MSPRole) GetMspIdentifier

func (x *MSPRole) GetMspIdentifier() string

func (*MSPRole) GetRole

func (x *MSPRole) GetRole() MSPRole_MSPRoleType

func (*MSPRole) ProtoMessage

func (*MSPRole) ProtoMessage()

func (*MSPRole) ProtoReflect

func (x *MSPRole) ProtoReflect() protoreflect.Message

func (*MSPRole) Reset

func (x *MSPRole) Reset()

func (*MSPRole) String

func (x *MSPRole) String() string

type MSPRole_MSPRoleType

type MSPRole_MSPRoleType int32
const (
	MSPRole_MEMBER  MSPRole_MSPRoleType = 0 // Represents an MSP Member
	MSPRole_ADMIN   MSPRole_MSPRoleType = 1 // Represents an MSP Admin
	MSPRole_CLIENT  MSPRole_MSPRoleType = 2 // Represents an MSP Client
	MSPRole_PEER    MSPRole_MSPRoleType = 3 // Represents an MSP Peer
	MSPRole_ORDERER MSPRole_MSPRoleType = 4 // Represents an MSP Orderer
)

func (MSPRole_MSPRoleType) Descriptor

func (MSPRole_MSPRoleType) Enum

func (MSPRole_MSPRoleType) EnumDescriptor deprecated

func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MSPRole_MSPRoleType.Descriptor instead.

func (MSPRole_MSPRoleType) Number

func (MSPRole_MSPRoleType) String

func (x MSPRole_MSPRoleType) String() string

func (MSPRole_MSPRoleType) Type

type OrganizationUnit

type OrganizationUnit struct {

	// MSPIdentifier represents the identifier of the MSP this organization unit
	// refers to
	MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier,proto3" json:"msp_identifier,omitempty"`
	// OrganizationUnitIdentifier defines the organizational unit under the
	// MSP identified with MSPIdentifier
	OrganizationalUnitIdentifier string `` /* 147-byte string literal not displayed */
	// CertifiersIdentifier is the hash of certificates chain of trust
	// related to this organizational unit
	CertifiersIdentifier []byte `protobuf:"bytes,3,opt,name=certifiers_identifier,json=certifiersIdentifier,proto3" json:"certifiers_identifier,omitempty"`
	// contains filtered or unexported fields
}

OrganizationUnit governs the organization of the Principal field of a policy principal when a specific organization unity members are to be defined within a policy principal.

func (*OrganizationUnit) Descriptor deprecated

func (*OrganizationUnit) Descriptor() ([]byte, []int)

Deprecated: Use OrganizationUnit.ProtoReflect.Descriptor instead.

func (*OrganizationUnit) GetCertifiersIdentifier

func (x *OrganizationUnit) GetCertifiersIdentifier() []byte

func (*OrganizationUnit) GetMspIdentifier

func (x *OrganizationUnit) GetMspIdentifier() string

func (*OrganizationUnit) GetOrganizationalUnitIdentifier

func (x *OrganizationUnit) GetOrganizationalUnitIdentifier() string

func (*OrganizationUnit) ProtoMessage

func (*OrganizationUnit) ProtoMessage()

func (*OrganizationUnit) ProtoReflect

func (x *OrganizationUnit) ProtoReflect() protoreflect.Message

func (*OrganizationUnit) Reset

func (x *OrganizationUnit) Reset()

func (*OrganizationUnit) String

func (x *OrganizationUnit) String() string

type SerializedIdentity

type SerializedIdentity struct {

	// Mspid MSP 的名字(标识符)。
	Mspid string `protobuf:"bytes,1,opt,name=mspid,proto3" json:"mspid,omitempty"`
	// IdBytes x509 证书的 ASN.1 DER PEM 格式的数据。
	IdBytes []byte `protobuf:"bytes,2,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"`
	// contains filtered or unexported fields
}

SerializedIdentity 包含节点的身份证书信息(IdBytes),还包含 MSP 的标识符。

func (*SerializedIdentity) Descriptor deprecated

func (*SerializedIdentity) Descriptor() ([]byte, []int)

Deprecated: Use SerializedIdentity.ProtoReflect.Descriptor instead.

func (*SerializedIdentity) GetIdBytes

func (x *SerializedIdentity) GetIdBytes() []byte

func (*SerializedIdentity) GetMspid

func (x *SerializedIdentity) GetMspid() string

func (*SerializedIdentity) ProtoMessage

func (*SerializedIdentity) ProtoMessage()

func (*SerializedIdentity) ProtoReflect

func (x *SerializedIdentity) ProtoReflect() protoreflect.Message

func (*SerializedIdentity) Reset

func (x *SerializedIdentity) Reset()

func (*SerializedIdentity) String

func (x *SerializedIdentity) String() string

type SigningIdentityInfo

type SigningIdentityInfo struct {

	// PublicSigner x509 证书的 ASN.1 DER PEM 格式编码的数据。
	PublicSigner []byte `protobuf:"bytes,1,opt,name=public_signer,json=publicSigner,proto3" json:"public_signer,omitempty"`
	// PrivateSigner 与 PublicSigner 相对应的私钥信息,当根据 PublicSigner 的公钥的 SKI 在 keystore
	// 中找不到私钥时,就可以利用 PrivateSigner 携带的私钥信息导入私钥到 keystore 中。
	PrivateSigner *KeyInfo `protobuf:"bytes,2,opt,name=private_signer,json=privateSigner,proto3" json:"private_signer,omitempty"`
	// contains filtered or unexported fields
}

SigningIdentityInfo represents the configuration information related to the signing identity the peer is to use for generating endorsements

func (*SigningIdentityInfo) Descriptor deprecated

func (*SigningIdentityInfo) Descriptor() ([]byte, []int)

Deprecated: Use SigningIdentityInfo.ProtoReflect.Descriptor instead.

func (*SigningIdentityInfo) GetPrivateSigner

func (x *SigningIdentityInfo) GetPrivateSigner() *KeyInfo

func (*SigningIdentityInfo) GetPublicSigner

func (x *SigningIdentityInfo) GetPublicSigner() []byte

func (*SigningIdentityInfo) ProtoMessage

func (*SigningIdentityInfo) ProtoMessage()

func (*SigningIdentityInfo) ProtoReflect

func (x *SigningIdentityInfo) ProtoReflect() protoreflect.Message

func (*SigningIdentityInfo) Reset

func (x *SigningIdentityInfo) Reset()

func (*SigningIdentityInfo) String

func (x *SigningIdentityInfo) String() string

Jump to

Keyboard shortcuts

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