Skip to content

bearerToken vs. splunkToken #33

@UnitedMarsupials

Description

@UnitedMarsupials

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 the python/.env show the same verb -- although the line is commented-out in both examples. Unfortunately, trying to use it results in an error:

Traceback (most recent call last):
  File "submit.py", line 82, in <module>
    main(sys.argv[1:])
  File "submit.py", line 43, in main
    opts = parse(argv, RULES, ".env", usage=usage)
  File "/home/xx/splunk-app-examples/python/utils.py", line 226, in parse
    parser_.loadenv(config)
  File "/home/xx/splunk-app-examples/python/utils.py", line 172, in loadenv
    self.loadif(filepath)
  File "/home/xx/splunk-app-examples/python/utils.py", line 166, in loadif
    self.load(filepath)
  File "/home/xx/splunk-app-examples/python/utils.py", line 159, in load
    raise NameError("No such option --" + key)
NameError: No such option --bearerToken

Closer examination of the python/utils.py reveals, that the expected verb is splunkToken! 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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions