From bbd77ef52a0d849b6531772ca2e1de8d6cc0cfbd Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sat, 14 Sep 2019 10:52:54 +0000 Subject: [PATCH] Improved: Document how to store the JWT secret key (OFBIZ-10751) Adds a link to OWASP documentation git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866936 13f79535-47bb-0310-9956-ffa450edef68 --- .../security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc b/framework/security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc index c68cff493a..e1ebcf2a31 100644 --- a/framework/security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc +++ b/framework/security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc @@ -68,6 +68,7 @@ You might prefer to use pair of public/private keys, for now by default OFBiz us . You may want to tie the encryption key to the logged in user. This is used by the password recreation feature. The JWT secret key is salted with a combination of the current logged in user and her/his password. This is a simple and effective safe way. . Use a https://tools.ietf.org/html/rfc7519#section-4.1.7[JTI] (JWT ID). A JTI prevents a JWT from being replayed. This https://auth0.com/blog/blacklist-json-web-token-api-keys/http://url[auth0 blog article get deeper in that]. The same is kinda achieved with the password recreation feature. When the user log in after the new password creation, the password has already been changed. So the link (in the sent email) containing the JWT for the creation of the new password can't be reused. . Tie the encryption key to the hardware. You can refer to this https://en.wikipedia.org/wiki/Hardware_security_module[Wikipedia page] for more information. +. If you want to get deeper in this get to this https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Key_Management_Cheat_Sheet.md#user-content-storage[OWASP documentation] Note: if you want to use a pair of public/private keys you might want to consider leveraging the Java Key Store that is also used by the "catalina" component to store certificates. Then don't miss to read: