summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2004-08-12 22:25:36 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2004-08-12 22:25:36 +0000
commitcddb5d33dab673e1e8a97b6c26b46494fc289dc8 (patch)
treedacc767b165f45ac2f590bd610566ac26542c500 /python
parentcb09ccbcee42ddee05e30bdfdb0b96c64b9cf940 (diff)
downloadlasso-cddb5d33dab673e1e8a97b6c26b46494fc289dc8.tar.gz
lasso-cddb5d33dab673e1e8a97b6c26b46494fc289dc8.tar.xz
lasso-cddb5d33dab673e1e8a97b6c26b46494fc289dc8.zip
Added metadata corresponding to new certificates.
Updated non regression tests to use these certificates and metadata.
Diffstat (limited to 'python')
-rw-r--r--python/tests/LibertyEnabledProxy.py3
-rw-r--r--python/tests/login_tests.py43
2 files changed, 24 insertions, 22 deletions
diff --git a/python/tests/LibertyEnabledProxy.py b/python/tests/LibertyEnabledProxy.py
index 0c81ad2d..8c5eb2de 100644
--- a/python/tests/LibertyEnabledProxy.py
+++ b/python/tests/LibertyEnabledProxy.py
@@ -35,15 +35,18 @@ class LibertyEnabledProxyMixin(IdentityProviderMixin, ServiceProviderMixin):
def login(self, handler):
# Before, this proxy was considered as an identity provider. Now it is a service provider.
+ # FIXME: Handle Liberty ProxyCount.
return ServiceProviderMixin.login(self, handler)
def login_failed(self, handler):
# Before, this proxy was considered as a service provider. Now it acts again as an identity
# provider.
+ # FIXME: Handle Liberty ProxyCount.
return self.login_done(handler, False, None)
def assertionConsumer_done(self, handler):
# Before, this proxy was considered as a service provider. Now it acts again as an identity
# provider.
# FIXME: We should retrieve authentication method from session.lassoSessionDump.
+ # FIXME: Handle Liberty ProxyCount.
return self.login_done(handler, True, lasso.samlAuthenticationMethodPassword)
diff --git a/python/tests/login_tests.py b/python/tests/login_tests.py
index 5f69f903..17727750 100644
--- a/python/tests/login_tests.py
+++ b/python/tests/login_tests.py
@@ -41,19 +41,19 @@ from websimulator import *
class LoginTestCase(unittest.TestCase):
def generateIdpSite(self, internet):
- site = IdentityProvider(internet, 'https://identity-provider/')
- site.providerId = 'https://identity-provider/metadata'
+ site = IdentityProvider(internet, 'https://idp1')
+ site.providerId = 'https://idp1/metadata'
lassoServer = lasso.Server.new(
- '../../examples/data/idp-metadata.xml',
- None, # '../../examples/data/idp-public-key.pem' is no more used
- '../../examples/data/idp-private-key.pem',
- '../../examples/data/idp-crt.pem',
+ '../../tests/data/idp1-la/metadata.xml',
+ None, # '../../tests/data/idp1-la/public-key.pem' is no more used
+ '../../tests/data/idp1-la/private-key-raw.pem',
+ '../../tests/data/idp1-la/certificate.pem',
lasso.signatureMethodRsaSha1)
lassoServer.add_provider(
- '../../examples/data/sp-metadata.xml',
- '../../examples/data/sp-public-key.pem',
- '../../examples/data/ca-crt.pem')
+ '../../tests/data/sp1-la/metadata.xml',
+ '../../tests/data/sp1-la/public-key.pem',
+ '../../tests/data/ca1-la/certificate.pem')
site.lassoServerDump = lassoServer.dump()
failUnless(site.lassoServerDump)
lassoServer.destroy()
@@ -69,28 +69,28 @@ class LoginTestCase(unittest.TestCase):
clientProxy = LibertyEnabledClientProxy(internet)
lassoServer = lasso.Server.new()
lassoServer.add_provider(
- '../../examples/data/idp-metadata.xml',
- '../../examples/data/idp-public-key.pem',
- '../../examples/data/ca-crt.pem')
+ '../../tests/data/idp1-la/metadata.xml',
+ '../../tests/data/idp1-la/public-key.pem',
+ '../../tests/data/ca1-la/certificate.pem')
clientProxy.lassoServerDump = lassoServer.dump()
failUnless(clientProxy.lassoServerDump)
lassoServer.destroy()
return clientProxy
def generateSpSite(self, internet):
- site = ServiceProvider(internet, 'https://service-provider/')
+ site = ServiceProvider(internet, 'https://sp1')
site.providerId = 'https://service-provider/metadata'
lassoServer = lasso.Server.new(
- '../../examples/data/sp-metadata.xml',
- None, # '../../examples/data/sp-public-key.pem' is no more used.
- '../../examples/data/sp-private-key.pem',
- '../../examples/data/sp-crt.pem',
+ '../../tests/data/sp1-la/metadata.xml',
+ None, # '../../tests/data/sp1-la/public-key.pem' is no more used
+ '../../tests/data/sp1-la/private-key-raw.pem',
+ '../../tests/data/sp1-la/certificate.pem',
lasso.signatureMethodRsaSha1)
lassoServer.add_provider(
- '../../examples/data/idp-metadata.xml',
- '../../examples/data/idp-public-key.pem',
- '../../examples/data/ca-crt.pem')
+ '../../tests/data/idp1-la/metadata.xml',
+ '../../tests/data/idp1-la/public-key.pem',
+ '../../tests/data/ca1-la/certificate.pem')
site.lassoServerDump = lassoServer.dump()
failUnless(site.lassoServerDump)
lassoServer.destroy()
@@ -275,8 +275,7 @@ class LoginTestCase(unittest.TestCase):
lecp = self.generateLibertyEnabledClientProxy(internet)
lecp.idpSite = idpSite
- # Try LECP, but the principal is not authenticated on identity-provider. So, LECP must
- # fail.
+ # Try LECP, but the principal is not authenticated on idp1. So, LECP must fail.
httpResponse = lecp.login(principal, spSite, '/login')
failUnlessEqual(httpResponse.statusCode, 401)