Documentation
¶
Index ¶
- Constants
- func InitCertSigningParticipant(chainConfig *config.ChainConfig, ...) (protocol.SigningParticipant, error)
- func InitPKSigningParticipant(hashType, localOrgId, localPrivKeyFile, localPrivKeyPwd string) (protocol.SigningParticipant, error)
- func NewCertSigningParticipant(hashType string, participant *pbac.Participant, privateKeyPem, password string) (protocol.SigningParticipant, error)
- func RegisterACProvider(authType string, acp ACProvider)
- type ACProvider
- type AcFactory
Constants ¶
const ( LIMIT_DELIMITER = "/" PARAM_CERTS = "certs" PARAM_CERTHASHES = "cert_hashes" PARAM_ALIASES = "aliases" PARAM_ALIAS = "alias" PUBLIC_KEYS = "pubkey" )
Special characters allowed to define customized access rules
const ( //AdminPublicKey admin trust orgId AdminPublicKey = "public" //DposOrgId chainconfig the DPoS of orgId DposOrgId = "dpos_org_id" //PermissionConsensusOrgId chainconfig orgId for permission consensus, such as tbft PermissionConsensusOrgId = "public" )
const CONSENSUS = "consensus"
const ModuleNameAccessControl = "Access Control"
ModuleNameAccessControl "Access Control"
Variables ¶
This section is empty.
Functions ¶
func InitCertSigningParticipant ¶
func InitCertSigningParticipant(chainConfig *config.ChainConfig, localOrgId, localPrivKeyFile, localPrivKeyPwd, localCertFile string) ( protocol.SigningParticipant, error)
InitCertSigningParticipant 初始化一个证书签名的用户 @param chainConfig @param localOrgId @param localPrivKeyFile @param localPrivKeyPwd @param localCertFile @return protocol.SigningParticipant @return error
func InitPKSigningParticipant ¶
func InitPKSigningParticipant(hashType, localOrgId, localPrivKeyFile, localPrivKeyPwd string) (protocol.SigningParticipant, error)
InitPKSigningParticipant 初始化一个公钥模式的用户 @param hashType @param localOrgId @param localPrivKeyFile @param localPrivKeyPwd @return protocol.SigningParticipant @return error
func NewCertSigningParticipant ¶
func NewCertSigningParticipant(hashType string, participant *pbac.Participant, privateKeyPem, password string) (protocol.SigningParticipant, error)
NewCertSigningParticipant 基于传入的参数新建一个SigningParticipant @param hashType @param participant @param privateKeyPem @param password @return protocol.SigningParticipant @return error
func RegisterACProvider ¶
func RegisterACProvider(authType string, acp ACProvider)
RegisterACProvider registers a ACProvider to global ac registry
Types ¶
type ACProvider ¶
type ACProvider interface { NewACProvider(chainConf protocol.ChainConf, localOrgId string, store protocol.BlockchainStore, log protocol.Logger, msgBus msgbus.MessageBus) (protocol.AccessControlProvider, error) }
ACProvider is an interface of ac initialize for different ac implementation
func NewACProviderByParticipantType ¶
func NewACProviderByParticipantType(authType string) ACProvider
NewACProviderByParticipantType returns a ACProvider by authType
type AcFactory ¶
type AcFactory struct { }
AcFactory 构造AC模块的工厂
func (*AcFactory) NewACProvider ¶
func (af *AcFactory) NewACProvider(chainConf protocol.ChainConf, localOrgId string, store protocol.BlockchainStore, log protocol.Logger, msgBus msgbus.MessageBus) ( protocol.AccessControlProvider, error)
NewACProvider return a AccessControlProvider accord to specific AuthType and ConsensusType
Source Files
¶
- acl_factory.go
- acl_provider_registrar.go
- acl_server.go
- cert_acl.go
- cert_acl_subscriber.go
- cert_acl_subscriber_utils.go
- cert_participant.go
- org.go
- permissioned_pk_acl.go
- permissioned_pk_acl_subscriber.go
- pk_participant.go
- policy.go
- principal.go
- public_pk_acl.go
- public_pk_acl_subscriber.go
- utils.go
- v220_compat.go
- v220_policies.go