summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-11-12 16:35:24 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-11-19 17:20:07 (GMT)
commit790877831410ca99c1cf2dc63cae9c34e621fd61 (patch)
treee1c0a1718f46bda3f4a2aefe75c9a972d04ed8f4
parent6d141d869b445605f62c15b7b05d90c5dc2eed9f (diff)
downloadauthentic2-supann-0.27.zip
authentic2-supann-0.27.tar.gz
authentic2-supann-0.27.tar.bz2
misc: update settings for py3 and move then into settings.dv0.27
-rw-r--r--10supann-settings.py (renamed from config.py)16
-rw-r--r--debian/conffiles1
-rw-r--r--debian/cron.d2
-rw-r--r--debian/install2
-rwxr-xr-xload-multiple-federations.sh4
5 files changed, 13 insertions, 12 deletions
diff --git a/config.py b/10supann-settings.py
index 717c780..72f0404 100644
--- a/config.py
+++ b/10supann-settings.py
@@ -8,11 +8,13 @@ REGISTRATION_OPEN = False
A2_REGISTRATION_CAN_CHANGE_PASSWORD = False
A2_REGISTRATION_CAN_DELETE_ACCOUNT = False
-SAML_SIGNATURE_PUBLIC_KEY = file('/etc/authentic2/cert.pem').read()
-SAML_SIGNATURE_PRIVATE_KEY = file('/etc/authentic2/key.pem').read()
+with open('/etc/authentic2/cert.pem') as fd:
+ SAML_SIGNATURE_PUBLIC_KEY = fd.read()
-SUPANN_LDAP_EXTRA_ATTRIBUTES = filter(None,
- os.environ.get('SUPANN_LDAP_EXTRA_ATTRIBUTES', '').split())
+with open('/etc/authentic2/key.pem') as fd:
+ SAML_SIGNATURE_PRIVATE_KEY = fd.read()
+
+SUPANN_LDAP_EXTRA_ATTRIBUTES = list(filter(None, os.environ.get('SUPANN_LDAP_EXTRA_ATTRIBUTES', '').split()))
LDAP_AUTH_SETTINGS = [
{
@@ -125,9 +127,9 @@ LDAP_AUTH_SETTINGS = [
] + SUPANN_LDAP_EXTRA_ATTRIBUTES,
'attribute_mappings': (('mail', 'email'),),
'mandatory_attributes_values': {
- # edugain support
- 'schacHomeOrganization': [os.environ['EDUGAIN_SCHAC_HOME_ORGANIZATION']],
- 'schacHomeOrganizationtype': [os.environ['EDUGAIN_SCHAC_HOME_ORGANIZATION_TYPE']],
+ # edugain support
+ 'schacHomeOrganization': [os.environ['EDUGAIN_SCHAC_HOME_ORGANIZATION']],
+ 'schacHomeOrganizationtype': [os.environ['EDUGAIN_SCHAC_HOME_ORGANIZATION_TYPE']],
},
}
]
diff --git a/debian/conffiles b/debian/conffiles
index 6077f46..970cfed 100644
--- a/debian/conffiles
+++ b/debian/conffiles
@@ -1,2 +1 @@
/etc/authentic2/supann.conf
-/etc/authentic2/config.py
diff --git a/debian/cron.d b/debian/cron.d
index 96ae901..8bc91a8 100644
--- a/debian/cron.d
+++ b/debian/cron.d
@@ -2,5 +2,5 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
-*/30 * * * * authentic /usr/lib/authentic2-supann/load-multiple-federations.sh
+*/30 * * * * authentic2 /usr/lib/authentic2-supann/load-multiple-federations.sh
diff --git a/debian/install b/debian/install
index ae7ad87..655955a 100644
--- a/debian/install
+++ b/debian/install
@@ -1,4 +1,4 @@
-config.py /etc/authentic2
+10supann-settings.py /etc/authentic2/settings.d
update-renater-meta.sh /usr/lib/authentic2-supann
load-multiple-federations.sh /usr/lib/authentic2-supann
supann.conf /etc/authentic2
diff --git a/load-multiple-federations.sh b/load-multiple-federations.sh
index 0e9914e..73cde46 100755
--- a/load-multiple-federations.sh
+++ b/load-multiple-federations.sh
@@ -64,10 +64,10 @@ chmod +r $FIXTURE_TMP
chmod +r $METADATA_TMP
# Load fixture
-/usr/bin/authentic2-ctl loaddata -v0 $FIXTURE_TMP
+/usr/bin/authentic2-manage loaddata -v0 $FIXTURE_TMP
# Load metadata
-/usr/bin/authentic2-ctl sync-metadata --source=$SOURCE --sp -v1 $METADATA_TMP
+/usr/bin/authentic2-manage sync-metadata --source=$SOURCE --sp -v1 $METADATA_TMP
rm -f $METADATA_TMP $FIXTURE_TMP
}