plugins/auth-backend: add script for starting up saml test idp

This commit is contained in:
Patrik Oldsberg
2020-06-02 11:18:36 +02:00
parent 3573c74fca
commit 397e670a2e
6 changed files with 65 additions and 47 deletions
+1
View File
@@ -0,0 +1 @@
*.pem
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
if [[ ! -f idp-public-cert.pem ]]; then
echo "Generating new SAML Certificates"
openssl req \
-x509 \
-newkey rsa:1024 \
-days 3650 \
-nodes \
-subj '/CN=localhost' \
-keyout "idp-private-key.pem" \
-out "idp-public-cert.pem"
fi
echo "Downloading and starting SAML-IdP"
export NPM_CONFIG_REGISTRY=https://registry.npmjs.org
exec npx saml-idp --acsUrl "http://localhost:3003/auth/saml/handler/frame" --audience "http://localhost:3003"