You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/04/16 22:45:15 UTC

[11/38] tomee git commit: Start adding a TCK module and implementing some stuff

Start adding a TCK module and implementing some stuff


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/672b422e
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/672b422e
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/672b422e

Branch: refs/heads/master
Commit: 672b422ee8ad459d15fac5000d4a01013c01e2b3
Parents: 35e671d
Author: Jean-Louis Monteiro <je...@gmail.com>
Authored: Thu Feb 22 16:58:13 2018 +0100
Committer: Jean-Louis Monteiro <je...@gmail.com>
Committed: Thu Feb 22 16:58:13 2018 +0100

----------------------------------------------------------------------
 .../server/cxf/rs/MPJWTSecurityContextTest.java |   7 +-
 tck/mp-jwt-embedded/pom.xml                     | 157 +++++++++++++++++++
 .../jwt/DefaultJWTCallerPrincipal.java          |  51 ++++++
 .../microprofile/jwt/JWTCallerPrincipal.java    |  58 +++++++
 .../tomee/microprofile/jwt/MPJWTFilter.java     |  76 +++++++++
 .../microprofile/jwt/MPJWTInitializer.java      |  59 +++++++
 .../tomee/microprofile/jwt/TCKTokenParser.java  |  33 ++++
 .../javax.servlet.ServletContainerInitializer   |   1 +
 tck/mp-jwt-embedded/src/test/resources/dev.xml  |  80 ++++++++++
 tck/pom.xml                                     |   1 +
 10 files changed, 520 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/MPJWTSecurityContextTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/MPJWTSecurityContextTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/MPJWTSecurityContextTest.java
index 5c62851..62565b4 100644
--- a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/MPJWTSecurityContextTest.java
+++ b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/MPJWTSecurityContextTest.java
@@ -75,7 +75,7 @@ public class MPJWTSecurityContextTest {
     }
 
     @Module
-    @Classes({Res.class, RestApplication.class})
+    @Classes(cdi = true, value = {Res.class, RestApplication.class})
     public WebApp war() {
         return new WebApp()
                 .contextRoot("foo");
@@ -85,7 +85,7 @@ public class MPJWTSecurityContextTest {
     public void check() throws IOException {
         assertEquals("true", ClientBuilder.newClient()
                 .target("http://127.0.0.1:" + port)
-                .path("foo/sc")
+                .path("api/foo/sc")
                 .queryParam("role", "therole")
                 .request()
                 .accept(MediaType.TEXT_PLAIN_TYPE)
@@ -93,7 +93,7 @@ public class MPJWTSecurityContextTest {
 
         assertEquals("false", ClientBuilder.newClient()
                 .target("http://127.0.0.1:" + port)
-                .path("foo/sc")
+                .path("api/foo/sc")
                 .queryParam("role", "another")
                 .request()
                 .accept(MediaType.TEXT_PLAIN_TYPE)
@@ -132,6 +132,7 @@ public class MPJWTSecurityContextTest {
             final LoginConfig annotation = application.getClass().getAnnotation(LoginConfig.class);
             if (annotation != null && "MP-JWT".equals(annotation.authMethod())) {
                 // add the ContainerRequestFilter on the fly
+                // todo how to add this on the fly
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/pom.xml
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/pom.xml b/tck/mp-jwt-embedded/pom.xml
new file mode 100644
index 0000000..361fd50
--- /dev/null
+++ b/tck/mp-jwt-embedded/pom.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>tck</artifactId>
+    <groupId>org.apache.tomee</groupId>
+    <version>7.0.5-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>mp-jwt-embedded</artifactId>
+  <name>OpenEJB :: TCK :: MP-JWT Embedded</name>
+
+  <properties>
+    <tck.version>1.1-SNAPSHOT</tck.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>javaee-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>arquillian-tomee-embedded</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- This is the MP-JWT TCK base extension and utility classes -->
+    <dependency>
+      <groupId>org.eclipse.microprofile.jwt</groupId>
+      <artifactId>microprofile-jwt-auth-tck</artifactId>
+      <version>${tck.version}</version>
+    </dependency>
+    <!-- This is the actual MP-JWT TCK test classes -->
+    <dependency>
+      <groupId>org.eclipse.microprofile.jwt</groupId>
+      <artifactId>microprofile-jwt-auth-tck</artifactId>
+      <version>${tck.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <!-- Arquillian extension SPI -->
+    <dependency>
+      <groupId>org.jboss.arquillian.container</groupId>
+      <artifactId>arquillian-container-spi</artifactId>
+      <version>${version.arquillian}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.arquillian.container</groupId>
+      <artifactId>arquillian-container-test-spi</artifactId>
+      <version>${version.arquillian}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.10</version>
+        <executions>
+          <execution>
+            <id>copy-tck-test-suite-file</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <stripVersion>true</stripVersion>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.eclipse.microprofile.jwt</groupId>
+                  <artifactId>microprofile-jwt-auth-tck</artifactId>
+                  <type>xml</type>
+                  <classifier>suite</classifier>
+                  <overWrite>false</overWrite>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.17</version>
+        <configuration>
+          <suiteXmlFiles>
+            <suiteXmlFile>${project.build.directory}/dependency/beanvalidation-tck-tests-suite.xml</suiteXmlFile>
+          </suiteXmlFiles>
+          <systemProperties>
+            <!--<property>-->
+              <!--<name>validation.provider</name>-->
+              <!--<value>${validation.provider}</value>-->
+            <!--</property>-->
+          </systemProperties>
+          <parallel>methods</parallel>
+          <threadCount>4</threadCount>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>2.17</version>
+        <executions>
+          <execution>
+            <id>generate-test-report</id>
+            <phase>test</phase>
+            <goals>
+              <goal>report-only</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+          <outputName>test-report</outputName>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/DefaultJWTCallerPrincipal.java
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/DefaultJWTCallerPrincipal.java b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/DefaultJWTCallerPrincipal.java
new file mode 100644
index 0000000..d141a5f
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/DefaultJWTCallerPrincipal.java
@@ -0,0 +1,51 @@
+/*
+ *     Licensed to the Apache Software Foundation (ASF) under one or more
+ *     contributor license agreements.  See the NOTICE file distributed with
+ *     this work for additional information regarding copyright ownership.
+ *     The ASF licenses this file to You under the Apache License, Version 2.0
+ *     (the "License"); you may not use this file except in compliance with
+ *     the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *     Unless required by applicable law or agreed to in writing, software
+ *     distributed under the License is distributed on an "AS IS" BASIS,
+ *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *     See the License for the specific language governing permissions and
+ *     limitations under the License.
+ */
+package org.apache.tomee.microprofile.jwt;
+
+import java.util.Set;
+
+/**
+ * A default implementation of JWTCallerPrincipal that wraps Nimbus library used by default here
+ * We could create another implementation using plain JSON-P
+ *
+ */
+public class DefaultJWTCallerPrincipal extends JWTCallerPrincipal {
+
+    /**
+     * Create a JWTCallerPrincipal with the caller's name
+     *
+     * @param name - caller's name
+     */
+    public DefaultJWTCallerPrincipal(final String name) {
+        super(name);
+    }
+
+    @Override
+    public String toString(final boolean showAll) {
+        return null;
+    }
+
+    @Override
+    public Set<String> getClaimNames() {
+        return null;
+    }
+
+    @Override
+    public <T> T getClaim(final String claimName) {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/JWTCallerPrincipal.java
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/JWTCallerPrincipal.java b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/JWTCallerPrincipal.java
new file mode 100644
index 0000000..3eca47b
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/JWTCallerPrincipal.java
@@ -0,0 +1,58 @@
+/*
+ *     Licensed to the Apache Software Foundation (ASF) under one or more
+ *     contributor license agreements.  See the NOTICE file distributed with
+ *     this work for additional information regarding copyright ownership.
+ *     The ASF licenses this file to You under the Apache License, Version 2.0
+ *     (the "License"); you may not use this file except in compliance with
+ *     the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *     Unless required by applicable law or agreed to in writing, software
+ *     distributed under the License is distributed on an "AS IS" BASIS,
+ *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *     See the License for the specific language governing permissions and
+ *     limitations under the License.
+ */
+
+package org.apache.tomee.microprofile.jwt;
+
+
+import java.util.Optional;
+import org.eclipse.microprofile.jwt.JsonWebToken;
+
+/**
+ * An abstract CallerPrincipal implementation that provides access to the JWT claims that are required by
+ * the microprofile token.
+ */
+public abstract class JWTCallerPrincipal implements JsonWebToken {
+    private String name;
+
+    /**
+     * Create a JWTCallerPrincipal with the caller's name
+     *
+     * @param name - caller's name
+     */
+    public JWTCallerPrincipal(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Generate a human readable version of the caller principal and associated JWT.
+     *
+     * @param showAll - should all claims associated with the JWT be displayed or should only those defined in the
+     *                JsonWebToken interface be displayed.
+     * @return human readable presentation of the caller principal and associated JWT.
+     */
+    public abstract String toString(boolean showAll);
+
+    public <T> Optional<T> claim(String claimName) {
+        T claim = (T) getClaim(claimName);
+        return Optional.ofNullable(claim);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
new file mode 100644
index 0000000..9b57b51
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
@@ -0,0 +1,76 @@
+/*
+ *     Licensed to the Apache Software Foundation (ASF) under one or more
+ *     contributor license agreements.  See the NOTICE file distributed with
+ *     this work for additional information regarding copyright ownership.
+ *     The ASF licenses this file to You under the Apache License, Version 2.0
+ *     (the "License"); you may not use this file except in compliance with
+ *     the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *     Unless required by applicable law or agreed to in writing, software
+ *     distributed under the License is distributed on an "AS IS" BASIS,
+ *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *     See the License for the specific language governing permissions and
+ *     limitations under the License.
+ */
+package org.apache.tomee.microprofile.jwt;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import java.io.IOException;
+import java.security.Principal;
+
+// async is supported because we only need to do work on the way in
+@WebFilter(asyncSupported = true, urlPatterns = "/*")
+public class MPJWTFilter implements Filter {
+
+
+    @Override
+    public void init(final FilterConfig filterConfig) throws ServletException {
+        // get configuration
+
+    }
+
+    @Override
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
+
+        final HttpServletRequest httpServletRequest = (HttpServletRequest)request;
+
+        // todo get JWT and do validation
+
+        // now wrap the httpServletRequest and override the principal so CXF can propagate into the SecurityContext
+        chain.doFilter(new HttpServletRequestWrapper(httpServletRequest) {
+
+            @Override
+            public Principal getUserPrincipal() {
+                return null; // todo, during parsing and validation, we need to convert into the JWT Principal as specified by the spec
+            }
+
+            @Override
+            public boolean isUserInRole(String role) {
+                return true; // replace with a check based on the claims content
+            }
+
+            @Override
+            public String getAuthType() {
+                return "MP-JWT";
+            }
+
+        }, response);
+
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTInitializer.java
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTInitializer.java b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTInitializer.java
new file mode 100644
index 0000000..e91047d
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTInitializer.java
@@ -0,0 +1,59 @@
+/*
+ *     Licensed to the Apache Software Foundation (ASF) under one or more
+ *     contributor license agreements.  See the NOTICE file distributed with
+ *     this work for additional information regarding copyright ownership.
+ *     The ASF licenses this file to You under the Apache License, Version 2.0
+ *     (the "License"); you may not use this file except in compliance with
+ *     the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *     Unless required by applicable law or agreed to in writing, software
+ *     distributed under the License is distributed on an "AS IS" BASIS,
+ *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *     See the License for the specific language governing permissions and
+ *     limitations under the License.
+ */
+package org.apache.tomee.microprofile.jwt;
+
+import org.eclipse.microprofile.auth.LoginConfig;
+
+import javax.servlet.FilterRegistration;
+import javax.servlet.ServletContainerInitializer;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.HandlesTypes;
+import javax.ws.rs.core.Application;
+import java.util.Set;
+
+/**
+ * Responsible for adding the filter into the chain and doing all other initialization
+ */
+@HandlesTypes(LoginConfig.class)
+public class MPJWTInitializer implements ServletContainerInitializer {
+
+    @Override
+    public void onStartup(final Set<Class<?>> classes, final ServletContext ctx) throws ServletException {
+
+        if (classes == null || classes.isEmpty()) {
+            return; // to REST application having @LoginConfig on it
+        }
+
+        for (Class<?> clazz : classes) {
+            final LoginConfig loginConfig = clazz.getAnnotation(LoginConfig.class);
+
+            if (loginConfig.authMethod() == null && !"MP-JWT".equals(loginConfig.authMethod())) {
+                continue;
+            }
+
+            if (!Application.class.isInstance(clazz)) {
+                continue; // do we really want Application?
+            }
+
+            final FilterRegistration.Dynamic mpJwtFilter = ctx.addFilter("mp-jwt-filter", MPJWTFilter.class);
+            mpJwtFilter.setAsyncSupported(true);
+        }
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/TCKTokenParser.java
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/TCKTokenParser.java b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/TCKTokenParser.java
new file mode 100644
index 0000000..b07ba24
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/java/org/apache/tomee/microprofile/jwt/TCKTokenParser.java
@@ -0,0 +1,33 @@
+/*
+ *     Licensed to the Apache Software Foundation (ASF) under one or more
+ *     contributor license agreements.  See the NOTICE file distributed with
+ *     this work for additional information regarding copyright ownership.
+ *     The ASF licenses this file to You under the Apache License, Version 2.0
+ *     (the "License"); you may not use this file except in compliance with
+ *     the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *     Unless required by applicable law or agreed to in writing, software
+ *     distributed under the License is distributed on an "AS IS" BASIS,
+ *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *     See the License for the specific language governing permissions and
+ *     limitations under the License.
+ */
+package org.apache.tomee.microprofile.jwt;
+
+import org.eclipse.microprofile.jwt.JsonWebToken;
+import org.eclipse.microprofile.jwt.tck.util.ITokenParser;
+
+import java.security.PublicKey;
+
+// this is only used by the TCK
+public class TCKTokenParser implements ITokenParser {
+
+
+    @Override
+    public JsonWebToken parse(final String bearerToken, final String issuer, final PublicKey publicKey) throws Exception {
+        return null; // todo - do some work
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer b/tck/mp-jwt-embedded/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
new file mode 100644
index 0000000..100e625
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
@@ -0,0 +1 @@
+org.apache.tomee.microprofile.jwt.MPJWTInitializer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/mp-jwt-embedded/src/test/resources/dev.xml
----------------------------------------------------------------------
diff --git a/tck/mp-jwt-embedded/src/test/resources/dev.xml b/tck/mp-jwt-embedded/src/test/resources/dev.xml
new file mode 100644
index 0000000..c2b24b8
--- /dev/null
+++ b/tck/mp-jwt-embedded/src/test/resources/dev.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<suite name="microprofile-jwt-auth-FullTCK" verbose="1" preserve-order="true" configfailurepolicy="continue" >
+
+  <!-- The required base JAX-RS and CDI based tests that all MP-JWT implementations
+  must pass.
+  -->
+  <test name="base-tests" verbose="10">
+    <groups>
+      <define name="base-groups">
+        <include name="arquillian" description="Arquillian internal"/>
+        <include name="utils" description="Utility tests"/>
+        <include name="jwt" description="Base JsonWebToken tests"/>
+        <include name="jaxrs" description="JAX-RS invocation tests"/>
+        <include name="cdi" description="Base CDI injection of ClaimValues"/>
+        <include name="cdi-json" description="CDI injection of JSON-P values"/>
+        <include name="cdi-provider" description="CDI injection of javax.inject.Provider values"/>
+      </define>
+      <define name="excludes">
+        <include name="debug" description="Internal debugging tests" />
+      </define>
+      <run>
+        <include name="base-groups" />
+        <exclude name="excludes" />
+      </run>
+    </groups>
+    <classes>
+      <class name="org.eclipse.microprofile.jwt.tck.parsing.TokenValidationTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.parsing.TestTokenClaimTypesTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.UnsecuredPingTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.RequiredClaimsTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ClaimValueInjectionTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.JsonValueInjectionTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ProviderInjectionTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.RolesAllowedTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.InvalidTokenTest" />
+    </classes>
+  </test>
+  <test name="extended-tests" verbose="10">
+    <groups>
+      <define name="extended-groups">
+        <include name="arquillian" description="Arquillian internal"/>
+        <include name="ejb-optional" description="EJB container integration tests"/>
+        <include name="jacc-optional" description="JACC API integration tests"/>
+        <include name="servlet-optional" description="Servlet container integration tests"/>
+        <include name="ee-security-optional" description="Java EE security feature tests"/>
+      </define>
+      <define name="excludes">
+        <include name="debug" description="Internal debugging tests" />
+      </define>
+      <run>
+        <include name="extended-groups" />
+        <exclude name="excludes" />
+      </run>
+    </groups>
+    <classes>
+      <class name="org.eclipse.microprofile.jwt.tck.container.ejb.EjbTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.jacc.SubjectTest" />
+      <class name="org.eclipse.microprofile.jwt.tck.container.servlet.ServletTest" />
+    </classes>
+
+  </test>
+</suite>

http://git-wip-us.apache.org/repos/asf/tomee/blob/672b422e/tck/pom.xml
----------------------------------------------------------------------
diff --git a/tck/pom.xml b/tck/pom.xml
index 774c80b..d2c877c 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -36,6 +36,7 @@
     <module>cdi-embedded</module>
     <module>cdi-tomee</module>
     <module>bval-tomee</module>
+    <module>mp-jwt-embedded</module>
 
     <!-- TODO: either really use this module or delete it -->
     <module>bval-embedded</module>