Elasticsearch SSL for free.
Search Guard SSL is a free and open source plugin for Elasticsearch which provides SSL for Elasticsearch. It does not provide authentication and authorization.
https://github.com/floragunncom/search-guard-ssl
Prerequisites:
openssl ca \ -in ca/signing-ca.csr \ -notext \ -out signed-csr.pem \ -config etc/signing-ca.conf \ -extensions v3_req \ -batch \ -passin pass:capassword_use_a_strong_one \ -extensions server_ext
3. distribute the truststore.jks(generated in step 1) to all elasticsearch node(I have only one elasticsearch node, named "elasticsearch-129") and put it into config dir.
4. Generate for each node a separate keystore.
#Generate a new key keytool -genkey \ -alias NODE_NAME \ -keystore NODE_NAME-keystore.jks \ -keyalg RSA \ -keysize 2048 \ -validity 712 \ -keypass mykspassword \ -storepass mykspassword \ -dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US" #Generate a CSR (Certificate signing request) keytool -certreq \ -alias elasticsearch-129 \ -keystore elasticsearch-129-keystore.jks \ -file elasticsearch-129.csr \ -keyalg rsa \ -keypass mykspassword \ -storepass mykspassword \ -dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US"
5. sign CRS generated above with the root ca generated in step 1.
6. import the signed CSR together with the root certificate chain into the keystore cat ca/chain-ca.pem elasticsearch-129.pem | keytool \ -importcert \ -keystore elasticsearch-129-keystore.jks \ -storepass mykspassword \ -noprompt \ -alias elasticsearch-129
7. distribute the elasticsearch-129-keystore.jks to elasticsearch node and put it into the config dir.
Above is all my configuration. The following is the start log and I've highlighted the error message.
----- Original message -----
From: in...@search-guard.com
Sent by: search...@googlegroups.com
To: Search Guard <search...@googlegroups.com>
Cc:
Subject: [search-guard group] Re: Search Guard SSL for Elasticsearch 2.1 released
Date: Wed, Feb 3, 2016 1:57 AM
you can ignore all messages but not the last (java.lang.IllegalArgumentException: File does not contain valid certificates: /tmp/sg_609338662165226698.pem)
can you please post your elasticsearch.yml file?
Am Dienstag, 2. Februar 2016 11:15:12 UTC+1 schrieb ...cp@...m.com:
Hello,
I'm configuring search-guard-ssl for elasticseach 2.1 but encountered some problems. Below is my configuration and the log information when starting elasticsearch. Could you please tell me what's wrong with my configuration? Thanks a lot!
My configuration by referring to the wiki:
1. generate the root ca by "./gen_root_ca.sh capassword_use_a_strong_one truststorepassword"
2. sign CSR's with the newly generated root CA above
openssl ca \
-in ca/signing-ca.csr \
-notext \
-out signed-csr.pem \
-config etc/signing-ca.conf \
-extensions v3_req \
-batch \
-passin pass:capassword_use_a_strong_one \
-extensions server_ext3. distribute the truststore.jks(generated in step 1) to all elasticsearch node(I have only one elasticsearch node, named "elasticsearch-129") and put it into config dir.4. Generate for each node a separate keystore.#Generate a new key
keytool -genkey \
-alias NODE_NAME \
-keystore NODE_NAME-keystore.jks \
-keyalg RSA \
-keysize 2048 \
-validity 712 \
-keypass mykspassword \
-storepass mykspassword \
-dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US"
#Generate a CSR (Certificate signing request)
keytool -certreq \
-alias elasticsearch-129 \
-keystore elasticsearch-129-keystore.jks \
-file elasticsearch-129.csr \
-keyalg rsa \
-keypass mykspassword \
-storepass mykspassword \
-dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US"5. sign CRS generated above with the root ca generated in step 1.6. import the signed CSR together with the root certificate chain into the keystore
cat ca/chain-ca.pem elasticsearch-129.pem | keytool \
-importcert \
-keystore elasticsearch-129-keystore.jks \
-storepass mykspassword \
-noprompt \
-alias elasticsearch-1297. distribute the elasticsearch-129-keystore.jks to elasticsearch node and put it into the config dir.Above is all my configuration. The following is the start log and I've highlighted the error message.
--
You received this message because you are subscribed to a topic in the Google Groups "Search Guard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/qUuDnFmOFJY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.
To post to this group, send email to search...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/1cb1fc6b-65f4-4c8c-b5bd-558f7d04593d%40googlegroups.com.
----- Original message -----
From: in...@search-guard.com
Sent by: search...@googlegroups.com
To: Search Guard <search...@googlegroups.com>
Cc:
Subject: [search-guard group] Re: Search Guard SSL for Elasticsearch 2.1 released
Date: Wed, Feb 3, 2016 1:57 AM
you can ignore all messages but not the last (java.lang.IllegalArgumentException: File does not contain valid certificates: /tmp/sg_609338662165226698.pem)
can you please post your elasticsearch.yml file?
Am Dienstag, 2. Februar 2016 11:15:12 UTC+1 schrieb ...cp@...m.com:
Hello,
I'm configuring search-guard-ssl for elasticseach 2.1 but encountered some problems. Below is my configuration and the log information when starting elasticsearch. Could you please tell me what's wrong with my configuration? Thanks a lot!
My configuration by referring to the wiki:
1. generate the root ca by "./gen_root_ca.sh capassword_use_a_strong_one truststorepassword"
2. sign CSR's with the newly generated root CA above
openssl ca \
-in ca/signing-ca.csr \
-notext \
-out signed-csr.pem \
-config etc/signing-ca.conf \
-extensions v3_req \
-batch \
-passin pass:capassword_use_a_strong_one \
-extensions server_ext3. distribute the truststore.jks(generated in step 1) to all elasticsearch node(I have only one elasticsearch node, named "elasticsearch-129") and put it into config dir.4. Generate for each node a separate keystore.#Generate a new key
keytool -genkey \
-alias NODE_NAME \
-keystore NODE_NAME-keystore.jks \
-keyalg RSA \
-keysize 2048 \
-validity 712 \
-keypass mykspassword \
-storepass mykspassword \
-dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US"
#Generate a CSR (Certificate signing request)
keytool -certreq \
-alias elasticsearch-129 \
-keystore elasticsearch-129-keystore.jks \
-file elasticsearch-129.csr \
-keyalg rsa \
-keypass mykspassword \
-storepass mykspassword \
-dname "CN=127.0.0.1, OU=department, O=company, L=localityName, C=US"5. sign CRS generated above with the root ca generated in step 1.6. import the signed CSR together with the root certificate chain into the keystore
cat ca/chain-ca.pem elasticsearch-129.pem | keytool \
-importcert \
-keystore elasticsearch-129-keystore.jks \
-storepass mykspassword \
-noprompt \
-alias elasticsearch-1297. distribute the elasticsearch-129-keystore.jks to elasticsearch node and put it into the config dir.Above is all my configuration. The following is the start log and I've highlighted the error message.
--