marco-lancini/docker_offensive_elk

can't create index: missing authentication token for REST request

scalefree opened this issue · 1 comments

I'm working through the instructions & hit a snag. I'm at "create an index", run curl & get this error back:

$ curl -XPUT 'localhost:9200/nmap-vuln-to-es'
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/nmap-vuln-to-es]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication token for REST request [/nmap-vuln-to-es]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

I faced the same issue. You need to authenticate with default elastic search username & password, if not changed. In PowerShell, this is the following command:
$cred = Get-Credential -UserName elastic -Message "Default password: changeme" Invoke-WebRequest -Method PUT -Uri "http://localhost:9200/nmap-vuln-to-es" -Credential $cred

You should then have the following result:
image