httpsjbosswildflyjceks

What's the point of the Wildfly vault (JCEKS) when securing the https keystore?


I feel like I'm completely missing the point of the new JCEKS keystore format in Wildfly. Maybe you can set me straight.

The way that we have Wildfly configured (and much of the internet instructs us to, for example):

What the heck did all of that accomplish???

If we just used a JKS file and a password embedded in standalone.xml, the system is susceptible to:

If we use a JCEKS container in the way described, the system is susceptible to:

This would sort of make sense if we put the actual certs inside of the JCEKS file, in which case brute-force and lookup table attacks would be harder in the second case of attack, but so far I haven't found a way to use a JCEKS-formatted keystore directly with an https connector.

Really, the only reason I care too much about this is that we apparently have a security requirement to use the "vault", but it seems pointless.

UPDATE: It is worth noting that by using the vault you're using a "masked" password to the vault in your jboss config file, but I can't figure out what this means. Apparently your masked-password + salt + rounds can unlock the JCEKS keystore (source), so I'm not sure what exactly masking accomplishes. It just seems like a third level of redirection. I've got to be missing something...


Solution

  • JBoss states that the security mechanism behind "vault" is security by obscurity (https://developer.jboss.org/wiki/JBossAS7SecuringPasswords)

    How secure is this?

    • The default implementation of the vault utlizes a Java KeyStore. Its configuration uses Password Based Encryption, which is security by obscurity. This is not 100% security. It only gets away from the problem of clear text passwords in configuration files. There is always a weak link. (As mentallurg suggests in the comments, the keystore password is the weakest link).
    • Ideally, 3rd party ISV robust implementations of Vaults should provide the necessary security.

    Vault uses an unknown password and algorithm perform a symmetric encryption of the keystore password. Without a HSM, you will always face the problem of "where store the, e.g., datasource password". So normally you'd define a property file with an Access-Control-List and store the encoded password there.

    The vault just increases the effort of getting the secured password, leaving the attacker to either read the pw in-memory or reverse-engineer the vault encryption algorithm + key.