Commit 2214522b authored by ale's avatar ale
Browse files

Add a custom mod_sso test

Matches a specific production config that needed to be tested.
parent f3d09f8c
......@@ -261,12 +261,12 @@ class HttpdIntegrationTestBase(unittest.TestCase):
name, check["url"], location, check["location"]))
def _login_workflow(self, host_header, url, sso_service=None, sso_login_url=None):
if not sso_login_url:
sso_login_url = "/sso_login"
if not sso_service:
sso_service = host_header + os.path.dirname(url)
if not sso_service.endswith('/'):
sso_service += '/'
if not sso_login_url:
sso_login_url = '/%s/sso_login' % sso_service.split('/', 1)[1]
cookies = Cookie.SimpleCookie()
......@@ -418,6 +418,14 @@ class WebmailIntegrationTestWithNonces(HttpdIntegrationTestBase):
def test_login_workflow(self):
self._login_workflow("", "/index.html")
class SubdirIntegrationTest(HttpdIntegrationTestBase):
CONFIG = 'test-httpd-subdir.conf'
def test_subdir(self):
self._login_workflow("", "/protected/index.html")
if __name__ == "__main__":
LoadModule mpm_worker_module /usr/lib/apache2/modules/
LoadModule auth_basic_module ${MODULEDIR}/
LoadModule authn_core_module ${MODULEDIR}/
LoadModule authz_core_module ${MODULEDIR}/
LoadModule authz_user_module ${MODULEDIR}/
LoadModule unique_id_module ${MODULEDIR}/
LoadModule sso_module ${TESTROOT}/../.libs/
LoadModule cgi_module /usr/lib/apache2/modules/
ServerName test
PidFile ${TESTROOT}/
Mutex file:${TESTROOT} default
ErrorLog ${APACHE_LOG}
LogLevel debug
SSOPublicKeyFile ${TESTROOT}/public.key
SSOSessionKeyFile ${TESTROOT}/session.key
DocumentRoot ${TESTROOT}/htdocs
<Directory "${TESTROOT}/htdocs">
require all granted
<Location "/protected">
AuthType SSO
AuthName test
require valid-user
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment