Elasticsearch Windows Security

How do I enable elasticsearch security features in windows i'm using elasticsearch-7.1.1.msi package ?

I suspect you're referring to using Basic Authentication and TLS? Using the MSI the steps would be

  1. Run through the installation, choosing Basic license

    You may decide to install Elasticsearch as a service, or not. As an example, I will install as a service

    Do not set the service to start as part of the installation, as we need to make a configuration change before starting.

  2. Open a new PowerShell terminal and navigate to the config directory, which by default will be C:\ProgramData\Elastic\Elasticsearch\config. The ES_PATH_CONF system environment variable will be set to this path. Open elasticsearch.yml within the config directory with administrator privileges and update xpack.security.enabled key to the following

    xpack.security.enabled: true
    

    save the file.

  3. Start Elasticsearch service. With PowerShell

    Start-Service elasticsearch
    
  4. Navigate to the installation directory, which by default will be C:\Program Files\Elastic\Elasticsearch\7.1.1\. The ES_HOME system environment variable will be set to the installation directory.

    Within the installation directory, navigate to the bin directory and use the elasticsearch-setup-passwords.bat to set up built-in user accounts

     cd $env:ES_HOME\bin
     .\elasticsearch-setup-passwords.bat interactive
    

    Follow the prompts.

The Windows installer does not currently automate this process; we're currently discussing what the feature set of the installer should be going forward.

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