Splunk Dev

Failed to load Storage/Passwords endpoint using python SDK in application script?

davidneil
Engager

Hello,

I am currently running into this issue where I am unable to store / retrieve any data from my storage/passwords endpoint using the splunk sdk for python. 

Here is the message I keep receiving. 

Screenshot 2023-02-20 at 8.58.31 PM.png

 

I have yet to have success with this but here is the code below:

def _load_secrets(self)
    service = client.connect(host="localhost", app="myapp", owner="admin", token=self.sessionKey)
    self.secrets = service.storage_passwords
 
This function gets called in my __init__ function when the object is instantiated.
 
I am storing the secrets object in a class attribute to be accessible to all functions that would need to interact with this collection.  I have tried this in functions outside of the class I have created and this has failed as well.

I have tried changing the owner to "nobody", and I have tried to change the scheme to "http"  and setting the verify arg to False, but this has not helped my issue. 
 
I have passAuth enabled for "splunk-system-user" in my inputs.conf file to allow the use of the session key taken from the standard input ( I am getting the session key without issue).
 
It appears that I am connecting successfully but when I attempt to access the storage/passwords collection it fails.
 
Ps: I will be storing an apikey and credentials to retrieve them in here. I successfully store the credentials from my JS function for the setup, my issue is only with python.
 
Does anyone know how to fix this? 
 
0 Karma
1 Solution

davidneil
Engager

I am aware I did not have the semi colon on the function above... typo

Deleted splunk and reinstalled everything, now I am running into this: 

Screenshot 2023-02-20 at 10.22.37 PM.png

View solution in original post

0 Karma

davidneil
Engager

I am aware I did not have the semi colon on the function above... typo

Deleted splunk and reinstalled everything, now I am running into this: 

Screenshot 2023-02-20 at 10.22.37 PM.png

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!

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 ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...