From 26144a23f94c9cbddeb2ec2ba7d2513bb347ea8f Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 28 Jun 2021 16:45:18 -0400 Subject: minor fixes, mostly cosmetic --- INTERACT.md | 5 +++++ session_app.py | 1 + templates/index.html | 4 ++-- templates/login_form.html | 1 + templates/settings.html | 1 + templates/view.html | 3 +++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/INTERACT.md b/INTERACT.md index 0ead9fe..1a770f0 100644 --- a/INTERACT.md +++ b/INTERACT.md @@ -57,3 +57,8 @@ Basic auth can be provided as a POST to /login/basic/. success with ldap $ curl -X POST -L http://d2-03a:5000/login/basic/ -b ~/cookiejar.txt -c ~/cookiejar.txt --header "Authorization: Basic $( printf '%s' "${username}:${pw}" | base64 )" success with ldap + +To set any settings that are currently supported by the /protected/settings/ page, you need to be a member of the ldap group "admins." + + $ curl -L http://d2-03a:5000/protected/settings/ -b ~/cookiejar.txt -c ~/cookiejar.txt -X POST --data 'ldap_uri=ldaps://dns1.ipa.example.com' + Settings updated:
diff --git a/session_app.py b/session_app.py index 1743b2a..e49ad53 100755 --- a/session_app.py +++ b/session_app.py @@ -386,6 +386,7 @@ def protected_settings(user,groups): if 'LDAP_HOSTS' in app.config: app.config.pop('LDAP_HOSTS') message += "
  • LDAP_URI
  • " + print(f"Updated setting: LDAP_URI") if "" != message: message = "Settings updated:" message += f"
    " diff --git a/templates/index.html b/templates/index.html index daa6893..27b3a7e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,10 +1,10 @@ Front page + Welcome to this sample application! To access protected pages you need to log in. Accepted methods are kerberos and ldap. - -{{ session }} +

    {{ session }} diff --git a/templates/login_form.html b/templates/login_form.html index 254d45c..b3d5a3b 100644 --- a/templates/login_form.html +++ b/templates/login_form.html @@ -1,6 +1,7 @@ Login Form +

    diff --git a/templates/settings.html b/templates/settings.html index 884ea04..994a8b2 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,6 +1,7 @@ Session_app settings +