beats-dashboards icon indicating copy to clipboard operation
beats-dashboards copied to clipboard

Pass username:password to the load script

Open monicasarbu opened this issue 9 years ago • 4 comments

The load script doesn't receive the password together with the username for connecting to Elasticsearch. Passing username:password under the user argument doesn't work:

./load.sh -user 'admin:xxxxxx' -url 'https://xyz.aws.found.io:9243'

But the following command works:

./load.sh https://admin:[email protected]:9243

monicasarbu avatar Jan 13 '16 21:01 monicasarbu

Providing the password with -user 'admin:password' works for me. Are you sure this does not work?

See #56. It documents the possible ways to set the password.

andrewkroh avatar Jan 14 '16 18:01 andrewkroh

@pmusa Pablo, as you are the one that noticed a problem with loading the dashboards to aws.found.io, could you please let us know again what command are you using and which one is not working for you? I might have missed something in here. Thanks!

monicasarbu avatar Feb 01 '16 08:02 monicasarbu

$> ./load.sh -url https://94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/ -u admin

curl --user https://94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/
Loading search Cache-transactions:
Enter host password for user 'rl/.kibana/search/Cache-transactions':
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

$> ./load.sh -url https://94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/ -u admin:asd
curl --user https://94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/
Loading search Cache-transactions:
Enter host password for user 'rl/.kibana/search/Cache-transactions':
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

$> ./load.sh -url https://admin:[email protected]:9243/

curl --user https://admin:[email protected]:9243/
Loading search Cache-transactions:
Enter host password for user 'rl/.kibana/search/Cache-transactions':
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

$> ./load.sh https://admin:[email protected]:9243/

curl
Loading search Cache-transactions:
{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [admin] for REST request [/.kibana/search/Cache-transactions]","header":{"WWW-Authenticate":"Basic realm=\"shield\""}}],"type":"security_exception","reason":"unable to authenticate user [admin] for REST request [/.kibana/search/Cache-transactions]","header":{"WWW-Authenticate":"Basic realm=\"shield\""}},"status":401}

It failed because the password is wrong, but the request was successful. Maybe I am doing something wrong. I am using a mac.

pmusa avatar Feb 03 '16 14:02 pmusa

I do not see any url handler inside the script itself only a $2 into curl user. So testing here, this works as well

./load.sh https://94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/ admin:asd

My version is beats-dashboards-1.0.1

pmusa avatar Feb 03 '16 14:02 pmusa