splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

no csrf handling ?

Open Override-6 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. I try to use the splunk api on a specific endpoint that seems to have CSRF protection. It seems that the current splunk sdk implementation does not handle CSRF cookies

Describe the solution you'd like Implementing an option to store and send back splunk csrf cookie

Describe alternatives you've considered Create a proxy that will store the tokens and csrf tokens and add the splunkd_8089 cookie and X-Splunk-Form-Key headers, or just dont use the api wrapper and do requests by hand which is unfortunate

Additional context I might be interested in implementing this stuff myself, if this feature request gets accepted

Override-6 avatar Feb 07 '25 14:02 Override-6

Hi,

Could you give us some more details about the problem you are trying to solve?

Have you tried using the headers param?

https://github.com/splunk/splunk-sdk-python/blob/c710f47efad51fd921003c91c51ec2b86bf2b18c/splunklib/binding.py#L736-L737

mateusz834 avatar Sep 11 '25 06:09 mateusz834

Closing for now, let us know if this issue still persists.

mateusz834 avatar Oct 06 '25 15:10 mateusz834