msp

package
v0.0.0-...-d35ede9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package msp is a generated protocol buffer package.

It is generated from these files:

msp/identities.proto
msp/msp_config.proto
msp/msp_principal.proto

It has these top-level messages:

SerializedIdentity
MSPConfig
FabricMSPConfig
FabricCryptoConfig
SigningIdentityInfo
KeyInfo
FabricOUIdentifier
MSPPrincipal
OrganizationUnit
MSPRole

Index

Constants

This section is empty.

Variables

View Source
var MSPPrincipal_Classification_name = map[int32]string{
	0: "ROLE",
	1: "ORGANIZATION_UNIT",
	2: "IDENTITY",
}
View Source
var MSPPrincipal_Classification_value = map[string]int32{
	"ROLE":              0,
	"ORGANIZATION_UNIT": 1,
	"IDENTITY":          2,
}
View Source
var MSPRole_MSPRoleType_name = map[int32]string{
	0: "MEMBER",
	1: "ADMIN",
}
View Source
var MSPRole_MSPRoleType_value = map[string]int32{
	"MEMBER": 0,
	"ADMIN":  1,
}

Functions

This section is empty.

Types

type FabricCryptoConfig

type FabricCryptoConfig struct {
	// SignatureHashFamily is a string representing the hash family to be used
	// during sign and verify operations.
	// Allowed values are "SHA2" and "SHA3".
	SignatureHashFamily string `protobuf:"bytes,1,opt,name=signature_hash_family,json=signatureHashFamily" json:"signature_hash_family,omitempty"`
	// IdentityIdentifierHashFunction is a string representing the hash function
	// to be used during the computation of the identity identifier of an MSP identity.
	// Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
	IdentityIdentifierHashFunction string `` /* 148-byte string literal not displayed */
}

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

func (*FabricCryptoConfig) Descriptor

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

func (*FabricCryptoConfig) GetIdentityIdentifierHashFunction

func (m *FabricCryptoConfig) GetIdentityIdentifierHashFunction() string

func (*FabricCryptoConfig) GetSignatureHashFamily

func (m *FabricCryptoConfig) GetSignatureHashFamily() string

func (*FabricCryptoConfig) ProtoMessage

func (*FabricCryptoConfig) ProtoMessage()

func (*FabricCryptoConfig) Reset

func (m *FabricCryptoConfig) Reset()

func (*FabricCryptoConfig) String

func (m *FabricCryptoConfig) String() string

type FabricMSPConfig

type FabricMSPConfig 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" json:"name,omitempty"`
	// List of root certificates trusted by this MSP
	// they are used upon certificate validation (see
	// comment for IntermediateCerts below)
	RootCerts [][]byte `protobuf:"bytes,2,rep,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"`
	// List of intermediate certificates trusted by this MSP;
	// they are used upon certificate validation as follows:
	// validation attempts to build a path from the certificate
	// to be validated (which is at one end of the path) and
	// one of the certs in the RootCerts field (which is at
	// the other end of the path). If the path is longer than
	// 2, certificates in the middle are searched within the
	// IntermediateCerts pool
	IntermediateCerts [][]byte `protobuf:"bytes,3,rep,name=intermediate_certs,json=intermediateCerts,proto3" json:"intermediate_certs,omitempty"`
	// Identity denoting the administrator of this MSP
	Admins [][]byte `protobuf:"bytes,4,rep,name=admins,proto3" json:"admins,omitempty"`
	// Identity revocation list
	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" json:"signing_identity,omitempty"`
	// OrganizationalUnitIdentifiers holds one or more
	// fabric organizational unit identifiers that belong to
	// this MSP configuration
	OrganizationalUnitIdentifiers []*FabricOUIdentifier `` /* 143-byte string literal not displayed */
	// FabricCryptoConfig contains the configuration parameters
	// for the cryptographic algorithms used by this MSP
	CryptoConfig *FabricCryptoConfig `protobuf:"bytes,8,opt,name=crypto_config,json=cryptoConfig" json:"crypto_config,omitempty"`
	// List of TLS root certificates trusted by this MSP.
	// They are returned by GetTLSRootCerts.
	TlsRootCerts [][]byte `protobuf:"bytes,9,rep,name=tls_root_certs,json=tlsRootCerts,proto3" json:"tls_root_certs,omitempty"`
	// List of TLS intermediate certificates trusted by this MSP;
	// They are returned by GetTLSIntermediateCerts.
	TlsIntermediateCerts [][]byte `protobuf:"bytes,10,rep,name=tls_intermediate_certs,json=tlsIntermediateCerts,proto3" json:"tls_intermediate_certs,omitempty"`
}

FabricMSPConfig collects all the configuration information for a Fabric 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 (*FabricMSPConfig) Descriptor

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

func (*FabricMSPConfig) GetAdmins

func (m *FabricMSPConfig) GetAdmins() [][]byte

func (*FabricMSPConfig) GetCryptoConfig

func (m *FabricMSPConfig) GetCryptoConfig() *FabricCryptoConfig

func (*FabricMSPConfig) GetIntermediateCerts

func (m *FabricMSPConfig) GetIntermediateCerts() [][]byte

func (*FabricMSPConfig) GetName

func (m *FabricMSPConfig) GetName() string

func (*FabricMSPConfig) GetOrganizationalUnitIdentifiers

func (m *FabricMSPConfig) GetOrganizationalUnitIdentifiers() []*FabricOUIdentifier

func (*FabricMSPConfig) GetRevocationList

func (m *FabricMSPConfig) GetRevocationList() [][]byte

func (*FabricMSPConfig) GetRootCerts

func (m *FabricMSPConfig) GetRootCerts() [][]byte

func (*FabricMSPConfig) GetSigningIdentity

func (m *FabricMSPConfig) GetSigningIdentity() *SigningIdentityInfo

func (*FabricMSPConfig) GetTlsIntermediateCerts

func (m *FabricMSPConfig) GetTlsIntermediateCerts() [][]byte

func (*FabricMSPConfig) GetTlsRootCerts

func (m *FabricMSPConfig) GetTlsRootCerts() [][]byte

func (*FabricMSPConfig) ProtoMessage

func (*FabricMSPConfig) ProtoMessage()

func (*FabricMSPConfig) Reset

func (m *FabricMSPConfig) Reset()

func (*FabricMSPConfig) String

func (m *FabricMSPConfig) String() string

type FabricOUIdentifier

type FabricOUIdentifier 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 boud 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 `` /* 140-byte string literal not displayed */
}

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

func (*FabricOUIdentifier) Descriptor

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

func (*FabricOUIdentifier) GetCertificate

func (m *FabricOUIdentifier) GetCertificate() []byte

func (*FabricOUIdentifier) GetOrganizationalUnitIdentifier

func (m *FabricOUIdentifier) GetOrganizationalUnitIdentifier() string

func (*FabricOUIdentifier) ProtoMessage

func (*FabricOUIdentifier) ProtoMessage()

func (*FabricOUIdentifier) Reset

func (m *FabricOUIdentifier) Reset()

func (*FabricOUIdentifier) String

func (m *FabricOUIdentifier) 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" json:"key_identifier,omitempty"`
	// KeyMaterial (optional) for the key to be imported; this is
	// properly encoded key bytes, prefixed by the type of the key
	KeyMaterial []byte `protobuf:"bytes,2,opt,name=key_material,json=keyMaterial,proto3" json:"key_material,omitempty"`
}

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

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

func (*KeyInfo) GetKeyIdentifier

func (m *KeyInfo) GetKeyIdentifier() string

func (*KeyInfo) GetKeyMaterial

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

func (*KeyInfo) ProtoMessage

func (*KeyInfo) ProtoMessage()

func (*KeyInfo) Reset

func (m *KeyInfo) Reset()

func (*KeyInfo) String

func (m *KeyInfo) String() string

type MSPConfig

type MSPConfig struct {
	// Type holds the type of the MSP; the default one would
	// be of type FABRIC implementing an X.509 based provider
	Type int32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"`
	// Config is MSP dependent configuration info
	Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
}

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

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

func (*MSPConfig) GetConfig

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

func (*MSPConfig) GetType

func (m *MSPConfig) GetType() int32

func (*MSPConfig) ProtoMessage

func (*MSPConfig) ProtoMessage()

func (*MSPConfig) Reset

func (m *MSPConfig) Reset()

func (*MSPConfig) String

func (m *MSPConfig) String() string

func (*MSPConfig) VariablyOpaqueFieldProto

func (mc *MSPConfig) VariablyOpaqueFieldProto(name string) (proto.Message, error)

func (*MSPConfig) VariablyOpaqueFields

func (mc *MSPConfig) VariablyOpaqueFields() []string

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 `` /* 164-byte string literal not displayed */
	// Principal completes the policy principal definition. For the default
	// principal types, Principal can be either "Admin" or "Member".
	// For the ByOrganizationUnit/ByIdentity values of Classification,
	// PolicyPrincipal acquires its value from an organization unit or
	// identity, respectively.
	Principal []byte `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
}

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

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

func (*MSPPrincipal) GetPrincipal

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

func (*MSPPrincipal) GetPrincipalClassification

func (m *MSPPrincipal) GetPrincipalClassification() MSPPrincipal_Classification

func (*MSPPrincipal) ProtoMessage

func (*MSPPrincipal) ProtoMessage()

func (*MSPPrincipal) Reset

func (m *MSPPrincipal) Reset()

func (*MSPPrincipal) String

func (m *MSPPrincipal) String() string

func (*MSPPrincipal) VariablyOpaqueFieldProto

func (mp *MSPPrincipal) VariablyOpaqueFieldProto(name string) (proto.Message, error)

func (*MSPPrincipal) VariablyOpaqueFields

func (mp *MSPPrincipal) VariablyOpaqueFields() []string

type MSPPrincipal_Classification

type MSPPrincipal_Classification int32
const (
	MSPPrincipal_ROLE MSPPrincipal_Classification = 0
	// one of a member of MSP network, and the one of an
	// administrator of an MSP network
	MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1
	// groupping of entities, per MSP affiliation
	// E.g., this can well be represented by an MSP's
	// Organization unit
	MSPPrincipal_IDENTITY MSPPrincipal_Classification = 2
)

func (MSPPrincipal_Classification) EnumDescriptor

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

func (MSPPrincipal_Classification) String

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" 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,enum=common.MSPRole_MSPRoleType" json:"role,omitempty"`
}

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

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

func (*MSPRole) GetMspIdentifier

func (m *MSPRole) GetMspIdentifier() string

func (*MSPRole) GetRole

func (m *MSPRole) GetRole() MSPRole_MSPRoleType

func (*MSPRole) ProtoMessage

func (*MSPRole) ProtoMessage()

func (*MSPRole) Reset

func (m *MSPRole) Reset()

func (*MSPRole) String

func (m *MSPRole) String() string

type MSPRole_MSPRoleType

type MSPRole_MSPRoleType int32
const (
	MSPRole_MEMBER MSPRole_MSPRoleType = 0
	MSPRole_ADMIN  MSPRole_MSPRoleType = 1
)

func (MSPRole_MSPRoleType) EnumDescriptor

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

func (MSPRole_MSPRoleType) String

func (x MSPRole_MSPRoleType) String() string

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" json:"msp_identifier,omitempty"`
	// OrganizationUnitIdentifier defines the organizational unit under the
	// MSP identified with MSPIdentifier
	OrganizationalUnitIdentifier string `` /* 140-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"`
}

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

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

func (*OrganizationUnit) GetCertifiersIdentifier

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

func (*OrganizationUnit) GetMspIdentifier

func (m *OrganizationUnit) GetMspIdentifier() string

func (*OrganizationUnit) GetOrganizationalUnitIdentifier

func (m *OrganizationUnit) GetOrganizationalUnitIdentifier() string

func (*OrganizationUnit) ProtoMessage

func (*OrganizationUnit) ProtoMessage()

func (*OrganizationUnit) Reset

func (m *OrganizationUnit) Reset()

func (*OrganizationUnit) String

func (m *OrganizationUnit) String() string

type SerializedIdentity

type SerializedIdentity struct {
	// The identifier of the associated membership service provider
	Mspid string `protobuf:"bytes,1,opt,name=mspid" json:"mspid,omitempty"`
	// the Identity, serialized according to the rules of its MPS
	IdBytes []byte `protobuf:"bytes,2,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"`
}

This struct represents an Identity (with its MSP identifier) to be used to serialize it and deserialize it

func (*SerializedIdentity) Descriptor

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

func (*SerializedIdentity) GetIdBytes

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

func (*SerializedIdentity) GetMspid

func (m *SerializedIdentity) GetMspid() string

func (*SerializedIdentity) ProtoMessage

func (*SerializedIdentity) ProtoMessage()

func (*SerializedIdentity) Reset

func (m *SerializedIdentity) Reset()

func (*SerializedIdentity) String

func (m *SerializedIdentity) String() string

type SigningIdentityInfo

type SigningIdentityInfo struct {
	// PublicSigner carries the public information of the signing
	// identity. For an X.509 provider this would be represented by
	// an X.509 certificate
	PublicSigner []byte `protobuf:"bytes,1,opt,name=public_signer,json=publicSigner,proto3" json:"public_signer,omitempty"`
	// PrivateSigner denotes a reference to the private key of the
	// peer's signing identity
	PrivateSigner *KeyInfo `protobuf:"bytes,2,opt,name=private_signer,json=privateSigner" json:"private_signer,omitempty"`
}

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

func (*SigningIdentityInfo) Descriptor

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

func (*SigningIdentityInfo) GetPrivateSigner

func (m *SigningIdentityInfo) GetPrivateSigner() *KeyInfo

func (*SigningIdentityInfo) GetPublicSigner

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

func (*SigningIdentityInfo) ProtoMessage

func (*SigningIdentityInfo) ProtoMessage()

func (*SigningIdentityInfo) Reset

func (m *SigningIdentityInfo) Reset()

func (*SigningIdentityInfo) String

func (m *SigningIdentityInfo) String() string

Jump to

Keyboard shortcuts

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