Open UnitedMarsupials opened 1 year ago
@UnitedMarsupials, Sorry for the delay in response, To connect with splunk using .env file you can use splunkToken
key for bearer-token and token
key for session-key. In the future release we'll update the sample .env files to avoid any confusion.
Please let us know if you still face any issue after updating key name to splunkToken
.
@akaila-splunk, putting splunkToken
into .env
does not work. The way to use the Splunk token currently is by using the token
verb on the left side, and the string consisting of the word "Splunk" followed by a space, and then -- the hexadecimal token itself:
host=splunk-hec
port=8088
token=Splunk xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
Unfortunately, even after the successful authentication, things don't really work -- because the client tries to get details about the index (even if it does not need any such details), which a Splunk-token is not authorized to do. The #34 discusses this problem in detail...
The resolution of splunk/splunk-sdk-python#388 advises using the verb
bearerToken
to use the token-based authentication instead of the username/password credentials.Both the
python/README.md
and thepython/.env
show the same verb -- although the line is commented-out in both examples. Unfortunately, trying to use it results in an error:Closer examination of the
python/utils.py
reveals, that the expected verb issplunkToken
! At this time, the documented spelling should, probably, be added as an alias -- if possible -- to avoid breaking things for people already using the incorrect verb...