fix + feat: working JWT auth for slurm restd and other daemons

This commit is contained in:
Aditya Ujeniya
2024-10-27 23:41:19 +01:00
parent 07b09a82bb
commit 255f05bee7
10 changed files with 115 additions and 93 deletions

View File

@@ -74,14 +74,17 @@ _slurmdbd() {
fi
echo "checking for jwt.key"
while [ ! -f /.secret/jwt.key ]; do
while [ ! -f /.secret/jwt_hs256.key ]; do
echo "."
sleep 1
done
cp /.secret/jwt.key /etc/config/jwt.key
chown slurm: /etc/config/jwt.key
chmod 0400 /etc/config/jwt.key
mkdir -p /var/spool/slurm/statesave
chown slurm:slurm /var/spool/slurm/statesave
chmod 0755 /var/spool/slurm/statesave
cp /.secret/jwt_hs256.key /var/spool/slurm/statesave/jwt_hs256.key
chown slurm: /var/spool/slurm/statesave/jwt_hs256.key
chmod 0600 /var/spool/slurm/statesave/jwt_hs256.key
echo ""

View File

@@ -15,7 +15,7 @@
AuthType=auth/munge
#AuthInfo=/var/run/munge/munge.socket.2
AuthAltTypes=auth/jwt
AuthAltParameters=jwt_key=/etc/config/jwt.key
AuthAltParameters=jwt_key=/var/spool/slurm/statesave/jwt_hs256.key
# slurmDBD info
DbdAddr=slurmdbd
DbdHost=slurmdbd