This page was last edited on May 17, 2024, at 08:34.
Comments or questions about this documentation? Contact us for support!
The HTTPS communication secures the interaction between Elasticsearch and various clients such as web browsers, Postman, and Spring Boot client applications. This requires configuration in both Server and Client.
In Genesys Web Services (GWS) 8.6, you can use your custom Java KeyStore (JKS) file to establish the HTTPS connection between GWS and Elasticsearch.
To establish the HTTPS connection,
xpack.security.enabled: true
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.type: JKS
xpack.security.http.ssl.keystore.path: jksStorage.jks
xpack.security.http.ssl.keystore.password: *******
The client side configuration involves configuring the certificate in the client's trustStore. You can do this in two ways:
In this method, GWS 8.6 serves as the client.
To enable custom trustStore configuration in GWS 8.6,
serverSettings:
caCertificate: /path/to/jksStorage.jks
jksPassword: *******
elasticSearchSettings:
transportClient:
nodes:
- host: 127.0.0.1
port: 9200
username: elastic
password: password
useTls: true # Enable this for ES https connection
If a custom configuration is not found (that is, if serverSettings.caCertificate is not configured), then the system default configuration is used for the client side configuration.
The JDK ships with a limited number of trusted root certificates in the <java-home>/lib/security/cacerts file. It is your responsibility to maintain (that is, add/remove) the certificates contained in the default truststore. Depending on the certificate setup of the ElasticSearch server, additional root certificate(s) must be added. For more details, refer the JSSE Reference guide.
From the Elasticsearch server setup in your environment, extract the certificate details from the .jks file, and append it to the <java-home>/lib/security/cacerts file. The example JKS file name used in this article is jksStorage.jks.
To update the cacerts file,
When xpack.security.enabled is set to true, login credentials are required to access Elasticsearch. If you want to set up Elasticsearch without login credentials, you can enable anonymous access.
To enable anonymous access, add the following settings to the Elasticsearch configuration.
xpack.security.authc.anonymous.roles: superuser
xpack.security.authc.anonymous.authz_exception: true
For details on built-in roles, refer to the Elasticsearch Built-in Roles Documentation.
Elasticsearch supports the following connections depending on the configured settings:
Settings | HTTP without Authentication | HTTP with Authentication | HTTPS with Authentication | HTTPS without Authentication |
---|---|---|---|---|
xpack.security.enabled | false | true | true | true |
xpack.security.http.ssl.enabled | false | false | true | true |
ELASTIC_PASSWORD | NA | password | password | password |
xpack.security.http.ssl.keystore.type | NA | NA | JKS | JKS |
xpack.security.http.ssl.keystore.path | NA | NA | jksStorage.jks | jksStorage.jks |
xpack.security.http.ssl.keystore.password | NA | NA | genesys | genesys |
xpack.security.authc.anonymous.authz_exception | NA | NA | NA | true |
xpack.security.authc.anonymous.roles | NA | NA | NA | superuser |