This is a Golang Package to provide necessary methods for supporting fully functional Attribute-Based Access Control in Hyperledger Fabric. Fabric chaincodes can use these methods directly by importing this package.
- ResourceID - string
- OwnerID - string
- OwnerKey - string
- Data - string
- ResourceID - string
- OwnerID - string
- OwnerKey - string
- Attribures - map[string]string
- UserID - string
- UserName - string
- Attributes - map[string]string
- PolicyID - string
- UserAttr - map[string]string
- ResourceAttr - map[string]string
- EnvAttr - map[string]string
- Operation - string
- Rules - map[string]string
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
- Resource Data - string
- Private Collection - string
Output:
- Transaction ID - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
- Private Collection - string
Output:
- Resource - Type: Resource Struct
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
- Attributes - string : Key-value pairs in 'key:value' format, seperated by ','
Output:
- Transaction ID - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
Output:
- Resource Attributes - Type: ResourceAttr Struct
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
- Attributes - string : Key-value pairs in 'key:value' format, seperated by ','
- Private Collection - string
Output:
- Transaction ID - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Resource ID - string
- Private Collection - string
Output:
- Resource Attributes - Type: ResourceAttr Struct
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- User ID - string
- User Name - string
- Attributes - string : Key-value pairs in 'key:value' format, seperated by ','
Output:
- Transaction ID - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- User ID - string
Output:
- User Attributes - Type: UserAttr Struct
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Attribute Name - string
Output:
- Attribute Value - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Policy ID - string
- User Attributes - string : Required User Attribute names separated by ','
- Resource Attributes - string : Required Resource Attribute names separated by ','
- Environment Attributes - string : Required Environment Attribute names separated by ','
- Operation - string
- Rules - string : Key-value pairs in 'key:value' format, seperated by ','
Output:
- Transaction ID - string
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Policy ID - string
Output:
- Policy - Type: Policy Struct
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
Output:
- All Policies - []Policy
- Error if any - error
Input:
- Context - contractapi.TransactionContextInterface
- Hash(User ID, User Priv Key) - string
- Resource ID - string
- Operation - string
- Private Collection - string
Output:
- Resource - Type: Resource Struct
- Error if any - error
The current version of the package supports only minimal use case required for latency testing purpose of proposed approach. We are currently in development more robust version to support generalized use cases and error support for boundary situation.