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)
diff --git a/tests/data/idp1-la/metadata.xml b/tests/data/idp1-la/metadata.xml
new file mode 100644
index 00000000..3330c73d
--- /dev/null
+++ b/tests/data/idp1-la/metadata.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ https://idp1:1998/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+
+ https://idp1:1998/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://idp1:1998/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://idp1:1998/soapEndpoint
+
+
+
diff --git a/tests/data/idp2-la/metadata.xml b/tests/data/idp2-la/metadata.xml
new file mode 100644
index 00000000..24a744ca
--- /dev/null
+++ b/tests/data/idp2-la/metadata.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ https://idp2:2000/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+
+ https://idp2:2000/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://idp2:2000/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://idp2:2000/soapEndpoint
+
+
+
diff --git a/tests/data/idp3-la/metadata.xml b/tests/data/idp3-la/metadata.xml
new file mode 100644
index 00000000..4f84497c
--- /dev/null
+++ b/tests/data/idp3-la/metadata.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ https://idp3:2002/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+
+ https://idp3:2002/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://idp3:2002/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://idp3:2002/soapEndpoint
+
+
+
diff --git a/tests/data/idp4-la/metadata.xml b/tests/data/idp4-la/metadata.xml
new file mode 100644
index 00000000..cacc456b
--- /dev/null
+++ b/tests/data/idp4-la/metadata.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ https://idp4:2004/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+
+ https://idp4:2004/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://idp4:2004/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://idp4:2004/soapEndpoint
+
+
+
diff --git a/tests/data/lecp1-la/metadata.xml b/tests/data/lecp1-la/metadata.xml
new file mode 100644
index 00000000..8f88fa44
--- /dev/null
+++ b/tests/data/lecp1-la/metadata.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ https://lecp1:2014/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+ https://lecp1:2014/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp1:2014/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://lecp1:2014/soapEndpoint
+
+
+
+
+
+ https://lecp1:2014/assertionConsumer
+
+ https://lecp1:2014/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp1:2014/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://lecp1:2014/soapEndpoint
+
+ true
+
+
+
+
diff --git a/tests/data/lecp2-la/metadata.xml b/tests/data/lecp2-la/metadata.xml
new file mode 100644
index 00000000..c8e15612
--- /dev/null
+++ b/tests/data/lecp2-la/metadata.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ https://lecp2:2016/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+ https://lecp2:2016/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp2:2016/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://lecp2:2016/soapEndpoint
+
+
+
+
+
+ https://lecp2:2016/assertionConsumer
+
+ https://lecp2:2016/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp2:2016/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://lecp2:2016/soapEndpoint
+
+ true
+
+
+
+
diff --git a/tests/data/lecp3-la/metadata.xml b/tests/data/lecp3-la/metadata.xml
new file mode 100644
index 00000000..d5cc40f4
--- /dev/null
+++ b/tests/data/lecp3-la/metadata.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ https://lecp3:2018/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+ https://lecp3:2018/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp3:2018/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://lecp3:2018/soapEndpoint
+
+
+
+
+
+ https://lecp3:2018/assertionConsumer
+
+ https://lecp3:2018/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp3:2018/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://lecp3:2018/soapEndpoint
+
+ true
+
+
+
+
diff --git a/tests/data/lecp4-la/metadata.xml b/tests/data/lecp4-la/metadata.xml
new file mode 100644
index 00000000..c1a767b6
--- /dev/null
+++ b/tests/data/lecp4-la/metadata.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ https://lecp4:2020/singleSignOn
+ http://projectliberty.org/profiles/sso-get
+ https://lecp4:2020/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp4:2020/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-http
+
+ https://lecp4:2020/soapEndpoint
+
+
+
+
+
+ https://lecp4:2020/assertionConsumer
+
+ https://lecp4:2020/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://lecp4:2020/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://lecp4:2020/soapEndpoint
+
+ true
+
+
+
+
diff --git a/tests/data/sp1-la/metadata.xml b/tests/data/sp1-la/metadata.xml
new file mode 100644
index 00000000..ec28fa48
--- /dev/null
+++ b/tests/data/sp1-la/metadata.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ https://sp1:2006/assertionConsumer
+
+ https://sp1:2006/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://sp1:2006/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://sp1:2006/soapEndpoint
+
+ true
+
+
+
diff --git a/tests/data/sp2-la/metadata.xml b/tests/data/sp2-la/metadata.xml
new file mode 100644
index 00000000..414799cb
--- /dev/null
+++ b/tests/data/sp2-la/metadata.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ https://sp2:2008/assertionConsumer
+
+ https://sp2:2008/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://sp2:2008/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://sp2:2008/soapEndpoint
+
+ true
+
+
+
diff --git a/tests/data/sp3-la/metadata.xml b/tests/data/sp3-la/metadata.xml
new file mode 100644
index 00000000..1dcedf46
--- /dev/null
+++ b/tests/data/sp3-la/metadata.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ https://sp3:2010/assertionConsumer
+
+ https://sp3:2010/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://sp3:2010/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://sp3:2010/soapEndpoint
+
+ true
+
+
+
diff --git a/tests/data/sp4-la/metadata.xml b/tests/data/sp4-la/metadata.xml
new file mode 100644
index 00000000..221cb870
--- /dev/null
+++ b/tests/data/sp4-la/metadata.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ https://sp4:2012/assertionConsumer
+
+ https://sp4:2012/singleLogout
+ http://projectliberty.org/profiles/slo-idp-soap
+
+ https://sp4:2012/registerNameIdentifier
+ http://projectliberty.org/profiles/rni-sp-soap
+
+ https://sp4:2012/soapEndpoint
+
+ true
+
+
+
diff --git a/tests/login_tests.c b/tests/login_tests.c
index 5750eaec..2a460529 100644
--- a/tests/login_tests.c
+++ b/tests/login_tests.c
@@ -35,16 +35,16 @@ generateIdentityProviderContextDump()
LassoServer *serverContext;
serverContext = lasso_server_new(
- "../examples/data/idp-metadata.xml",
- "../examples/data/idp-public-key.pem",
- "../examples/data/idp-private-key.pem",
- "../examples/data/idp-crt.pem",
+ "../tests/data/idp1-la/metadata.xml",
+ NULL, /* "../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",
lassoSignatureMethodRsaSha1);
lasso_server_add_provider(
serverContext,
- "../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");
return lasso_server_dump(serverContext);
}
@@ -54,16 +54,16 @@ generateServiceProviderContextDump()
LassoServer *serverContext;
serverContext = lasso_server_new(
- "../examples/data/sp-metadata.xml",
- "../examples/data/sp-public-key.pem",
- "../examples/data/sp-private-key.pem",
- "../examples/data/sp-crt.pem",
+ "../tests/data/sp1-la/metadata.xml",
+ NULL, /* "../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",
lassoSignatureMethodRsaSha1);
lasso_server_add_provider(
serverContext,
- "../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");
return lasso_server_dump(serverContext);
}
@@ -114,8 +114,7 @@ START_TEST(test02_serviceProviderLogin)
lasso_lib_authn_request_set_consent(request, lassoLibConsentObtained);
relayState = "fake";
lasso_lib_authn_request_set_relayState(request, "fake");
- rc = lasso_login_build_authn_request_msg(spLoginContext,
- "https://identity-provider:1998/liberty-alliance/metadata");
+ rc = lasso_login_build_authn_request_msg(spLoginContext, "https://idp1/metadata");
fail_unless(rc == 0, "lasso_login_build_authn_request_msg failed");
authnRequestUrl = LASSO_PROFILE(spLoginContext)->msg_url;
fail_unless(authnRequestUrl != NULL,