msp

package
v0.0.1 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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdemixConfigDirMsp                  = "msp"
	IdemixConfigDirUser                 = "user"
	IdemixConfigFileIssuerPublicKey     = "IssuerPublicKey"
	IdemixConfigFileRevocationPublicKey = "RevocationPublicKey"
	IdemixConfigFileSigner              = "SignerConfig"
)

Variables

This section is empty.

Functions

func GetIdemixMspConfig

func GetIdemixMspConfig(dir string, ID string) (*msp.MSPConfig, error)

GetIdemixMspConfig returns the configuration for the Idemix MSP

func GetVerifyingMspConfig

func GetVerifyingMspConfig(dir, ID, mspType string) (*msp.MSPConfig, error)

GetVerifyingMspConfig returns an MSP config given directory, ID and type

func ProviderTypeToString

func ProviderTypeToString(id ProviderType) string

ProviderTypeToString returns a string that represents the ProviderType integer

Types

type Configuration

type Configuration struct {
	// OrganizationalUnitIdentifiers is a list of OUs. If this is set, the MSP
	// will consider an identity valid only it contains at least one of these OUs
	OrganizationalUnitIdentifiers []*OrganizationalUnitIdentifiersConfiguration `yaml:"OrganizationalUnitIdentifiers,omitempty"`
	// NodeOUs enables the MSP to tell apart clients, peers and orderers based
	// on the identity's OU.
	NodeOUs *NodeOUs `yaml:"NodeOUs,omitempty"`
}

Configuration represents the accessory configuration an MSP can be equipped with. By default, this configuration is stored in a yaml file

type NodeOUs

type NodeOUs struct {
	// Enable activates the OU enforcement
	Enable bool `yaml:"Enable,omitempty"`
	// ClientOUIdentifier specifies how to recognize clients by OU
	ClientOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"ClientOUIdentifier,omitempty"`
	// PeerOUIdentifier specifies how to recognize peers by OU
	PeerOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"PeerOUIdentifier,omitempty"`
	// AdminOUIdentifier specifies how to recognize admins by OU
	AdminOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"AdminOUIdentifier,omitempty"`
	// OrdererOUIdentifier specifies how to recognize admins by OU
	OrdererOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"OrdererOUIdentifier,omitempty"`
}

NodeOUs contains information on how to tell apart clients, peers and orderers based on OUs. If the check is enforced, by setting Enabled to true, the MSP will consider an identity valid if it is an identity of a client, a peer or an orderer. An identity should have only one of these special OUs.

type OrganizationalUnitIdentifiersConfiguration

type OrganizationalUnitIdentifiersConfiguration struct {
	// Certificate is the path to a root or intermediate certificate
	Certificate string `yaml:"Certificate,omitempty"`
	// OrganizationalUnitIdentifier is the name of the OU
	OrganizationalUnitIdentifier string `yaml:"OrganizationalUnitIdentifier,omitempty"`
}

OrganizationalUnitIdentifiersConfiguration is used to represent an OU and an associated trusted certificate

type ProviderType

type ProviderType int

ProviderType indicates the type of an identity provider

const (
	FABRIC ProviderType = iota // MSP is of FABRIC type
	IDEMIX                     // MSP is of IDEMIX type
	OTHER                      // MSP is of OTHER TYPE

)

Jump to

Keyboard shortcuts

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