Splunk Dev

Using Splunk rest api, I get 401 clustered

mariocioffi
Loves-to-Learn

Hi, I have created a cluster of 3 nodes,

and I use Splunk rest api to perform a login,

I regularly get a sessionkey after the login,

but if in the next call I call a node other than the one that logged me in,

MicrosoftTeams-image (4).png

I get a 401 even if I pass the sessionkey in the call,

MicrosoftTeams-image (5).png

How can I share login information between nodes?

I am unable to run a sticky session between nodes
0 Karma

mariocioffi
Loves-to-Learn

ok , the architecture

 

ELB

|

Apache as a service in Container EKS, with php page that call Backend ELB

|

Bachend ELB

|                |              |

node1 node2 node3

 

the problem is that stickiness is not maintained when switching from the container, and a different splunk node is called each time, even if the backend elb implements the session cookie

 

i hope everything is clear, so i would need to share login sessions between nodes no matter which server is called

0 Karma

mariocioffi
Loves-to-Learn

Hi isoutamo

thank you for response,

the elb over cluster have already has the sticky session active, unfortunately it is invoked by a container system that does not accept the session cookie, so is there a way to share the sessionkey between the cluster nodes?

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Could you tell more about your architecture? How it has done and which component you have inside EKS or what is your container system? How you are defined access between EKS and  other components?

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

your said that this is cluster. Do you mean SHC with deployer?

If so, you must have LB before it and use sticky session for normal web traffic and also for REST API traffic. How this will done, is depending on your LB. 
r. Ismo

0 Karma

mariocioffi
Loves-to-Learn
I add that for the login I'm using admin credentials
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...