Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for authorization tokens read from .splunkrc #388

Closed
@UnitedMarsupials

Description

@UnitedMarsupials

Is your feature request related to a problem? Please describe.
Our Splunk-administrators here issue authorization-tokens to application-maintainers, instead of user/password credentials. For example, the HTTP-request in our current Python code (using "requests" API) begins with:

                req = requests.Request(
                        'POST',
                        'https://%s:%s/services/collector/event' % (host, port),
                        headers = {
                                'Authorization': 'Splunk %s' % SplunkToken
                        },
                        json = body
                )

Unfortunately, the documented .splunkrc syntax does not allow to specify token and, presumably, the code, which reads the file, would not make use of it either.

Describe the solution you'd like
Allow users to use the token (or authtoken), whether read from .splunkrc, or command-line, or passed as a function-argument.

Describe alternatives you've considered
I may give some other -- unofficial -- Splunk client Python-libraries a shot, until this is implemented. Or -- continue using our own :(

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions