This is a meta issue to track work on making sensitive settings secure in elasticsearch. The core infrastructure for this feature is added in #22335, which provides the elasticsearch-keystore
tool. The following work is still necessary to consider the feature complete:
The following would be nice to haves:
I filed an issue to cover the specific feature of password protecting the keystore
https://github.com/elastic/elasticsearch/issues/32691
Dears,
I faced an issue with elasticsearch.keystore location when using Elastic on Kubernetes clusters and configuration are mounted via ConfigMaps. Due to this I have "read-only" fs of /etc/elasticsearch and because of that , ES is going to crash.
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.FileSystemException: /etc/elasticsearch/elasticsearch.keystore.tmp: Read-only file system
--
聽 | Likely root cause: java.nio.file.FileSystemException: /etc/elasticsearch/elasticsearch.keystore.tmp: Read-only file system
聽 | at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
聽 | at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
聽 | at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
聽 | at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
聽 | at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
聽 | at java.nio.file.Files.newOutputStream(Files.java:216)
聽 | at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:411)
聽 | at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:407)
聽 | at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:255)
聽 | at org.elasticsearch.common.settings.KeyStoreWrapper.save(KeyStoreWrapper.java:467)
聽 | at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:238)
聽 | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:295)
聽 | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
聽 | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
聽 | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
聽 | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
聽 | at org.elasticsearch.cli.Command.main(Command.java:90)
聽 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116)
聽 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
聽 | Refer to the log for complete error details.
It will be great to have a settings for keystore location in elasticsearch.yaml to set directory outside of /etc/elasticsearch.
Can you advice in this topic?
Thanks in advance,
I'm labeling this team-discuss
to determine which of the as-yet-incomplete "nice to have" tasks we still intend to complete. Once we do so, they should be promoted to individual issues and this issue closed, as the main thrust of this issue has been long since completed.
Most helpful comment
Dears,
I faced an issue with elasticsearch.keystore location when using Elastic on Kubernetes clusters and configuration are mounted via ConfigMaps. Due to this I have "read-only" fs of /etc/elasticsearch and because of that , ES is going to crash.
It will be great to have a settings for keystore location in elasticsearch.yaml to set directory outside of /etc/elasticsearch.
Can you advice in this topic?
Thanks in advance,