elastic / beats-dashboards

DEPRECATED. Moved to https://github.com/elastic/beats. Please use the new repository to add new issues.
Other
196 stars 73 forks source link

Pass username:password to the load script #65

Open monicasarbu opened 8 years ago

monicasarbu commented 8 years ago

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:xxxxxx@xyz.aws.found.io:9243
andrewkroh commented 8 years ago

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.

monicasarbu commented 8 years ago

@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!

pmusa commented 8 years ago
$> ./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:asd@94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io:9243/

curl --user https://admin:asd@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 https://admin:asd@94146e7a3afb6ed9626a95a638596dbc.eu-west-1.aws.found.io: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 commented 8 years ago

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