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):
- We put the standard keystore entries in a standard Java Key Store ("keystore.jks") file with a password ("jks_pw")
- We then create a JCEKS keystore ("keystore.jceks") with a password, salt, and round-count ("jceks_s_n").
- We then put "pks_pw" into "keystore.jceks"
- We then add the JCEKS password/etc ("jceks_s_n") into our jboss config (standalone.xml) as plain text, defining a entry
- We then add a reference to the vault-stored JKS password to our jboss https connector (standalone.xml), as "password="${VAULT::jks::jks::1}".
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:
- An attacker getting a copy of standalone.xml and the JKS file, in which case all secrets are known.
- An attacker getting a copy of the JKS file, in which case an attacker can use brute-force or lookup table attacks.
If we use a JCEKS container in the way described, the system is susceptible to:
- (SAME) An attacker getting a copy of standalone.xml, the JKS/JCEKS files, in which case all secrets are known.
- (SAME) An attacker getting a copy of the JKS file, in which case an attacker can use brute-force or lookup table attacks.
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...