make web secret random

This commit is contained in:
Trevor Batley 2023-11-18 14:16:17 +11:00
parent 452588882e
commit 1690d98814

View File

@ -104,6 +104,8 @@ fi
dnf install -y mod_ssl koji-web $QUIET dnf install -y mod_ssl koji-web $QUIET
# install locally # install locally
# create secret
SECRET="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32)"
mkdir -p /etc/kojiweb mkdir -p /etc/kojiweb
cat > /etc/kojiweb/web.conf <<- EOF cat > /etc/kojiweb/web.conf <<- EOF
[web] [web]
@ -114,7 +116,7 @@ WebCert = $KOJI_PKI_DIR/kojiweb.pem
ClientCA = $KOJI_PKI_DIR/koji_ca_cert.crt ClientCA = $KOJI_PKI_DIR/koji_ca_cert.crt
KojiHubCA = $KOJI_PKI_DIR/koji_ca_cert.crt KojiHubCA = $KOJI_PKI_DIR/koji_ca_cert.crt
LoginTimeout = 72 LoginTimeout = 72
Secret = NITRA_IS_NOT_CLEAR Secret = "$SECRET"
LibPath = /usr/share/koji-web/lib LibPath = /usr/share/koji-web/lib
LiteralFooter = True LiteralFooter = True
EOF EOF