Skip to content

Commit d1b43d6

Browse files
author
Logan L
committed
Secure redis communications with TLS
1 parent 5a7cf65 commit d1b43d6

25 files changed

+100
-29
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "shell-lib"]
2-
path = shell-lib
1+
[submodule "scripts/shell-lib"]
2+
path = scripts/shell-lib
33
url = [email protected]:activecm/shell-lib.git

agent/install-sysmon-beats.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ winlogbeat.event_logs:
154154
output.redis:
155155
hosts:
156156
- ${RedisHost}:${RedisPort}
157+
ssl:
158+
enabled: true
159+
verification_mode: none
157160
key: "net-data:sysmon"
158161
password: `"`${REDIS_PASSWORD}`"
159162
"@ > winlogbeat.yml

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
#net.ipv4.tcp_max_syn_backlog: 512 works on ubuntu 18, but not 16
1111
ports:
1212
- "${ESPY_REDIS_PORT:-6379}:6379"
13+
entrypoint: ""
1314
command: ["redis-server", "/etc/espy/redis.conf"]
1415

1516
espy:
@@ -25,4 +26,5 @@ services:
2526
# image: redis:6.0
2627
# volumes:
2728
# - ${ESPY_CONFIG_DIR:-/etc/espy}:/etc/espy
29+
# entrypoint: ""
2830
# command: ["redis-cli", "-h", "redis-server"]

espy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if [ ! -w "/var/run/docker.sock" -o ! -r ".env" ]; then
1212
fi
1313

1414
# Check for pre-requisites
15-
shell-lib/docker/check_docker.sh || echo "You do not have a supported version of Docker installed."
16-
shell-lib/docker/check_docker-compose.sh || echo "You do not have a supported version of Docker-Compose installed."
15+
scripts/shell-lib/docker/check_docker.sh || echo "You do not have a supported version of Docker installed."
16+
scripts/shell-lib/docker/check_docker-compose.sh || echo "You do not have a supported version of Docker-Compose installed."
1717

1818
# TMPDIR is erased even if -E is passed to sudo. https://serverfault.com/questions/478741/sudo-does-not-preserve-tmpdir
1919
# Need to explicitly pass tmpdir in if it exists.

espy/config/running.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/blang/semver"
77
log "github.com/sirupsen/logrus"
88
"io/ioutil"
9+
"os"
910
)
1011

1112
type (
@@ -53,7 +54,9 @@ func parseStaticTLSConfig(staticTLS *TLSStaticCfg) *tls.Config {
5354
if !staticTLS.VerifyCertificate {
5455
tlsConf.InsecureSkipVerify = true
5556
}
56-
if len(staticTLS.CAFile) > 0 {
57+
58+
finfo, err := os.Stat(staticTLS.CAFile)
59+
if err != nil && !finfo.IsDir() {
5760
pem, err := ioutil.ReadFile(staticTLS.CAFile)
5861
if err != nil {
5962
log.WithField("file", staticTLS.CAFile).WithError(err).Error("Could not read CA file")

espy/etc/espy.docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Redis:
1212
Password: "NET_RECEIVER_SECRET_PLACEHOLDER"
1313
# TLS should be enabled if Redis is running on a separate machine
1414
TLS:
15-
Enabled: false
15+
Enable: true
1616
# If set, Espy will check the Redis certificate's hostname and signatures
1717
VerifyCertificate: false
1818
#If set, Espy will use the provided CA file instead of the system's CA's
@@ -30,7 +30,7 @@ Elasticsearch:
3030
Password: ""
3131
# TLS should be enabled if Redis is running on a separate machine
3232
TLS:
33-
Enabled: false
33+
Enable: false
3434
# If set, Espy will check the ES certificate's hostname and signatures
3535
VerifyCertificate: false
3636
#If set, Espy will use the provided CA file instead of the system's CA's

installer/stage/Espy/docker-compose.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

installer/stage/Espy/espy.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

installer/stage/Espy/etc/espy.docker.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

installer/stage/Espy/etc/redis.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)