summaryrefslogtreecommitdiffstats
path: root/authentic/admin/settings.ptl
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2007-08-21 17:25:13 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2007-08-21 17:25:13 (GMT)
commitf46ce9bd712f78edfddde1a033f6e24dfc83a074 (patch)
tree76978bf08a90e843954255b4687709b05fc1f5f5 /authentic/admin/settings.ptl
parente9eb66c0253b1743ebde2cef5cb60402ca613d64 (diff)
downloadauthentic-old-f46ce9bd712f78edfddde1a033f6e24dfc83a074.zip
authentic-old-f46ce9bd712f78edfddde1a033f6e24dfc83a074.tar.gz
authentic-old-f46ce9bd712f78edfddde1a033f6e24dfc83a074.tar.bz2
possibility to set SOAP endpoints on different URLs, useful to get soap
requests on another hostname running https with client certificate authentication on.
Diffstat (limited to 'authentic/admin/settings.ptl')
-rw-r--r--authentic/admin/settings.ptl25
1 files changed, 19 insertions, 6 deletions
diff --git a/authentic/admin/settings.ptl b/authentic/admin/settings.ptl
index 3b34aa1..d950858 100644
--- a/authentic/admin/settings.ptl
+++ b/authentic/admin/settings.ptl
@@ -1028,16 +1028,22 @@ class SettingsDirectory(Directory):
def idp [html] (self):
get_publisher().reload_cfg()
base_url = get_cfg('idp', {}).get('base_url', None)
+ base_soap_url = get_cfg('idp', {}).get('base_soap_url', base_url)
saml2_base_url = get_cfg('idp', {}).get('saml2_base_url', None)
+ saml2_base_soap_url = get_cfg('idp', {}).get('saml2_base_soap_url', saml2_base_url)
req = get_request()
if not base_url:
base_url = '%s://%s%s' % (req.get_scheme(), req.get_server(),
req.environ['SCRIPT_NAME'] + '/liberty')
+ soap_base_url = '%s://%s%s' % (req.get_scheme(), req.get_server(),
+ req.environ['SCRIPT_NAME'] + '/liberty')
if lasso.SAML2_SUPPORT and not saml2_base_url:
saml2_base_url = '%s://%s%s' % (req.get_scheme(), req.get_server(),
req.environ['SCRIPT_NAME'] + '/saml')
+ saml2_base_soap_url = '%s://%s%s' % (req.get_scheme(), req.get_server(),
+ req.environ['SCRIPT_NAME'] + '/saml')
form = Form(enctype='multipart/form-data')
if lasso.SAML2_SUPPORT:
@@ -1046,17 +1052,23 @@ class SettingsDirectory(Directory):
value = get_cfg('idp', {}).get('providerid', base_url + '/metadata'))
form.add(StringWidget, 'base_url', title=_('Liberty Base URL'), size=50, required=True,
value = base_url)
+ form.add(StringWidget, 'base_soap_url', title=_('Liberty SOAP Base URL'),
+ size=50, required=True, value = base_soap_url)
form.add(StringWidget, 'saml2_providerid', title=_('SAML 2.0 Provider ID'),
size=50, required=True,
value = get_cfg('idp', {}).get(
'saml2_providerid', saml2_base_url + '/metadata'))
form.add(StringWidget, 'saml2_base_url', title=_('SAML 2.0 Base URL'),
size=50, required=True, value = saml2_base_url)
+ form.add(StringWidget, 'saml2_base_soap_url', title=_('SAML 2.0 SOAP Base URL'),
+ size=50, required=True, value = saml2_base_soap_url)
else:
form.add(StringWidget, 'providerid', title=_('Provider ID'), size=50, required=True,
value = get_cfg('idp', {}).get('providerid', base_url + '/metadata'))
form.add(StringWidget, 'base_url', title=_('Base URL'), size=50, required=True,
value = base_url)
+ form.add(StringWidget, 'base_soap_url', title=_('SOAP Base URL'), size=50, required=True,
+ value = base_soap_url)
form.add(StringWidget, 'organization_name', title=_('Organisation Name'), size=50,
value = get_cfg('idp', {}).get('organization_name', None))
@@ -1120,6 +1132,7 @@ class SettingsDirectory(Directory):
old_common_domain_setter_url = get_publisher().cfg['idp'].get('common_domain_setter_url')
for k in ('providerid', 'base_url', 'organization_name', 'common_domain',
'idff_proxy', 'idsis_pp', 'saml2_providerid', 'saml2_base_url',
+ 'base_soap_url', 'saml2_base_soap_url',
'common_domain_setter_url'):
w = form.get_widget(k)
if w:
@@ -1224,7 +1237,7 @@ class SettingsDirectory(Directory):
idp_key = ''
idp_body = """
- <SoapEndpoint>%(base_url)s/soapEndpoint</SoapEndpoint>
+ <SoapEndpoint>%(base_soap_url)s/soapEndpoint</SoapEndpoint>
<SingleLogoutServiceURL>%(base_url)s/singleLogout</SingleLogoutServiceURL>
<SingleLogoutServiceReturnURL>%(base_url)s/singleLogoutReturn</SingleLogoutServiceReturnURL>
@@ -1260,7 +1273,7 @@ class SettingsDirectory(Directory):
sp = """
<SPDescriptor protocolSupportEnumeration="urn:liberty:iff:2003-08">
- <SoapEndpoint>%(base_url)s/proxySoapEndpoint</SoapEndpoint>
+ <SoapEndpoint>%(base_soap_url)s/proxySoapEndpoint</SoapEndpoint>
<SingleLogoutServiceURL>%(base_url)s/proxySingleLogout</SingleLogoutServiceURL>
<SingleLogoutServiceReturnURL>%(base_url)s/proxySingleLogoutReturn</SingleLogoutServiceReturnURL>
@@ -1350,17 +1363,17 @@ class SettingsDirectory(Directory):
idp_body = """
<ArtifactResolutionService isDefault="true" index="0"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
- Location="%(saml2_base_url)s/artifact" />
+ Location="%(saml2_base_soap_url)s/artifact" />
<SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
- Location="%(saml2_base_url)s/singleLogoutSOAP" />
+ Location="%(saml2_base_soap_url)s/singleLogoutSOAP" />
<SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="%(saml2_base_url)s/singleLogout"
ResponseLocation="%(saml2_base_url)s/singleLogoutReturn" />
<ManageNameIDService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
- Location="%(saml2_base_url)s/manageNameIdSOAP" />
+ Location="%(saml2_base_soap_url)s/manageNameIdSOAP" />
<ManageNameIDService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="%(saml2_base_url)s/manageNameId"
@@ -1370,7 +1383,7 @@ class SettingsDirectory(Directory):
Location="%(saml2_base_url)s/singleSignOn" />
<SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
- Location="%(saml2_base_url)s/singleSignOnSOAP" />
+ Location="%(saml2_base_soap_url)s/singleSignOnSOAP" />
</IDPSSODescriptor>""" % get_publisher().cfg['idp']
if get_publisher().cfg['idp'].get('organization_name'):