fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Support for Couchdb JWT Authentation

Open aviralagrawalDLT opened this issue 2 years ago • 3 comments

Added support for couchdb JWT Authentatication via RS256 algorithm.

Signed-off-by: Aviral Agrawal [email protected]

Type of change

  • New feature

Description

Added support for token based JWT authentication supported in Couchdb by generating JWT token using RS256 algorithm.

Related issues

https://github.com/hyperledger/fabric/issues/3317

aviralagrawalDLT avatar Jan 16 '23 08:01 aviralagrawalDLT

Thanks @aviralagrawalDLT . This isn't a minor change and so I was wondering whether there was any kind of design document I could read first to get familiar with the objectives, the threat model etc. Also, curious about what you mean by RSA256 - 256 is an unusual bitlength for RSA?

ale-linux avatar Jan 30 '23 14:01 ale-linux

Hello @ale-linux

RSA256 seems to be a typo from my end(Updated the same in description). It is RS256, which is RSA signature algorithm using SHA-256 hashing algorithm.(Reference). As per couchdb, they support RS256, RS384 and RS512(Reference ). RS256 was chosen since it is the most commonly used and while development and testing, we consumed the same. There is no major security concern apart from the fact that longer hashing algorithms are generally more secure and RS512 token generation is faster on 64bit machine while RS256 token generation is faster on 32bit machine but not considerably(Reference). Any suggestions otherwise on what to use would be helpful and appreciated.

I do not have any design document handy with me right now. Give me some time to whip something up on why this change0 is being suggested.

aviralagrawalDLT avatar Jan 31 '23 11:01 aviralagrawalDLT

I do not have any design document handy with me right now. Give me some time to whip something up on why this change0 is being suggested.

Thanks!

ale-linux avatar Feb 02 '23 10:02 ale-linux