Hello everyone,
I’m trying to configure WILDCARD certificate on a new cluster OpenSearch
There is the error i’m blocked in
Can someone help me found why ?
[2022-04-10T07:24:56,363][WARN ][o.o.d.HandshakingTransportAddressConnector] [os01.orgx.com] handshake failed for [connectToRemoteMasterNode[x.x.x.x:9300]]
org.opensearch.transport.RemoteTransportException: [os03.orgx.com][x.x.x.x:9300][internal:transport/handshake]
Caused by: org.opensearch.OpenSearchException: Illegal parameter in http or transport request found.
This means that one node is trying to connect to another with
a non-node certificate (no OID or security.nodes_dn incorrect configured) or that someone
is spoofing requests. Check your TLS certificate setup as described here: See https://opendistro.github.io/for-elasticsearch-docs/docs/troubleshoot/tls/
There is my actual config
OpenSearch-Dashboard.yml
server.name: os_dashboards.orgx.com
server.host: "0.0.0.0"
opensearch.username: "admin"
opensearch.password: "admin"
# Encrypt traffic between the browser and OpenSearch-Dashboards
server.ssl.enabled: true
server.ssl.certificate: "/usr/share/opensearch-dashboards/config/node.pem"
server.ssl.key: "/usr/share/opensearch-dashboards/config/node-key.pem"
# Encrypt traffic between OpenSearch-Dashboards and Opensearch
opensearch.ssl.certificateAuthorities: ["/usr/share/opensearch-dashboards/config/root-ca.pem"]
opensearch.ssl.verificationMode: full
OpenSearch.yml
cluster.name: os-cluster.orgx.com
network.host: 0.0.0.0
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%
plugins.security.allow_unsafe_democertificates: true
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemtrustedcas_filepath: node.pem
plugins.security.ssl.transport.enabled: true
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.authcz.admin_dn:
- "CN=*.orgx.com,OU=X,O=XZ,ST=XT,C=XY"
plugins.security.nodes_dn:
- "CN=os01.orgx.com,OU=X,O=XZ,ST=XT,C=XY"
- "CN=os02.orgx.com,OU=X,O=XZ,ST=XT,C=XY"
- "CN=os03.orgx.com,OU=X,O=XZ,ST=XT,C=XY"
The docker file :
version: '3.1'
services:
os01.orgx.com:
restart: always
image: opensearchproject/opensearch:1.3.1
environment:
OPENSEARCH_JAVA_OPTS: "-Xms16g -Xmx16g" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os01.orgx.com
discovery.seed_hosts: os01.orgx.com,os02.orgx.com,os03.orgx.com
cluster.initial_master_nodes: os01.orgx.com,os02.orgx.com,os03.orgx.com
plugins.security.ssl.transport.pemkey_filepath: node-key.pem # relative path
plugins.security.ssl.transport.pemcert_filepath: node.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
plugins.security.ssl.http.pemkey_filepath: node-key.pem
plugins.security.ssl.http.pemcert_filepath: node.pem
plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./OpenSearch/opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "./OpenSearch/internal_users.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/internal_users.yml"
- "./OpenSearch/roles_mapping.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles_mapping.yml"
- "./OpenSearch/tenants.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/tenants.yml"
- "./OpenSearch/roles.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles.yml"
- "./OpenSearch/action_groups.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/action_groups.yml"
- "./OpenSearch/DATA1:/usr/share/opensearch/data"
- "./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem"
- "./certs/node.pem:/usr/share/opensearch/config/node.pem"
- "./certs/node-key.pem:/usr/share/opensearch/config/node-key.pem"
- "./certs/admin.pem:/usr/share/opensearch/config/admin.pem"
- "./certs/admin-key.pem:/usr/share/opensearch/config/admin-key.pem"
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
os02.orgx.com:
restart: always
image: opensearchproject/opensearch:1.3.1
environment:
OPENSEARCH_JAVA_OPTS: "-Xms16g -Xmx16g" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os02.orgx.com
discovery.seed_hosts: os01.orgx.com,os02.orgx.com,os03.orgx.com
cluster.initial_master_nodes: os01.orgx.com,os02.orgx.com,os03.orgx.com
plugins.security.ssl.transport.pemkey_filepath: node-key.pem # relative path
plugins.security.ssl.transport.pemcert_filepath: node.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
plugins.security.ssl.http.pemkey_filepath: node-key.pem
plugins.security.ssl.http.pemcert_filepath: node.pem
plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./OpenSearch/opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "./OpenSearch/internal_users.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/internal_users.yml"
- "./OpenSearch/roles_mapping.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles_mapping.yml"
- "./OpenSearch/tenants.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/tenants.yml"
- "./OpenSearch/roles.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles.yml"
- "./OpenSearch/action_groups.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/action_groups.yml"
- "./OpenSearch/DATA2:/usr/share/opensearch/data"
- "./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem"
- "./certs/node.pem:/usr/share/opensearch/config/node.pem"
- "./certs/node-key.pem:/usr/share/opensearch/config/node-key.pem"
- "./certs/admin.pem:/usr/share/opensearch/config/admin.pem"
- "./certs/admin-key.pem:/usr/share/opensearch/config/admin-key.pem"
os03.orgx.com:
restart: always
image: opensearchproject/opensearch:1.3.1
environment:
OPENSEARCH_JAVA_OPTS: "-Xms16g -Xmx16g" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os03.orgx.com
discovery.seed_hosts: os01.orgx.com,os02.orgx.com,os03.orgx.com
cluster.initial_master_nodes: os01.orgx.com,os02.orgx.com,os03.orgx.com
plugins.security.ssl.transport.pemkey_filepath: node-key.pem # relative path
plugins.security.ssl.transport.pemcert_filepath: node.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
plugins.security.ssl.http.pemkey_filepath: node-key.pem
plugins.security.ssl.http.pemcert_filepath: node.pem
plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./OpenSearch/opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "./OpenSearch/internal_users.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/internal_users.yml"
- "./OpenSearch/roles_mapping.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles_mapping.yml"
- "./OpenSearch/tenants.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/tenants.yml"
- "./OpenSearch/roles.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles.yml"
- "./OpenSearch/action_groups.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/action_groups.yml"
- "./OpenSearch/DATA3:/usr/share/opensearch/data"
- "./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem"
- "./certs/node.pem:/usr/share/opensearch/config/node.pem"
- "./certs/node-key.pem:/usr/share/opensearch/config/node-key.pem"
- "./certs/admin.pem:/usr/share/opensearch/config/admin.pem"
- "./certs/admin-key.pem:/usr/share/opensearch/config/admin-key.pem"
kibana.orgx.com:
restart: always
image: opensearchproject/opensearch-dashboards:1.3.0
ports:
- 5601:5601
volumes:
- "./certs/root-ca.pem:/usr/share/opensearch-dashboards/config/root-ca.pem"
- "./certs/node.pem:/usr/share/opensearch-dashboards/config/node.pem"
- "./certs/node-key.pem:/usr/share/opensearch-dashboards/config/node-key.pem"
- "./certs/admin.pem:/usr/share/opensearch-dashboards/config/admin.pem"
- "./certs/admin-key.pem:/usr/share/opensearch-dashboards/config/admin-key.pem"
- "./OpenSearch-Dashboard/opensearch-dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml"
environment:
OPENSEARCH_HOSTS: '["https://os01.orgx.com:9200","https://os02.orgx.com:9200","https://os03.orgx.com:9200"]' # must be a string with no spaces when specified as an environment variable
DISABLE_INSTALL_DEMO_CONFIG: "true"