IBM-Blockchain-Archive / car-lease-demo

A demonstration using IBM Blockchain to show how the lifecycle of vehicles can be recorded on a blockchain
Other
169 stars 304 forks source link

Modify chaincode and node app to use attributes for mapping roles #42

Closed mastersingh24 closed 7 years ago

mastersingh24 commented 7 years ago

I believe that the chaincode currently extracts the affiliation from the CN of the transaction certificate in order to map transactors to roles. I v0.6, CN will no longer work as this was an error in leaking identity.

A couple of changes will be needed:

1) When registering users, add an attribute (could be called role) with the correct value for each user

2) Modify the chaincode to extract the attribute(s) from the transaction certificates rather than parsing the CN