You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rz...@apache.org on 2026/04/17 06:17:35 UTC

(tomee) branch main updated: Security 4.0 - TCK Setup (#2579)

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

rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/main by this push:
     new 2c0a66a3c3 Security 4.0 - TCK Setup (#2579)
2c0a66a3c3 is described below

commit 2c0a66a3c3d27646bc136675763bee8754188471
Author: Richard Zowalla <13...@users.noreply.github.com>
AuthorDate: Fri Apr 17 08:17:30 2026 +0200

    Security 4.0 - TCK Setup (#2579)
---
 tck/pom.xml                                        |   2 +
 tck/security-standalone/pom.xml                    | 262 +++++++++++++++++++++
 .../src/test/resources/arquillian.xml              |  42 ++++
 3 files changed, 306 insertions(+)

diff --git a/tck/pom.xml b/tck/pom.xml
index 54b1580cc5..a748cba732 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -33,6 +33,7 @@
     <jsonb-tck.version>3.0.0</jsonb-tck.version>
     <jsonp-tck.version>2.1.1</jsonp-tck.version>
     <validation.provider>org.apache.bval.jsr.ApacheValidationProvider</validation.provider>
+    <security-tck.version>4.0.0</security-tck.version>
   </properties>
 
   <modules>
@@ -53,6 +54,7 @@
     <module>jax-rs</module>
     <module>data-standalone</module>
     <module>data-signature-test</module>
+    <module>security-standalone</module>
   </modules>
 
   <build>
diff --git a/tck/security-standalone/pom.xml b/tck/security-standalone/pom.xml
new file mode 100644
index 0000000000..41526242d4
--- /dev/null
+++ b/tck/security-standalone/pom.xml
@@ -0,0 +1,262 @@
+<?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>11.0.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>security-standalone</artifactId>
+    <packaging>pom</packaging>
+    <name>TomEE :: TCK :: Jakarta Security</name>
+
+    <properties>
+        <security-tck.version>4.0.0</security-tck.version>
+        <security-tck.url>https://download.eclipse.org/jakartaee/security/4.0/jakarta-security-tck-${security-tck.version}.zip</security-tck.url>
+        <tck.dir>${project.build.directory}/security-tck-${security-tck.version}/tck</tck.dir>
+    </properties>
+
+    <profiles>
+        <profile>
+            <id>tck-security</id>
+            <build>
+                <plugins>
+                    <!-- Step 1: Download and unpack the Security TCK -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>download-tck</id>
+                                <phase>generate-test-resources</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <target>
+                                        <get skipexisting="true"
+                                             src="${security-tck.url}"
+                                             dest="${project.build.directory}/jakarta-security-tck-${security-tck.version}.zip" />
+                                        <unzip src="${project.build.directory}/jakarta-security-tck-${security-tck.version}.zip"
+                                               dest="${project.build.directory}" />
+
+                                        <!-- Overlay TomEE arquillian.xml into TCK common resources -->
+                                        <copy file="${project.basedir}/src/test/resources/arquillian.xml"
+                                              tofile="${tck.dir}/common/src/main/resources/arquillian.xml"
+                                              overwrite="true" />
+
+                                        <!-- Inject tomee-remote profile into TCK parent pom.xml -->
+                                        <replace file="${tck.dir}/pom.xml"
+                                                 token="&lt;/profiles&gt;"
+                                                 value="${line.separator}${line.separator}
+        &lt;!-- TomEE Remote Profile (injected by TomEE build) --&gt;
+        &lt;profile&gt;
+            &lt;id&gt;tomee-remote&lt;/id&gt;
+
+            &lt;repositories&gt;
+                &lt;repository&gt;
+                    &lt;id&gt;apache.snapshots&lt;/id&gt;
+                    &lt;url&gt;https://repository.apache.org/content/repositories/snapshots/&lt;/url&gt;
+                    &lt;releases&gt;&lt;enabled&gt;false&lt;/enabled&gt;&lt;/releases&gt;
+                    &lt;snapshots&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/snapshots&gt;
+                &lt;/repository&gt;
+            &lt;/repositories&gt;
+
+            &lt;dependencies&gt;
+                &lt;dependency&gt;
+                    &lt;groupId&gt;org.apache.tomee&lt;/groupId&gt;
+                    &lt;artifactId&gt;apache-tomee&lt;/artifactId&gt;
+                    &lt;version&gt;${project.version}&lt;/version&gt;
+                    &lt;type&gt;zip&lt;/type&gt;
+                    &lt;classifier&gt;plus&lt;/classifier&gt;
+                    &lt;scope&gt;test&lt;/scope&gt;
+                &lt;/dependency&gt;
+                &lt;dependency&gt;
+                    &lt;groupId&gt;org.apache.tomee&lt;/groupId&gt;
+                    &lt;artifactId&gt;arquillian-tomee-remote&lt;/artifactId&gt;
+                    &lt;version&gt;${project.version}&lt;/version&gt;
+                    &lt;scope&gt;test&lt;/scope&gt;
+                    &lt;exclusions&gt;
+                        &lt;exclusion&gt;
+                            &lt;groupId&gt;org.apache.tomee&lt;/groupId&gt;
+                            &lt;artifactId&gt;arquillian-openejb-transaction-provider&lt;/artifactId&gt;
+                        &lt;/exclusion&gt;
+                    &lt;/exclusions&gt;
+                &lt;/dependency&gt;
+            &lt;/dependencies&gt;
+
+            &lt;build&gt;
+                &lt;plugins&gt;
+                    &lt;plugin&gt;
+                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+                        &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
+                        &lt;configuration&gt;
+                            &lt;systemPropertyVariables&gt;
+                                &lt;tomee.stopPort&gt;-1&lt;/tomee.stopPort&gt;
+                                &lt;tomee.httpPort&gt;-1&lt;/tomee.httpPort&gt;
+                                &lt;tomee.ajpPort&gt;-1&lt;/tomee.ajpPort&gt;
+                                &lt;tomee.dir&gt;target/tomee/server&lt;/tomee.dir&gt;
+                                &lt;tomee.appWorkingDir&gt;target/tomee/arquillian&lt;/tomee.appWorkingDir&gt;
+                                &lt;tomee.cleanOnStartUp&gt;true&lt;/tomee.cleanOnStartUp&gt;
+                                &lt;tomee.classifier&gt;plus&lt;/tomee.classifier&gt;
+                                &lt;tomee.properties&gt;openejb.environment.default=true&lt;/tomee.properties&gt;
+                            &lt;/systemPropertyVariables&gt;
+                        &lt;/configuration&gt;
+                    &lt;/plugin&gt;
+                &lt;/plugins&gt;
+            &lt;/build&gt;
+        &lt;/profile&gt;
+${line.separator}    &lt;/profiles&gt;" />
+
+                                        <!-- Remove security-signaturetest from reactor (uses GlassFish-only properties) -->
+                                        <replace file="${tck.dir}/pom.xml"
+                                                 token="&lt;module&gt;security-signaturetest&lt;/module&gt;"
+                                                 value="&lt;!-- module&gt;security-signaturetest&lt;/module --&gt;" />
+
+                                        <!-- Deactivate GlassFish profile default activation -->
+                                        <replace file="${tck.dir}/pom.xml"
+                                                 token="&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;"
+                                                 value="&lt;activeByDefault&gt;false&lt;/activeByDefault&gt;" />
+
+                                        <!-- Replace old arquillian-protocol-servlet with Jakarta variant -->
+                                        <replace file="${tck.dir}/pom.xml"
+                                                 token="&lt;artifactId&gt;arquillian-protocol-servlet&lt;/artifactId&gt;"
+                                                 value="&lt;artifactId&gt;arquillian-protocol-servlet-jakarta&lt;/artifactId&gt;${line.separator}            &lt;version&gt;${version.arquillian-protocol-servlet-jakarta}&lt;/version&gt;" />
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Step 2: Install TCK parent pom and common module to local repo -->
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>3.5.0</version>
+                        <executions>
+                            <!-- Install parent pom first (needed by all modules) -->
+                            <execution>
+                                <id>install-tck-parent</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>mvn</executable>
+                                    <workingDirectory>${tck.dir}</workingDirectory>
+                                    <arguments>
+                                        <argument>install</argument>
+                                        <argument>-N</argument>
+                                        <argument>-Ptomee-remote</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <!-- Then install common module (shared test utilities) -->
+                            <execution>
+                                <id>install-tck-common</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>mvn</executable>
+                                    <workingDirectory>${tck.dir}/common</workingDirectory>
+                                    <arguments>
+                                        <argument>install</argument>
+                                        <argument>-Ptomee-remote</argument>
+                                        <argument>-DskipTests</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Step 3: Run TCK test modules via invoker -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-invoker-plugin</artifactId>
+                        <version>3.8.0</version>
+                        <configuration>
+                            <projectsDirectory>${tck.dir}</projectsDirectory>
+                            <localRepositoryPath>${settings.localRepository}</localRepositoryPath>
+                            <streamLogs>true</streamLogs>
+                            <showErrors>true</showErrors>
+                            <!-- Don't fail the build on TCK test failures - we want the full baseline -->
+                            <ignoreFailures>true</ignoreFailures>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>run-security-tck</id>
+                                <phase>integration-test</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <goals>
+                                        <goal>verify</goal>
+                                    </goals>
+                                    <profiles>
+                                        <profile>tomee-remote</profile>
+                                    </profiles>
+                                    <pomIncludes>
+                                        <!-- SecurityContext tests -->
+                                        <pomInclude>app-securitycontext/pom.xml</pomInclude>
+                                        <pomInclude>app-securitycontext-auth/pom.xml</pomInclude>
+                                        <pomInclude>app-securitycontext-customprincipal/pom.xml</pomInclude>
+                                        <!-- Identity store tests -->
+                                        <pomInclude>app-mem/pom.xml</pomInclude>
+                                        <pomInclude>app-db/pom.xml</pomInclude>
+                                        <pomInclude>app-ldap/pom.xml</pomInclude>
+                                        <pomInclude>app-ldap2/pom.xml</pomInclude>
+                                        <pomInclude>app-ldap3/pom.xml</pomInclude>
+                                        <pomInclude>app-custom/pom.xml</pomInclude>
+                                        <pomInclude>app-multiple-store/pom.xml</pomInclude>
+                                        <pomInclude>app-multiple-store-backup/pom.xml</pomInclude>
+                                        <!-- Auth mechanism tests -->
+                                        <pomInclude>app-mem-basic/pom.xml</pomInclude>
+                                        <pomInclude>app-mem-basic-decorate/pom.xml</pomInclude>
+                                        <pomInclude>app-mem-form/pom.xml</pomInclude>
+                                        <pomInclude>app-mem-customform/pom.xml</pomInclude>
+                                        <!-- OpenID Connect tests -->
+                                        <pomInclude>app-openid/pom.xml</pomInclude>
+                                        <pomInclude>app-openid2/pom.xml</pomInclude>
+                                        <pomInclude>app-openid3/pom.xml</pomInclude>
+                                        <!-- Service tests -->
+                                        <pomInclude>app-custom-session/pom.xml</pomInclude>
+                                        <pomInclude>app-custom-rememberme/pom.xml</pomInclude>
+                                        <!-- Handler tests -->
+                                        <pomInclude>app-custom-identity-store-handler/pom.xml</pomInclude>
+                                        <pomInclude>app-custom-authentication-mechanism-handler/pom.xml</pomInclude>
+                                        <pomInclude>app-custom-authentication-mechanism-handler2/pom.xml</pomInclude>
+                                        <!-- JAX-RS security -->
+                                        <pomInclude>app-jaxrs/pom.xml</pomInclude>
+                                        <!-- JACC policy tests -->
+                                        <pomInclude>app-mem-policy/pom.xml</pomInclude>
+                                        <pomInclude>app-mem-policy2/pom.xml</pomInclude>
+                                    </pomIncludes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/tck/security-standalone/src/test/resources/arquillian.xml b/tck/security-standalone/src/test/resources/arquillian.xml
new file mode 100644
index 0000000000..63da888ebd
--- /dev/null
+++ b/tck/security-standalone/src/test/resources/arquillian.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+    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.
+-->
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="
+              http://jboss.org/schema/arquillian
+              http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+    <defaultProtocol type="Servlet 5.0"/>
+
+    <container qualifier="tomee-plus" default="true">
+        <configuration>
+            <property name="httpPort">-1</property>
+            <property name="ajpPort">-1</property>
+            <property name="stopPort">-1</property>
+            <property name="classifier">plus</property>
+            <property name="debug">false</property>
+            <property name="cleanOnStartUp">true</property>
+            <property name="dir">target/tomee</property>
+            <property name="appWorkingDir">target/workdir</property>
+            <property name="catalina_opts">-Xmx512m</property>
+            <property name="properties">
+                openejb.environment.default=true
+            </property>
+        </configuration>
+    </container>
+</arquillian>