Skip to content

Commit 68b6b5a

Browse files
committed
Fix for problem discovered by @Xizzor, where GPG key was empty and not actually being created in latest version
1 parent b063e3b commit 68b6b5a

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ git clone https://github.com/harvard-itsecurity/docker-misp.git
4545
cd docker-misp
4646
4747
# modify build.sh, specifically for:
48-
# 1.) all passwords (MYSQL)
48+
# 1.) all passwords (MYSQL, GPG)
4949
# 2.) change at LEAST "MISP_FQDN" to your FQDN (domain)
5050
5151
# Build the docker image - will take a bit, but it's a one time thing!
@@ -98,6 +98,7 @@ You can customize the ```build.sh``` script to pass custom:
9898
* POSTFIX_RELAY_HOST
9999
* MISP_FQDN
100100
* MISP_EMAIL
101+
* MISP_GPG_PASSWORD
101102

102103
See build.sh for an example on how to customize and build your own image with custom defaults.
103104

@@ -137,5 +138,7 @@ Jeremy Barlow: @jbarlow-mcafee - Cleanup, configs, conveniences, python 2 vs 3 c
137138

138139
Matt Saunders: @matt-saunders - Fixed all install warnings and errors
139140

141+
Matija Čoklica: @XizzoR - Discovered problem where GPG key was empty
142+
140143
# Help/Questions/Comments:
141144
For help or more info, feel free to contact Ventz Petkov: [email protected]

build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ docker build \
66
--build-arg POSTFIX_RELAY_HOST=localhost \
77
--build-arg MISP_FQDN=localhost \
88
--build-arg MISP_EMAIL=admin@localhost \
9+
--build-arg MISP_GPG_PASSWORD=ChangeThisDefaultPasswordXuJBao5Q2bps89LWFqWkKgDZwAFpNHvc \
910
-t harvarditsecurity/misp container

container/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ARG MYSQL_MISP_PASSWORD=ChangeThisDefaultPassworda9564ebc3289b7a14551baf8ad5ec60
66
ARG POSTFIX_RELAY_HOST=localhost
77
ARG MISP_FQDN=localhost
88
ARG MISP_EMAIL=admin@localhost
9+
ARG MISP_GPG_PASSWORD=ChangeThisDefaultPasswordXuJBao5Q2bps89LWFqWkKgDZwAFpNHvc
910

1011
# Dir you need to override to keep data on reboot/new container:
1112
VOLUME /var/lib/mysql
@@ -181,11 +182,13 @@ RUN sed -i -e 's/db login/misp/g' /var/www/MISP/app/Config/database.php ; \
181182
echo "Name-Real: MISP" >> /tmp/config_gpg ; \
182183
echo "Name-Email: $MISP_EMAIL" >> /tmp/config_gpg ; \
183184
echo "Expire-Date: 0" >> /tmp/config_gpg ; \
185+
#echo "%no-protection" >> /tmp/config_gpg ; \
186+
echo "Passphrase: $MISP_GPG_PASSWORD" >> /tmp/config_gpg ; \
184187
chmod 700 /tmp/config_gpg ; \
185188
sudo rm -f /dev/random ; \
186189
sudo mknod -m 0666 /dev/random c 1 9 ; \
187-
sudo echo RNGDOPTIONS="--random-device /dev/urandom --rng-device /dev/urandom" | sudo tee /etc/default/rng-tools ; \
188-
sudo echo HRNGDEVICE=/dev/urandom | sudo tee /etc/default/rng-tools ; \
190+
#sudo echo RNGDOPTIONS="--random-device /dev/urandom --rng-device /dev/urandom" | sudo tee /etc/default/rng-tools ; \
191+
sudo echo HRNGDEVICE=/dev/urandom | sudo tee -a /etc/default/rng-tools ; \
189192
sudo /etc/init.d/rng-tools restart ; \
190193
sudo rngd -f -r /dev/urandom ; \
191194
chown www-data /tmp/config_gpg ; \

0 commit comments

Comments
 (0)