Skip to content

Commit

Permalink
feat(image): pull otp and super_gluu configuration from secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli committed Feb 8, 2022
1 parent fa550f4 commit 2242843
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
28 changes: 28 additions & 0 deletions docker-casa/scripts/auth_conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os

from jans.pycloudlib import get_manager

import logging.config
from settings import LOGGING_CONFIG

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("entrypoint")


manager = get_manager()


def pull_auth_conf():
conf_files = (
"otp_configuration.json",
"super_gluu_creds.json",
)
for conf_file in conf_files:
file_ = f"/etc/certs/{conf_file}"
secret_name = os.path.splitext(conf_file)[0]
logger.info(f"Pulling {file_} from secrets")
manager.secret.to_file(secret_name, file_)


if __name__ == "__main__":
pull_auth_conf()
3 changes: 1 addition & 2 deletions docker-casa/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ wget -q ${CASA_PLUGIN_REPO}/strong-authn-settings/${GLUU_VERSION}/strong-authn-s
# ==========

python3 /app/scripts/wait.py

python3 /app/scripts/bootstrap.py

# python3 /app/scripts/jca_sync.py &
python3 /app/scripts/auth_conf.py

# run Casa server
cd /opt/jans/jetty/casa
Expand Down

0 comments on commit 2242843

Please sign in to comment.