ChrisRimondi / VulntoES

Vulnerability Data in ES
GNU General Public License v2.0
145 stars 63 forks source link

Elasticsearch with X-Pack #16

Open ach-eddine opened 6 years ago

ach-eddine commented 6 years ago

Hi, fist thanks for this awesome code :)

I want to upload nessus scan to my elasticsearch with credentials ( X-Pack Authentication), when i try have the message below :

Traceback (most recent call last):
  File "VulntoES.py", line 433, in <module>
    main()
  File "VulntoES.py", line 415, in main
    np = NessusES(in_file,es_ip,es_port,index_name, static_fields)
  File "VulntoES.py", line 56, in __init__
    self.es.indices.put_mapping(index=index_name, doc_type="vuln", body=json.dumps(vulnmapping))
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/utils.py", line 76, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/indices.py", line 271, in put_mapping
    '_mapping', doc_type), params=params, body=body)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 314, in perform_request
    status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_urllib3.py", line 163, in perform_request
    self._raise_error(response.status, raw_data)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/base.py", line 125, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.AuthenticationException: TransportError(401, u'security_exception', u'missing authentication token for REST request [/nessus-result/_mapping/vuln]')

in advance thanks for your help.

Regards Achraf