Ran in to an issue configuring HTTPS on Graylog 3.2 when it comes to the PKCS8 key. When starting the server, receive an error message in log for JerseyService:
“Caused by: java.io.IOException: ObjectIdentifier() – data isn’t an object ID (tag = 48)”
I’ve come across numerous other posts from earlier this year for the same issue in 3.2. The solution the majority of the time was to re-run the openssl conversion and create a plain unencrypted PKCS8 key.
From a security standpoint - is this safe? Wouldn’t it be preferred to use an encrypted key instead? Does anyone know of a better workaround or fix to this issue?
First and final bump, to see if anyone has any thoughts or suggestions about this. This seems important and it’s concerning that this has been avoided for many months.
I understand, from seeing many of your previous comments on other posts, that this is not preferred, and that it’s safer to use an issued certificate from a CA. I would argue that some people in certain environments do not have access to a CA and that a self-signed cert is their only option. I have not seen posts from previous versions of Graylog with this issue, at least not at the frequency that the current version has experienced.
I have wasted a lot of time with this problem, and when I had finally discover how to proceed and go to open a post about this to comment my way to proceed I found this thread.
The problem when used encrypted pkcs8 certs:
Caused by: java.io.IOException: ObjectIdentifier () - data isn’t an object ID (tag = 48)
Just use the plain text file generated with:
openssl pkcs8 -in pkcs5-plain.pem -topk8 -nocrypt -out pkcs8-plain.pem
Remember to change http_tls_key_file and comment http_tls_key_password:
http_tls_key_file = / your-cert-path / pkcs8-plain.pem
Comment: # http_tls_key_password =
You can make your key encrypted with:
openssl pkcs8 -v1 PBE-SHA1-3DES -topk8 -in pkcs5-plain.pem -out file-encrypted.pem -passout pass: yourpasswordhere
You should also check that the certificate files have read permissions and belong to graylog user:
chown graylog: graylog cert-files.