Security

Does Splunk have a problem with token authentication and SAML?

ww9rivers
Contributor

Splunk seems to have a problem with authenticating a SAML user account using a token.

The purpose of using token authentication is to allow an external application to run a search and get the results. A sample script is posted on GitHub as a code gist — the script simply starts a search but does not wait for the results.

The problem is that when token authentication is used with a SAML account, it only works when that SAML user is logged in on the Splunk web GUI and while the interactive session is (still) valid.

The problem is shown in the internal log:

 

07-03-2023 19:35:53.931 +0000 ERROR Saml [795668 AttrQueryRequestExecutorWorker-0] - No status code found in SamlResponse, Not a valid status.
07-03-2023 19:35:53.901 +0000 ERROR Saml [795669 AttrQueryRequestExecutorWorker-1] - No status code found in SamlResponse, Not a valid status.

 

The theory on the failure is:

  • The token authentication works with (within) Splunk;
  • But Splunk needs to perform RBAC after authentication. So it does AQR after the authentication;
  • However, when there is no valid, live SAML session, the AQR fails.

(AQR = Attribute Query Request) -- in this case, to get the user's group memberships to map to Splunk roles.

I wonder if anyone has been able to get token authentication to work for a SAML account?

[Edit]: On the other hand, is it simply impossible to use token authentication with a SAML user account?

Labels (3)
0 Karma

even65tiQ
New Member

@ww9rivers Did you end up finding a solution for this?
We have run into the same issue. We have noticed that once the user has authenticated and the token is active that it only remains active until the "Get User Info time-to-live" timeframe that is located under Attribute Extensions in the SAML Configuration.

0 Karma

ww9rivers
Contributor

We ended up creating local (splunk) accounts for authenticating with token. Sorry for the late response.

0 Karma

PickleRick
SplunkTrust
SplunkTrust

It kinda makes sense.

With SAML authentication you don't actually authenticate against the SP but against the IdP and then pass the assertions around. How do you expect it to work when you don't authenticate against the IdP?

0 Karma

ww9rivers
Contributor

Well, I expected it to authenticate the account when there is a token present.

When Splunk knows that the account exists (It has authenticated before AND it has a token), why is that not sufficient for authentication?

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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...