Getting Data In

Posting to a receiver using REST API giving "insufficient permission to access this resource" error

bengwall
New Member

We are investigating how to create a Splunk log entry over the REST API via JavaScript. I'm posting the following event via the REST API:

curl -k -u user:password "https://tspl001:8089/services/receivers/simple?source=www&sourcetype=junk&index=angularjs_test" -d "2015-01-23 12:45:03 CST Hello there"

Here is the response:

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <messages>
    <msg type="WARN">insufficient permission to access this resource</msg>
  </messages>
</response>

I was told that my user has write privileges and that I'm using the correct sourcetype and index values. I cannot file any reference to what the "www" source is.

0 Karma
1 Solution

kbarker302
Communicator

Please see the answer posted here:

https://answers.splunk.com/answers/75013/minimum-permissions-required-for-using-http-simple-receiver...

Apparently there is an edit_tcp capability that needs to be defined in authorize.conf for the simple receiver to work:

http://docs.splunk.com/Documentation/Splunk/6.3.2/admin/Authorizeconf

Fyi, the [capability::edit_tcp] stanza was already present in my system/default/authorize.conf file. I took it out just to see if I could reproduce your problem, but I was still able to execute the REST calls.

View solution in original post

kbarker302
Communicator

Please see the answer posted here:

https://answers.splunk.com/answers/75013/minimum-permissions-required-for-using-http-simple-receiver...

Apparently there is an edit_tcp capability that needs to be defined in authorize.conf for the simple receiver to work:

http://docs.splunk.com/Documentation/Splunk/6.3.2/admin/Authorizeconf

Fyi, the [capability::edit_tcp] stanza was already present in my system/default/authorize.conf file. I took it out just to see if I could reproduce your problem, but I was still able to execute the REST calls.

bengwall
New Member

Assigning the edit_tcp attribute solved the issue. Thanks.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...