ABAC

In the following steps, we will show you how to register a user and create an ecert with attributes. We will then retrieve the user identity and the attributes in the chaincode to validate access control. We will then integrate this functionality into our tutorial chaincode.

First, we must register a new user with the Fabric CA. As part of the registration process, we have to define the attributes that will be used once the ecert is generated. A user is registered by running the command, fabric-ca-client register. The access control attributes are added by using the suffix :ecert.