You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cr...@apache.org on 2021/02/26 23:37:40 UTC

[sling-whiteboard] branch SLING-9397/improve-test-coverage updated: cont'd with SAML2 tests after initializing OpenSAML in OsgiSamlTest.java

This is an automated email from the ASF dual-hosted git repository.

cris pushed a commit to branch SLING-9397/improve-test-coverage
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/SLING-9397/improve-test-coverage by this push:
     new 36db90f  cont'd with SAML2 tests after initializing OpenSAML in OsgiSamlTest.java
36db90f is described below

commit 36db90feae75973df7e808bcf2eef0f85d5ddfac
Author: Cris Rockwell, College of LSA University of Michigan <cm...@umich.edu>
AuthorDate: Fri Feb 26 18:37:10 2021 -0500

    cont'd with SAML2 tests after initializing OpenSAML in OsgiSamlTest.java
---
 .../org/apache/sling/auth/saml2/Activator.java     | 42 ++++-------
 .../saml2/impl/AuthenticationHandlerSAML2Impl.java |  6 +-
 .../java/org/apache/sling/auth/saml2/JCETest.java  |  2 +
 .../impl/AuthenticationHandlerSAML2ImplTest.java   | 17 +++++
 .../apache/sling/auth/saml2/impl/OsgiSamlTest.java | 85 +++++++++++++++-------
 .../sling/auth/saml2/impl/SamlHandlerIT.java       | 76 +++++++------------
 6 files changed, 119 insertions(+), 109 deletions(-)

diff --git a/saml-handler/src/main/java/org/apache/sling/auth/saml2/Activator.java b/saml-handler/src/main/java/org/apache/sling/auth/saml2/Activator.java
index 4f19423..0c3845f 100644
--- a/saml-handler/src/main/java/org/apache/sling/auth/saml2/Activator.java
+++ b/saml-handler/src/main/java/org/apache/sling/auth/saml2/Activator.java
@@ -53,39 +53,13 @@ public class Activator implements BundleActivator {
         Thread thread = Thread.currentThread();
         thread.setContextClassLoader(InitializationService.class.getClassLoader());
         try {
-            InitializationService.initialize();
-        } finally {
-            thread.setContextClassLoader(loader);
-        }
-
-        logger.info("Activating Apache Sling SAML2 SP Bundle. And Initializing JCE, Java Cryptographic Extension");
-        JavaCryptoValidationInitializer jcvi = new JavaCryptoValidationInitializer();
-        try {
-            jcvi.init();
-            for (Provider jceProvider : Security.getProviders()) {
-                logger.info(jceProvider.getInfo());
-            }
+            initializeOpenSaml();
         } catch (InitializationException e) {
             throw new SAML2RuntimeException("Java Cryptographic Extension could not initialize. " +
                     "This happens when JCE implementation is incomplete, and not meeting OpenSAML standards.", e);
+        } finally {
+            thread.setContextClassLoader(loader);
         }
-
-/*
-TODO: What is the proper way around this classloading problem?
-One suggestion in this post
-https://medium.com/@dehami.deshan/commencing-migration-towards-the-checked-flag-opensaml-3-cc62d3faa3b0
-
-...fixes a issue similar to what is discussed below
-https://shibboleth.1660669.n2.nabble.com/Null-returned-by-XMLObjectProviderRegistrySupport-getBuilderFactory-td7643173.html
-
-...and here
-https://stackoverflow.com/questions/37948303/opensaml3-resource-not-found-default-config-xml-in-osgi-container
-
-...and here
-https://stackoverflow.com/questions/2198928/better-handling-of-thread-context-classloader-in-osgi?noredirect=1&lq=1
-
-*/
-
     }
 
     public void stop(BundleContext context) throws Exception {
@@ -109,4 +83,14 @@ https://stackoverflow.com/questions/2198928/better-handling-of-thread-context-cl
             logger.error("Error encountered creating JKS", e);
         }
     }
+
+    public static void initializeOpenSaml() throws InitializationException{
+        JavaCryptoValidationInitializer jcvi = new JavaCryptoValidationInitializer();
+        jcvi.init();
+        InitializationService.initialize();
+        logger.info("Activating Apache Sling SAML2 SP Bundle. And Initializing JCE, Java Cryptographic Extension");
+        for (Provider jceProvider : Security.getProviders()) {
+            System.out.print(jceProvider.getInfo());
+        }
+    }
 }
\ No newline at end of file
diff --git a/saml-handler/src/main/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2Impl.java b/saml-handler/src/main/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2Impl.java
index b0cc482..81d3720 100644
--- a/saml-handler/src/main/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2Impl.java
+++ b/saml-handler/src/main/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2Impl.java
@@ -57,7 +57,6 @@ import org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoCredentialResolver;
 import org.opensaml.xmlsec.signature.support.SignatureConstants;
 import org.opensaml.xmlsec.signature.support.SignatureException;
 import org.opensaml.xmlsec.signature.support.SignatureValidator;
-import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.wiring.BundleWiring;
@@ -382,7 +381,7 @@ public class AuthenticationHandlerSAML2Impl extends AbstractSamlHandler implemen
         return nameIDPolicy;
     }
 
-    private MessageContext decodeHttpPostSamlResp(final HttpServletRequest request) {
+    MessageContext decodeHttpPostSamlResp(final HttpServletRequest request) {
         HTTPPostDecoder httpPostDecoder = new HTTPPostDecoder();
         ParserPool parserPool = XMLObjectProviderRegistrySupport.getParserPool();
         httpPostDecoder.setParserPool(parserPool);
@@ -390,13 +389,13 @@ public class AuthenticationHandlerSAML2Impl extends AbstractSamlHandler implemen
         try {
             httpPostDecoder.initialize();
             httpPostDecoder.decode();
+            return httpPostDecoder.getMessageContext();
         } catch (MessageDecodingException e) {
             logger.error("MessageDecodingException");
             throw new SAML2RuntimeException(e);
         } catch (ComponentInitializationException e) {
             throw new SAML2RuntimeException(e);
         }
-        return httpPostDecoder.getMessageContext();
     }
 
     private Assertion decryptAssertion(final EncryptedAssertion encryptedAssertion) {
@@ -800,4 +799,5 @@ public class AuthenticationHandlerSAML2Impl extends AbstractSamlHandler implemen
         }
         return tokenFile.getAbsoluteFile();
     }
+
 }
diff --git a/saml-handler/src/test/java/org/apache/sling/auth/saml2/JCETest.java b/saml-handler/src/test/java/org/apache/sling/auth/saml2/JCETest.java
index ec6ccc2..5bcd194 100644
--- a/saml-handler/src/test/java/org/apache/sling/auth/saml2/JCETest.java
+++ b/saml-handler/src/test/java/org/apache/sling/auth/saml2/JCETest.java
@@ -21,6 +21,7 @@ package org.apache.sling.auth.saml2;
 
 import org.junit.Test;
 import org.opensaml.core.config.InitializationException;
+import org.opensaml.core.config.InitializationService;
 import org.opensaml.xmlsec.config.impl.JavaCryptoValidationInitializer;
 import java.security.Provider;
 import java.security.Security;
@@ -32,6 +33,7 @@ public class JCETest {
         JavaCryptoValidationInitializer jcvi = new JavaCryptoValidationInitializer();
         try {
             jcvi.init();
+            InitializationService.initialize();
             for (Provider jceProvider : Security.getProviders()) {
                 System.out.print(jceProvider.getInfo());
             }
diff --git a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2ImplTest.java b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2ImplTest.java
index cd3977e..7684d16 100644
--- a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2ImplTest.java
+++ b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/AuthenticationHandlerSAML2ImplTest.java
@@ -19,22 +19,36 @@
 
 package org.apache.sling.auth.saml2.impl;
 
+import org.apache.sling.auth.saml2.SAML2RuntimeException;
 import org.hamcrest.core.StringStartsWith;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.api.Invocation;
+import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.hamcrest.Description;
 import org.junit.runner.RunWith;
+import org.opensaml.core.config.InitializationException;
+import org.opensaml.core.config.InitializationService;
+import org.opensaml.xmlsec.config.impl.JavaCryptoValidationInitializer;
+import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.jmock.api.Action;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.sling.auth.saml2.Activator;
 import java.io.File;
+import java.security.Provider;
+import java.security.Security;
 
 import static org.apache.sling.auth.saml2.impl.AuthenticationHandlerSAML2Impl.TOKEN_FILENAME;
+
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 
 @RunWith(PowerMockRunner.class)
@@ -42,6 +56,8 @@ import static org.junit.Assert.assertEquals;
 @PowerMockIgnore("jdk.internal.reflect.*")
 public class AuthenticationHandlerSAML2ImplTest {
 
+    private static final Logger logger = LoggerFactory.getLogger(AuthenticationHandlerSAML2ImplTest.class);
+
     @Test
     public void test_getTokenFile() {
         final File root = new File("bundle999").getAbsoluteFile();
@@ -135,5 +151,6 @@ public class AuthenticationHandlerSAML2ImplTest {
         }
     }
 
+
 }
 
diff --git a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/OsgiSamlTest.java b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/OsgiSamlTest.java
index f137105..8b330de 100644
--- a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/OsgiSamlTest.java
+++ b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/OsgiSamlTest.java
@@ -20,41 +20,66 @@
 
 package org.apache.sling.auth.saml2.impl;
 
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.auth.saml2.Helpers;
 import org.apache.sling.auth.saml2.Saml2UserMgtService;
 import org.apache.sling.testing.mock.osgi.MockOsgi;
 import org.apache.sling.testing.mock.osgi.junit.OsgiContext;
 import org.apache.sling.testing.resourceresolver.MockResourceResolverFactory;
+import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mockito;
+import org.opensaml.core.config.InitializationException;
+import org.opensaml.messaging.context.MessageContext;
+import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
+import org.opensaml.saml.saml2.core.ArtifactResponse;
 import org.opensaml.saml.saml2.core.AuthnRequest;
+import org.opensaml.saml.saml2.core.Issuer;
+import org.opensaml.saml.saml2.core.Response;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.wiring.BundleWiring;
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
-
+import org.apache.sling.auth.saml2.Activator;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.time.Instant;
 import java.util.Dictionary;
 import java.util.Hashtable;
+
+import static org.apache.sling.auth.saml2.Activator.initializeOpenSaml;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.Mockito.when;
 
 public class OsgiSamlTest {
 
     @Rule
     public final OsgiContext osgiContext = new OsgiContext();
+    Saml2UserMgtService userMgtService;
+    AuthenticationHandlerSAML2Impl samlHandler;
+
+    @BeforeClass
+    public static void initializeOpenSAML(){
+        try {
+            initializeOpenSaml();
+        } catch (InitializationException e) {
+            fail(e.getMessage());
+        }
+    }
 
     @Before
     public void setup(){
@@ -64,6 +89,8 @@ public class OsgiSamlTest {
 //            configureUserConfigMgr();
             ResourceResolverFactory mockFactory = Mockito.mock(ResourceResolverFactory.class);
             osgiContext.registerService(ResourceResolverFactory.class, mockFactory);
+            userMgtService = osgiContext.registerService(new Saml2UserMgtServiceImpl());
+            samlHandler = osgiContext.registerInjectActivateService(new AuthenticationHandlerSAML2Impl());
         } catch (Exception e){
             fail(e.getMessage());
         }
@@ -71,8 +98,6 @@ public class OsgiSamlTest {
 
     @Test
     public void test_default_configs() {
-        Saml2UserMgtService userMgtService = osgiContext.registerService(new Saml2UserMgtServiceImpl());
-        AuthenticationHandlerSAML2Impl samlHandler = osgiContext.registerInjectActivateService(new AuthenticationHandlerSAML2Impl());
         assertNotNull(samlHandler);
         assertEquals("{}",samlHandler.getSaml2Path());
         assertFalse(samlHandler.getSaml2SPEnabled());
@@ -96,8 +121,6 @@ public class OsgiSamlTest {
 
     @Test
     public void test_disabled_saml_handler(){
-        Saml2UserMgtService userMgtService = osgiContext.registerService(new Saml2UserMgtServiceImpl());
-        AuthenticationHandlerSAML2Impl samlHandler = osgiContext.registerInjectActivateService(new AuthenticationHandlerSAML2Impl());
         assertFalse(samlHandler.getSaml2SPEnabled());
         final HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
         final HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
@@ -111,27 +134,37 @@ public class OsgiSamlTest {
 
     @Test
     public void test_authn_request(){
-        Saml2UserMgtService userMgtService = osgiContext.registerService(new Saml2UserMgtServiceImpl());
-        AuthenticationHandlerSAML2Impl samlHandler = osgiContext.registerInjectActivateService(new AuthenticationHandlerSAML2Impl());
-
-//        BundleContext bundleContext = MockOsgi.newBundleContext();
-//        MockResourceResolverFactory mockFactory = new MockResourceResolverFactory();
-//        ResourceResolverFactory mockFactory = Mockito.mock(ResourceResolverFactory.class);
-
-//        MockOsgi.injectServices(mockFactory, bundleContext);
-
-//        Saml2UserMgtService userMgtService = new Saml2UserMgtServiceImpl();
-//        MockOsgi.injectServices(userMgtService, bundleContext);
-//        AuthenticationHandlerSAML2Impl samlHandler = new AuthenticationHandlerSAML2Impl();
-//        MockOsgi.injectServices(samlHandler, bundleContext);
-//        MockOsgi.activate(samlHandler, bundleContext);
-//        AuthnRequest authnRequest = samlHandler.buildAuthnRequest();
-//        assertNotNull(authnRequest);
-//        assertEquals(samlHandler.getSaml2IDPDestination(), authnRequest.getDestination());
-//        assertTrue(authnRequest.getIssueInstant().isBefore(Instant.now()));
-//        assertEquals(SAMLConstants.SAML2_POST_BINDING_URI, authnRequest.getProtocolBinding());
-//        assertEquals(samlHandler.getACSURL(), authnRequest.getAssertionConsumerServiceURL());
-//        assertTrue(authnRequest.getID().length()<10);
+        AuthnRequest authnRequest = samlHandler.buildAuthnRequest();
+        assertNotNull(authnRequest);
+        assertEquals(samlHandler.getSaml2IDPDestination(), authnRequest.getDestination());
+        assertTrue(authnRequest.getIssueInstant().isBefore(Instant.now()));
+        assertEquals(SAMLConstants.SAML2_POST_BINDING_URI, authnRequest.getProtocolBinding());
+        assertEquals(samlHandler.getACSURL(), authnRequest.getAssertionConsumerServiceURL());
+        assertTrue(authnRequest.getID().length()==33);
+    }
+    
+    @Test
+    public void test_decodeHttpPostSamlResp(){
+        SlingHttpServletRequest request = Mockito.mock(SlingHttpServletRequest.class);
+        when(request.getMethod()).thenReturn("POST");
+        // <?xml version="1.0" encoding="UTF-8"?>
+        // <samlp:Response ID="foo" IssueInstant="1970-01-01T00:00:00.000Z" Version="2.0"
+        //   xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
+        //   <samlp:Status>
+        //      <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
+        //   </samlp:Status>
+        // </samlp:Response>
+        when(request.getParameter("SAMLResponse")).thenReturn("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNhbWxwOlJlc3Bvbn"
+            + "NlIElEPSJmb28iIElzc3VlSW5zdGFudD0iMTk3MC0wMS0wMVQwMDowMDowMC4wMDBaIiBWZXJzaW9uPSIyLjAiIHhtbG5zOnN"
+            + "hbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiPjxzYW1scDpTdGF0dXM+PHNhbWxwOlN0YXR1c0Nv"
+            + "ZGUgVmFsdWU9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpzdGF0dXM6U3VjY2VzcyIvPjwvc2FtbHA6U3RhdHVzPjwvc"
+            + "2FtbHA6UmVzcG9uc2U+");
+        MessageContext messageContext = samlHandler.decodeHttpPostSamlResp(request);
+        assertTrue(messageContext.getMessage() instanceof Response);
+        Response response = (Response) messageContext.getMessage();
+        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", response.getStatus().getStatusCode().getValue());
+        assertEquals("foo", response.getID());
+        assertEquals("urn:oasis:names:tc:SAML:2.0:protocol", response.getElementQName().getNamespaceURI());
     }
 
     private void configureJaas() throws IOException {
diff --git a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java
index e238b51..08b4ceb 100644
--- a/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java
+++ b/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java
@@ -20,46 +20,43 @@
 package org.apache.sling.auth.saml2.impl;
 import org.apache.sling.auth.core.AuthenticationSupport;
 import org.apache.sling.auth.core.spi.AuthenticationHandler;
-import org.apache.sling.auth.saml2.AuthenticationHandlerSAML2;
-import org.apache.sling.auth.saml2.Saml2UserMgtService;
-import org.apache.sling.auth.saml2.sp.Saml2LoginModule;
 import org.apache.sling.testing.paxexam.SlingOptions;
 import org.apache.sling.testing.paxexam.TestSupport;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.util.Filter;
-
 import javax.inject.Inject;
-import java.net.URI;
-
+import org.osgi.service.http.HttpService;
 import static org.apache.sling.testing.paxexam.SlingOptions.logback;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingFsresource;
 import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-
-@RunWith(PaxExam.class)
+/**
+ * PAX Exam Tests are a Work in Progress
+ * and disabled until proven useful.
+ */
+//@RunWith(PaxExam.class)
 public class SamlHandlerIT extends TestSupport {
 
     static int HTTP_PORT = 8080;
     static int DEST_HTTP_PORT = 8484;
-//    protected static OsgiConsoleClient CLIENT;
-//    private final static int STARTUP_WAIT_SECONDS = 30;
+    private final static int STARTUP_WAIT_SECONDS = 30;
 
     @Inject
     AuthenticationSupport authenticationSupport;
 
-//    @Inject
-//    protected AuthenticationHandler samlHandler;
+    @Inject
+    protected HttpService httpService;
 
+    @Inject
+//    @Filter(value = "(authtype=SAML2)")
+    protected AuthenticationHandler samlHandler;
 
 
     @Configuration
@@ -90,20 +87,23 @@ public class SamlHandlerIT extends TestSupport {
         SlingOptions.versionResolver.setVersion("org.apache.sling", "org.apache.sling.jcr.oak.server", "1.2.10");
         return new Option[]{
             systemProperty("org.osgi.service.http.port").value(String.valueOf(HTTP_PORT)),
+//            vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
+//            systemTimeout(0),
             baseConfiguration(),
             slingQuickstart(),
-            CoreOptions.mavenBundle("org.apache.jackrabbit", "oak-jackrabbit-api", "1.32.0"),
-            CoreOptions.mavenBundle("org.apache.felix", "org.apache.felix.webconsole.plugins.ds", "2.0.8"),
-            CoreOptions.mavenBundle("org.apache.sling", "org.apache.sling.auth.core", "1.5.0"),
-            CoreOptions.mavenBundle("org.apache.felix", "org.apache.felix.converter", "1.0.14"),
+            mavenBundle("org.apache.jackrabbit", "oak-jackrabbit-api", "1.32.0"),
+            mavenBundle("org.apache.felix", "org.apache.felix.webconsole.plugins.ds", "2.0.8"),
+            mavenBundle("org.apache.sling", "org.apache.sling.auth.core", "1.5.0"),
+            mavenBundle("org.apache.felix", "org.apache.felix.converter", "1.0.14"),
+            mavenBundle("org.apache.sling", "org.apache.sling.auth.form", "1.0.20"),
+            testBundle("bundle.filename"), // from TestSupport
+            mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.auth.saml2").versionAsInProject(),
             junitBundles(),
             logback(),
             // build artifact
-            testBundle("bundle.filename"), // from TestSupport
         };
     }
 
-
     protected Option slingQuickstart() {
         final String workingDirectory = workingDirectory(); // from TestSupport
         return composite(
@@ -111,35 +111,9 @@ public class SamlHandlerIT extends TestSupport {
         );
     }
 
-
-    @Test
-    public void test_setup(){
-        // still WIP
-        assertTrue(true);
+//    @Test
+//    public void test_setup(){
+////        PAX is impossible
 //        assertNotNull(samlHandler);
-    }
-
-
-//    @ProbeBuilder
-//    public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
-//        //make sure the needed imports are there.
-//        probe.setHeader(Constants.IMPORT_PACKAGE, "*,org.apache.sling.testing.clients.osgi.OsgiConsoleClient.*");
-//        return probe;
-//    }
-
-//    @BeforeClass
-//    public static void waitForSling() throws Exception {
-//        final URI url = new URI(String.format("http://localhost:%d", HTTP_PORT));
-//        CLIENT = new OsgiConsoleClient(url, "admin", "admin");
-//
-//        CLIENT.waitExists("/", STARTUP_WAIT_SECONDS * 1000, 500);
-
-//        CLIENT.waitComponentRegistered(MyLameServiceForTestingIT.class.getName(), 10 * 1000, 500);
-
-        // Verify stable status for a bit
-//        for(int i=0; i < 10 ; i++) {
-//            CLIENT.waitComponentRegistered(MyLameServiceForTestingIT.class.getName(), 1000, 100);
-//            Thread.sleep(100);
-//        }
 //    }
 }