Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Couchdb JWT Authentation #3929

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aviralagrawalDLT
Copy link

@aviralagrawalDLT aviralagrawalDLT commented Jan 16, 2023

Added support for couchdb JWT Authentatication via RS256 algorithm.

Signed-off-by: Aviral Agrawal aviral.agrawal@dltlabs.io

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

#3317

Added support for couchdb JWT Authentatication from peer via RSA256 algorithm

Signed-off-by: Aviral Agrawal <aviral.agrawal@dltlabs.io>
@aviralagrawalDLT aviralagrawalDLT marked this pull request as ready for review January 16, 2023 09:34
@aviralagrawalDLT aviralagrawalDLT requested a review from a team as a code owner January 16, 2023 09:34
@ale-linux
Copy link
Contributor

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?

@aviralagrawalDLT
Copy link
Author

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.

@ale-linux
Copy link
Contributor

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!

Copy link
Contributor

@cendhu cendhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit-tests to ensure that the added feature works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants