Getting Data In

Can you query the REST API with a non-local account?

a212830
Champion

Hi,

I have a customer who is trying to query the Splunk REST API using an established AD service account, which has the same privileges as individual accounts. When he tries to query Splunk, however, he gets "Unauthorized". Is it possible to query the REST API with non-local accounts?

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Yea its possible. In fact, all the web activity basically runs REST calls under the hood. It's likely the user is trying to use their unix credentials instead of their splunk credentials. Or maybe the system they are calling to doesn't have the ldap configured? Make sure the ldap strategy lives on everything (except the forwarders if you want) so the same credentials are valid when the search is delegated from search head to indexers.

0 Karma

a212830
Champion

The indexers need the ldap setup? Why? Doesn't the request go through the SH? And if that's the case, wouldn't the same requirement be there for all my users?

0 Karma

sloshburch
Splunk Employee
Splunk Employee

I always set up my ldap config in an app that I distribute to EVERYTHING because I don't want anyone logging on with local credentials and making a mess of things. I want only credible audit-able accounts logging into the system.
I vaguely recall experiences before I did this where users defined locally only on the SH were failing because the indexer knew nothing of that user. My memory sucks so I may have conflated experiences 😞

0 Karma

a212830
Champion

I don't want the ldap config on all my idx. Could end up with people logging in and just getting confused - I only want the admin accounts and support people on those servers.

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Oh, if you don't already have it, make sure splunkweb is OFF on the indexers. If you need to make config changes, those should go through the master node. Not only will that open up some resources back to indexer activities (because splunkweb is off) but it blocks users from accidentally navigating to the web UI and getting mixed up.

Either way, you shouldn't have issues with the non local account thang. If that is persisting, we might collaborate offline to see what's up.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...