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

XWiki 5406 #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

XWiki 5406 #90

wants to merge 3 commits into from

Conversation

tdelafosse
Copy link
Contributor

Changed the implementation of cookies for more security :

  • Use AES/CBC and SHA-512 instead of DES/ECB and MD5.
  • Automatically generate a random encryption key and store it in a keyStore (cf. XWIKI-542).
    This should solve most of the issues listed in XWiki-5406 and also fix XWiki-542

/**
* Password protecting the keystore.
*/
private static final String KEYSTORE_PASSWORD = "asinvESdl9csw";
Copy link
Member

Choose a reason for hiding this comment

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

What?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understand, these passwords are not really needed as the keystore is not going to be accessible anyway, being stored in a wiki permanent directory, so I just put random strings. Moreover I don't really see how we could generate and store them safely as we need them for that very purpose.
Should I let them blank or something, or is there something I'm not getting right ?

Copy link
Member

Choose a reason for hiding this comment

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

The keystore location and password should be configured in xwiki.properties. Even if we have some defaults in there, it's better than having hard coded values in the code.

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