-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
This is related to: #35433
Elasticsearch version (bin/elasticsearch --version):
6.6.1
Description of the problem including expected versus actual behavior:
Keystore data inserted with elasticsearch-keystore add --stdin is unusable for GCS credentials while data inserted using elasticsearch-keystore add-file is perfectly fine.
It is not clear if this really is the intended behaviour:
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/common/settings/KeyStoreWrapper.java#L542
If yes, then at least the Puppet code will need adjustments to bind types to credentials because it only supports add --stdin at this point:
https://github.com/elastic/puppet-elasticsearch/blob/master/lib/puppet/provider/elasticsearch_keystore/elasticsearch_keystore.rb
This needs to be described there at least:
https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-gcs-usage.html
Steps to reproduce:
Loading data with using:
cat /secrets/file | /usr/share/elasticsearch/bin/elasticsearch-keystore add --force --stdin gcs.client.XYZ.credentials_file
... produces an error upon POST _nodes/reload_secure_settings:
{
"name" : "mynode.net",
"reload_exception" : {
"type" : "illegal_argument_exception",
"reason" : "Secret setting gcs.client.XYZ.credentials_file is not a file"
}
}While inserting the same data using add-file does not output any error
/usr/share/elasticsearch/bin/elasticsearch-keystore add-file --force gcs.client.XYZ.credentials_file /secrets/file
Note: The keystores do not have the same file sizes on disk (2559 bytes with --stdin, 2557 with add-file).