All Apps and Add-ons

Hunk X509 authentication for Splunk virtual index

shivamgoyal23
New Member

Splunk 7.0.2 Mongo 3.6
Trying to create a virtual index that uses X509 cert instead of the CR username and pw. Have found a couple sources that recommend using:

vix.mongodb.auth.mechanism = X509
vix.mongodb.auth.username = [username]

Only issue here is there is no path to the keycert.pem and ca.cert.pem. The splunk answers have this "what about the path" question in the comments but no answers. Any ideas?

EDIT:
Hoping this makes the question a bit more clear. What I'm trying to do is ingest data from a remote mongo database. I have data on 192.168.1.1 in mongo and need to pull it into splunk on 192.168.1.2. In the splunk GUI, Settings > Virtual Indexes, I set up my provider (connection to remote server with mongo db) then set up the virtual index with the credentials to access that data base and the collection I want to ingest.
It's working with un/pw credentials but I need to set up a X509 cert auth.

0 Karma

rdagan_splunk
Splunk Employee
Splunk Employee

Have you tried to first add the certificate using a mongo shell to mongodb, and only then try to connect using the Splunk App?
See the steps at the bottom of this page:
https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/

0 Karma

shivamgoyal23
New Member

@rdagan Thanks for your reply. Yes, I have already added those to mongodb and also I am able to access the mongodb using terminal. The part I am not able to figure out is where I should be providing the path to certificates on Splunk for Virtual Indexes while creating them. Thanks

0 Karma

shivamgoyal23
New Member

@rdagan it will be great if you can provide some insight on the above asked question.

0 Karma

rdagan_splunk
Splunk Employee
Splunk Employee

In that case, you may want to try one of these options:
1) Modify the Java code of the App itself to include the option to add a path to the certificate
2) Experiment with Splunk DB Connect and see if the MongoDB JDBC driver includes the option to authenticate using X509
3) Remove the requirement for X509 and replace it with one of the other authentication options

0 Karma

shivamgoyal23
New Member

@rdagan thanks a lot for your input. I will look into the options you provided and will update here if anything works out well.

0 Karma

p_gurav
Champion

Can you try :

vix.mongodb.auth.mechanism = X509 
vix.mongodb.auth.username = [username]
0 Karma

p_gurav
Champion

Refer this video for virtual index:
https://www.youtube.com/watch?v=O6ZRP3VBn7I

0 Karma

shivamgoyal23
New Member

Thanks @p_gurav for your reply. I am actually looking for the configuration settings i.e. where i can provide the path to X509 certificates. It will be helpful if you can provide me with those.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...