Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Certificates in truststores #185

Open
jkozlowski opened this issue May 12, 2022 · 3 comments
Open

SSL Certificates in truststores #185

jkozlowski opened this issue May 12, 2022 · 3 comments

Comments

@jkozlowski
Copy link
Contributor

I am looking for guidance around SSL certificates for talking to Splunk for an app (data input) implemented using your Java SDK. Currently, the Script gets access to "server_host", "session_key" which are great because they allow the app to know how talk to Splunk and be authorized to do things, EXCEPT there's no truststore that could be used to make sure this communication can be done securely.

It might be that I'm misunderstanding something, so I would appreciate some context around this:

  1. Is server_host ALWAYS guaranteed to be "localhost" or loopback address?
  2. If not, how is my application supposed to figure out which certificate to trust? If I want to deploy to splunk marketplace, I cannot really ship a trust store, because wherever my app is installed is going to have a different certificate to trust.
  3. As I understand it, the current sdk implementation would probably load the truststore using the standard "javax.net.ssl.trustStore" property; who is supposed to set that? Should I tell my users to extract the certificate from their splunk server and add it to my truststore somehow? This feels like an unnecessary extra step. Can I somehow find out the location of the certificate on disk and load it from there?

My gut feeling is that along with "server_host" etc. variables, the app should be given the certificate it should trust, but I'm not sure if that fits your deployment model.

Any help would be appreciated, I couldn't find any guidance in available documentation.

@jkozlowski jkozlowski changed the title SSL Certificates SSL Certificates in truststores May 12, 2022
@ashah-splunk
Copy link
Contributor

Hi @jkozlowski , we are looking at couple of approaches for SSL security through SDK using self signed or Splunk generated SSL certificates. We would like to hear from you as well, if you have any suggestions for the same.

@jkozlowski
Copy link
Contributor Author

Hey @ashah-splunk, thanks for coming back to me.

The way I would solve this is how I already outlined it: your splunk server is responsible for deploying applications and is therefore a trusted piece of infrastructure. It should provide a path to a truststore file with a certificate that should be trusted when talking back to it, same way you provide the session key and host information.

Technically this information is already I’m the splunk config, I was looking through the APIs you provide for reading config, but I think it’s per app? My preference is still for the server to provide all this config to the app, but whatever you come up with here is obviously not going to be backwards compatible, is there a way right now for me to read the splunk config somehow? Other than assuming I’m running on the same host and trying to find it on local disk?

I think this is a pretty important problem to solve for a security product, so would appreciate some guidance and a way forward.

@jkozlowski
Copy link
Contributor Author

Another question: the value of server_uri passed to a modular input from my observation (from deploying a splunk docker container locally) is always something like https://127.0.0.1:<port>; whereas server_host contains the actual hostname, that I presume the certificate presented by splunkd will be signed for. I think that means I should splice the hostname into the uri to make sure that certificate checking works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants