Skip to content

Commit 542b20f

Browse files
authored
feat(encryption): enable at-rest encryption by default (#29)
* feat(encryption): enable at-rest encryption by default * remove unused testing file * configurable filer allowed origins
1 parent ff64237 commit 542b20f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cryostat-entrypoint.bash

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,28 @@ STORAGE_CAPACITY=${STORAGE_CAPACITY:-${AVAILABLE_DISK_BYTES}}
6363
STORAGE_CAPACITY_BYTES=$(echo "${STORAGE_CAPACITY}" | numfmt --from=iec --suffix=B | tr -d 'B')
6464
VOLUME_SIZE_BYTES=$(( "${STORAGE_CAPACITY_BYTES}" / "${NUM_VOLUMES}" ))
6565

66+
FLAGS=(
67+
"-filer.allowedOrigins=${FILER_ORIGINS:-0.0.0.0}"
68+
)
69+
70+
if [ "${DIR_LISTING_ENABLE:-0}" != 1 ]; then
71+
FLAGS+=(
72+
"-filer.exposeDirectoryData=false"
73+
"-filer.disableDirListing"
74+
"-webdav=false"
75+
)
76+
fi
77+
78+
if [ "${REST_ENCRYPTION_ENABLE:-1}" = 1 ]; then
79+
FLAGS+=("-filer.encryptVolumeData")
80+
fi
81+
6682
exec weed -logtostderr=true server \
6783
-dir="${DATA_DIR}" \
6884
-volume.max=${NUM_VOLUMES} \
6985
-volume.fileSizeLimitMB="${FILE_SIZE_LIMIT_MB:-4096}" \
7086
-master.volumeSizeLimitMB="$(( "${VOLUME_SIZE_BYTES}" / 1024 / 1024 ))" \
7187
-master.volumePreallocate="${VOLUME_PREALLOCATE:-false}" \
88+
${FLAGS[*]} \
7289
-s3 -s3.config="${cfg}" \
7390
"$@"

0 commit comments

Comments
 (0)