Skip to content

[Bug] Kibana upload getting unauthorized error #634

@shravaka

Description

@shravaka

Description:
It is impossible to upload rules to a internally or locally hosted instance by using the Python script.
The cause seems to be one of the parameters in line 118 of the /detection-rules/kibana/connector.py file:
payload = {'params': payload, 'currentURL': '', 'providerType': 'basic', 'providerName': 'cloud-basic'}

Should the 'ProviderName' be hardcoded here?

Steps to reproduce the behavior:

  1. Execute the command:
    python -m detection_rules kibana --kibana-url xxx -ku username -kp password upload-rule example.toml
    where xxx is internally hosted instance of kibana

Expected behavior:
Rule successfully uploaded to Kibana

Actual behavior:
Python returns an error:
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url:xxx

  • OS: Ubuntu
  • Version: 20.04
  • OS: Centos
  • Version 7.8

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingclicommand line toolingcommunitypythonInternal python for the repository

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions