Setting up TLS

I am trying to set up TLS encryption for accessing Kibana internally.
I am trying to follow the following article: Setting up TLS on a cluster | Elasticsearch Reference [7.9] | Elastic

On the first step in creating the X.509 certificate, I am struggling to run the following options, as I need to include the FQDN and IP address of the server in the certificate:

If you want to use hostname verification within your cluster, run the elasticsearch-certutil cert command once for each of your nodes and provide the --name , --dns and --ip options.

When I run the following command, it gives me an error, so not really sure if I am running it correctly:

`elasticsearch-certutil.bat cert --ca --name FQDN.local --dns FQDN.local --ip elastic-ca.p12`

I am getting the following error:

Enter password for CA (--name) : I ENTER CA PASSWORD HERE
Exception in thread "main" java.nio.file.NoSuchFileException: --name
        at java.base/sun.nio.fs.WindowsException.translateToIOException(
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(
        at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(
        at java.base/java.nio.file.Files.newByteChannel(
        at java.base/java.nio.file.Files.newByteChannel(
        at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(
        at java.base/java.nio.file.Files.newInputStream(
        at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readKeyStore(
        at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readKeyPairsFromKeystore(
        at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readPkcs12KeyPairs(
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
        at org.elasticsearch.cli.MultiCommand.execute(
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
        at org.elasticsearch.cli.Command.main(


Any help would be greatly appreciated. Thanks

Can you clarify what you mean here?

The step you seem to be performing is to generate certificates for your nodes to use when they connect to one another. That's important, but it doesn't have anything to do with Kibana. It's possible (depending on your circumstances) that you're making this step harder than it needs to be. For example, you are electing to generate a certificate per node, which is a fine thing to do, but it's harder, and isn't really necessary for the task that I think you're actually trying to do.

The --ca option needs an argument that is the PKCS#12 file that contains your CA.
So your command line should be:

elasticsearch-certutil.bat cert --ca elastic-ca.p12 --name FQDN.local --dns FQDN.local --ip

So my aim is to just secure the connections to the Kibana portal so that when logging into it, passwords are not plain text... I presume this is not correct then

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.