From b15dad0600c4888da658448b89e41d7f18262716 Mon Sep 17 00:00:00 2001 From: osgn422w Date: Mon, 3 Feb 2020 17:08:11 +0100 Subject: correct security settings correct and adjust the security settings Issue-ID: CLAMP-483 Change-Id: Id94672580ade132a7ff16241f44d8a4403b49383 Signed-off-by: osgn422w --- src/main/docker/logstash/Dockerfile | 5 +++- src/main/docker/logstash/clamp-cert/ca-certs.pem | 32 ++++++++++++++++++++++++ src/main/docker/logstash/pipeline/logstash.conf | 9 +++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/main/docker/logstash/clamp-cert/ca-certs.pem (limited to 'src/main/docker/logstash') diff --git a/src/main/docker/logstash/Dockerfile b/src/main/docker/logstash/Dockerfile index 762479c..8d26473 100644 --- a/src/main/docker/logstash/Dockerfile +++ b/src/main/docker/logstash/Dockerfile @@ -28,7 +28,10 @@ LABEL Description="Logstash image with some plugins needed for the clamp dashboa # Default aaf certificates COPY certs /certs.d/ -# remove default pipeline first +# Default clamp certificates for ES communication +COPY clamp-cert /clamp-cert/ + +# remove/replace default pipeline first COPY pipeline/logstash.conf /usr/share/logstash/pipeline/logstash.conf # add plugins needed by aggregation part of the pipeline diff --git a/src/main/docker/logstash/clamp-cert/ca-certs.pem b/src/main/docker/logstash/clamp-cert/ca-certs.pem new file mode 100644 index 0000000..70bb844 --- /dev/null +++ b/src/main/docker/logstash/clamp-cert/ca-certs.pem @@ -0,0 +1,32 @@ +Bag Attributes + friendlyName: CN=intermediateCA_9,OU=OSAAF,O=ONAP,C=US +subject=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9 + +issuer=OU = OSAAF, O = ONAP, C = US + +-----BEGIN CERTIFICATE----- +MIIEdTCCAl2gAwIBAgIBBzANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB +RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwODE3MTg1MTM3WhcN +MjMwODE3MTg1MTM3WjBHMQswCQYDVQQGEwJVU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yEHXoprlNi8FR4I+NFzbDe6a2cFow1JN19AJ9Z5Rk5m7M0mQPaQ4RcikjB3 +aoLsASCJTm1OpOFHfxEKiBW4Lsp3Uc5/Rb9ZNbfLrwqWZRM7buW1e3ekLqntgbky +uKKISHqVJuw/vXHl1jNibEo9+JuQ88VNuAcm7WpGUogeCa2iAlPTckPZei+MwZ8w +tpvxTyYlZEC8DWzY1VC29+W2N5cvh01e2E3Ql08W1zL63dqrgdEZ3VWjzooYi4ep +BmMXTvouW+Flyvcw/0oTcfN0biDIt0mCkZ5CQVjfGL9DTOYteR5hw+k= +-----END CERTIFICATE----- diff --git a/src/main/docker/logstash/pipeline/logstash.conf b/src/main/docker/logstash/pipeline/logstash.conf index 5c1d47d..24c8c9f 100644 --- a/src/main/docker/logstash/pipeline/logstash.conf +++ b/src/main/docker/logstash/pipeline/logstash.conf @@ -237,6 +237,9 @@ output { if "error" in [tags] { elasticsearch { codec => "json" + ssl => true + cacert => "/clamp-cert/ca-certs.pem" + ssl_certificate_verification => false hosts => ["${elasticsearch_base_url}"] user => "${LOGSTASH_USR}" password => "${LOGSTASH_PWD}" @@ -247,6 +250,9 @@ output { } else if "event-cl-aggs" in [tags] { elasticsearch { codec => "json" + ssl => true + cacert => "/clamp-cert/ca-certs.pem" + ssl_certificate_verification => false hosts => ["${elasticsearch_base_url}"] user => "${LOGSTASH_USR}" password => "${LOGSTASH_PWD}" @@ -259,6 +265,9 @@ output { } else { elasticsearch { codec => "json" + ssl => true + cacert => "/clamp-cert/ca-certs.pem" + ssl_certificate_verification => false hosts => ["${elasticsearch_base_url}"] user => "${LOGSTASH_USR}" password => "${LOGSTASH_PWD}" -- cgit 1.2.3-korg