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

changing JWT secret key to random string #45

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

Conversation

islamazhar
Copy link

@islamazhar islamazhar commented May 19, 2020

Setting the JWT signing key to small-sized easily guessable weak string like ""mrin"" can make it vulnerable to offline brute-force attack using cracking tools like JohnTheRipper, hashcat,
c-jwt-cracker [1]

Therefore, the JWT signing key must be [2]

  • at least 128 bits (16 characters long)
  • cryptographically produced random string having high entropy

I have set the JWT signing key to a cryptographically secure random string so that if anyone uses your code for developing an application, then attackers won't be able to guess the secret key of that application.

References:
[1] Weak Token Secret, OWASP JWT cheat-sheet
[2] Ensure Cryptographic Keys Have Sufficient Entropy RFC-8725 JSON Web Token Best Current Practices

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.

1 participant