Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Store User Credentials and validate via Fabric-CA

Can we use fabric-ca to authenticate the user to web application i.e. while enrolling the user we send ID and password, can we use the same password to authenticate the user to web app.

If yes how can share few examples based on Node Js SDK

And also if we have multiple organization and private channels, how do we enroll certain users who can access both private channels.

like image 543
Hafeez Khan Avatar asked Jan 02 '18 22:01

Hafeez Khan


1 Answers

The straight forward answer is no. The CA server is not meant for authentication. However it does check the password for the first enrollment, so if you never stored the crypto and set enrollment attempts to unlimited it would validate against the static (unchangeable) password set during registration. Probably not the best idea but might be fine for some use case.

I did an implementation storing users and passwords in the blockchain, checked on every web app login, with update rights only for the user. If you want passwords changeable, you have to store them somewhere the user can get to them. LDAP (recommended), database, file system, blockchain, somewhere.

Users belong to an Org. So if a peer and the user are in an Org that has access to multiple channels, all is well.

like image 90
jworthington Avatar answered Sep 19 '22 00:09

jworthington