The first would be to create a self-signed certificate, add that to the previously copied java keystore and use this keystore with your Graylog java options
In my experience so far, there is no previously copied java keystore so I donāt know where this is coming from and what it means. Graylog has java options?
Basically JAVA has a default keystore called "cacertsā.
Find your version of java.
root@ansible:/usr/local/bin# sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 auto mode
* 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 manual mode
3 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number:
There are 3 choices for the alternative java (providing /usr/bin/java).
Now I have copied the keystore to /etc/graylog/keystore.jks and imported the X509 cert that I have issued with my CA.
So I print the keystore contents and there it is, I see it.
But I donāt like really know why I would tell it to do that since the key is in the keystore?
Restarted the gralog-server service.
/var/log/graylog-server/server.log
2023-02-02T17:29:04.416-05:00 ERROR [CmdLineTool] Invalid configuration
com.github.joschi.jadconfig.ValidationException: Unreadable or missing HTTP private key: null
at org.graylog2.configuration.HttpConfiguration.validateTlsConfig(HttpConfiguration.java:255) ~[graylog.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at com.github.joschi.jadconfig.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:53) ~[graylog.jar:?]
at com.github.joschi.jadconfig.JadConfig.invokeValidatorMethods(JadConfig.java:233) ~[graylog.jar:?]
at com.github.joschi.jadconfig.JadConfig.process(JadConfig.java:102) ~[graylog.jar:?]
at org.graylog2.bootstrap.CmdLineTool.processConfiguration(CmdLineTool.java:477) [graylog.jar:?]
at org.graylog2.bootstrap.CmdLineTool.doRun(CmdLineTool.java:282) [graylog.jar:?]
at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:260) [graylog.jar:?]
at org.graylog2.bootstrap.Main.main(Main.java:45) [graylog.jar:?]
But my private key is a .key and its not X509ā¦ its an rsa key so I cant import that so how can I roll along further at this point?