Setups mit Java-basierten Diensten sehen häufig ähnlich aus:
Die SSL-Zertifikate unter Java werden in einem besonderen Keystore verschlüsselt gespeichert. Darin liegen sowohl die Private Keys als auch die Zertifikate.
Siehe https://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html
keytool -genkey -keyalg RSA -alias tomcat -storepass <neues Passwort> -validity 730 -keysize 2048
keytool -selfcert -alias tomcat -validity 1825
keytool -list -v
Keytool Doku: http://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html
Jetty speichert mittlerweile die Keystore Passwörter obfuscated in der config, siehe http://wiki.eclipse.org/Jetty/Howto/Secure_Passwords.
Python-Skript zum De-obfuscaten:
# Jetty Deobfuscation Tool
import sys
def d_jetty(ct):
pt = ""
b = bytearray(len(ct)/4)
i=0
for x in b:
t = ct[i:i+4]
i0 = int(t,36)
i1 = i0 / 256
i2 = i0 % 256
x = (i1+i2-254)/2
pt+=chr(x)
i+=4
return pt
if (len(sys.argv) == 2):
raw_ct = sys.argv[1]
else:
print "Jetty Deobfuscation Tool v1.0"
print "./jdt <string>"
exit(0)
print d_jetty(raw_ct)
Quelle: http://stackoverflow.com/questions/8883951/passwords-in-ssl-with-jetty-tutorial