Getting Data In

Splunk REST API endpoint to confirm password?

simpkins1958
Contributor

Building a .NET app that will access Splunk via REST API. App will prompt for password to use for admin access. Is there an endpoint which returns true/false with regards to auth validation? Don't want to proceed until valid password has been entered.

Tags (2)
0 Karma

jkat54
SplunkTrust
SplunkTrust

See if this helps:

http://docs.splunk.com/Documentation/Splunk/latest/RESTUM/RESTusing#Authentication_and_authorization

Basic HTTP authentication

Splunkd also supports basic authentication as defined by RFC 1945. This is the mechanism used when you access resources using a Web browser.

So use a .net library that supports web requests with basic auth, encode the user/pass according to basic auth RFC 1945, and try to hit https://localhost:8089/services/. If you get a status code that is less than or equal to 399, then you can assume auth was successful and proceed.

You might prefer to use the SDK though: http://dev.splunk.com/csharp

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...