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 2021/04/26 14:32:01 UTC

[tomee-tck] branch jakartaee9-tck updated (8afc17b -> 69a89e6)

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

jlmonteiro pushed a change to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git.


    from 8afc17b  add 'staff' group to 'j2ee' user per JAX-RS TCK docs
     new cc0f877  Not needed anymore, as we patch in tomee or tomee-jakarta
     new b7eef05  Let's focus in Plume for the moment so we don't to pay for maintaining others
     new 69a89e6  Security update for permissions tests, jaxrs, servlet and security api

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/openejb/cts/CallbackHandlerImpl.java    | 157 --------
 .../openejb/tck/commands/JavaTestCommand.groovy    |   9 +-
 src/test/tomcat/conf/ProviderConfiguration.xml     |  64 ---
 src/test/tomcat/conf/context.xml                   |   7 -
 src/test/tomcat/conf/provider-configuration.xsd    |  95 -----
 src/test/tomee-plume/conf/catalina.policy          |  72 +++-
 src/test/tomee-plume/conf/context.xml              |   8 -
 src/test/tomee-plume/conf/tomcat-users.xml         |   4 +-
 src/test/tomee-plus/conf/ProviderConfiguration.xml |  64 ---
 src/test/tomee-plus/conf/context.xml               |   7 -
 src/test/tomee-plus/conf/jaspic-providers.xml      | 432 ---------------------
 .../tomee-plus/conf/provider-configuration.xsd     |  95 -----
 src/test/tomee/conf/ProviderConfiguration.xml      |  64 ---
 src/test/tomee/conf/context.xml                    |   7 -
 src/test/tomee/conf/jaspic-providers.xml           | 424 --------------------
 src/test/tomee/conf/provider-configuration.xsd     |  95 -----
 16 files changed, 63 insertions(+), 1541 deletions(-)
 delete mode 100644 src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
 delete mode 100644 src/test/tomcat/conf/ProviderConfiguration.xml
 delete mode 100644 src/test/tomcat/conf/provider-configuration.xsd
 delete mode 100644 src/test/tomee-plus/conf/ProviderConfiguration.xml
 delete mode 100644 src/test/tomee-plus/conf/jaspic-providers.xml
 delete mode 100644 src/test/tomee-plus/conf/provider-configuration.xsd
 delete mode 100644 src/test/tomee/conf/ProviderConfiguration.xml
 delete mode 100644 src/test/tomee/conf/jaspic-providers.xml
 delete mode 100644 src/test/tomee/conf/provider-configuration.xsd

[tomee-tck] 02/03: Let's focus in Plume for the moment so we don't to pay for maintaining others

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit b7eef0539cb203ae65b51180e83d031a1c5da36b
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Mon Apr 26 16:31:00 2021 +0200

    Let's focus in Plume for the moment so we don't to pay for maintaining others
    
    Signed-off-by: Jean-Louis Monteiro <jl...@tomitribe.com>
---
 src/test/tomcat/conf/ProviderConfiguration.xml     |  64 ---
 src/test/tomcat/conf/context.xml                   |   7 -
 src/test/tomcat/conf/provider-configuration.xsd    |  95 -----
 src/test/tomee-plus/conf/ProviderConfiguration.xml |  64 ---
 src/test/tomee-plus/conf/context.xml               |   7 -
 src/test/tomee-plus/conf/jaspic-providers.xml      | 432 ---------------------
 .../tomee-plus/conf/provider-configuration.xsd     |  95 -----
 src/test/tomee/conf/ProviderConfiguration.xml      |  64 ---
 src/test/tomee/conf/context.xml                    |   7 -
 src/test/tomee/conf/jaspic-providers.xml           | 424 --------------------
 src/test/tomee/conf/provider-configuration.xsd     |  95 -----
 11 files changed, 1354 deletions(-)

diff --git a/src/test/tomcat/conf/ProviderConfiguration.xml b/src/test/tomcat/conf/ProviderConfiguration.xml
deleted file mode 100644
index e21cbff..0000000
--- a/src/test/tomcat/conf/ProviderConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<provider-config
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://java.oracle.com/xml/ns/jaspic"
-  xsi:schemaLocation="http://java.oracle.com/xml/ns/jaspic provider-configuration.xsd">
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>null</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>Catalina/localhost /Hello_web/Hello</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web/WrapperServlet</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-</provider-config>
diff --git a/src/test/tomcat/conf/context.xml b/src/test/tomcat/conf/context.xml
index efa2dd5..4685d7c 100644
--- a/src/test/tomcat/conf/context.xml
+++ b/src/test/tomcat/conf/context.xml
@@ -30,12 +30,5 @@
   -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
-    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
-    Does not allow multiple authenticator valve
-    We need to hear back or to find a way to only add this for jaspic webapp or tests
 
-  <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
-           jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
-  />
-    -->
 </Context>
diff --git a/src/test/tomcat/conf/provider-configuration.xsd b/src/test/tomcat/conf/provider-configuration.xsd
deleted file mode 100644
index 9a9f0ad..0000000
--- a/src/test/tomcat/conf/provider-configuration.xsd
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<!--
-  This schema is for ProviderConfiguration entries that describes the 
-  configuration necessary for loading a auth config security provider
-
-  The provider-config element is the root it may have zero or more
-  provider-config-entry
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           targetNamespace="http://java.oracle.com/xml/ns/jaspic"
-           xmlns="http://java.oracle.com/xml/ns/jaspic"
-           elementFormDefault="qualified">
-
-  <xs:element name="provider-config" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="provider-config-entry"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <!--
-      provider-config-entry contains 
-         1) Optional provider-class name or null
-         2) optional properties that conform to the syntax defined by  
-            http://java.sun.com/dtd/properties.dtd
-         3) optional message-layer that indicates which message-layer the provider
-            will act on.
-         4) optional app-context-id the application context id for that specific 
-            application the provider is to be used.
-         5) optional reg-description describes the purpose of the provider.
-  -->
-  <xs:element name="provider-config-entry" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="provider-class"/>
-        <xs:element minOccurs="0" ref="properties"/>
-        <xs:element minOccurs="0" ref="message-layer"/>
-        <xs:element minOccurs="0" ref="app-context-id"/>
-        <xs:element minOccurs="0" ref="reg-description"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="provider-class" type="xs:string"/>
-  <xs:element name="message-layer" type="xs:string"/>
-  <xs:element name="app-context-id" type="xs:string"/>
-  <xs:element name="reg-description" type="xs:string"/>
-  <xs:element name="properties">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="comment"/>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="entry"/>
-      </xs:sequence>
-      <xs:attributeGroup ref="attlist.properties"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.properties">
-    <xs:attribute name="version" default="1.0">
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="1.0"/>
-        </xs:restriction>
-      </xs:simpleType>
-    </xs:attribute>
-  </xs:attributeGroup>
-  <xs:element name="comment" type="xs:string"/>
-  <xs:element name="entry">
-    <xs:complexType mixed="true">
-      <xs:attributeGroup ref="attlist.entry"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.entry">
-    <xs:attribute name="key" use="required"/>
-  </xs:attributeGroup>
-</xs:schema>
diff --git a/src/test/tomee-plus/conf/ProviderConfiguration.xml b/src/test/tomee-plus/conf/ProviderConfiguration.xml
deleted file mode 100644
index e21cbff..0000000
--- a/src/test/tomee-plus/conf/ProviderConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<provider-config
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://java.oracle.com/xml/ns/jaspic"
-  xsi:schemaLocation="http://java.oracle.com/xml/ns/jaspic provider-configuration.xsd">
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>null</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>Catalina/localhost /Hello_web/Hello</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web/WrapperServlet</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-</provider-config>
diff --git a/src/test/tomee-plus/conf/context.xml b/src/test/tomee-plus/conf/context.xml
index 484d69a..b30f568 100644
--- a/src/test/tomee-plus/conf/context.xml
+++ b/src/test/tomee-plus/conf/context.xml
@@ -30,12 +30,5 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
-    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
-    Does not allow multiple authenticator valve
-    We need to hear back or to find a way to only add this for jaspic webapp or tests
 
-    <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
-           jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
-    />
-    -->
 </Context>
diff --git a/src/test/tomee-plus/conf/jaspic-providers.xml b/src/test/tomee-plus/conf/jaspic-providers.xml
deleted file mode 100644
index 73d24c6..0000000
--- a/src/test/tomee-plus/conf/jaspic-providers.xml
+++ /dev/null
@@ -1,432 +0,0 @@
-<?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.
--->
-<jaspic-providers xmlns="http://tomcat.apache.org/xml"
-                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                  xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd"
-                  version="1.0">
-
-
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_autoapplysession_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_customform_base_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_customform_expression_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_form_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test1_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test2_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test3_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_sam_delegation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_sam_obtainbean_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_cleansubject_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_secureresponse_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequest_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequestduringauthen_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequestwithfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_customhandler_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_hashalgorithm_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_hashalgorithmparam_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidcallerquery_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invaliddatasource_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidgroupsquery_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidhashalgorithmparam_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidpriorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_multi_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_notvalidated_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_priorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_priorityuseforexprbean_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_idstorepermission_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_binddn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_groupmemberof_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_groupmemberofnotexist_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidbinddn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidbinddnpassword_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallerbasedn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallernameattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallersearchbase_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallersearchfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupmemberattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupnameattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupsearchbase_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupsearchfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidsearchscopeexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidurl_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_notvalidated_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_priorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopebothonelevel_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopebothsubtree_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopecalleronelevelgroupsubtree_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopecallersubtreegrouponelevel_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopeexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_multi_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_multiauthz_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_noidstore_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_authenticate_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_callerdata_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_ejb_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_getprincipalsbytype_web"
-            description="any">
-  </provider>
-
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /spitests_servlet_web"
-            description="any">
-  </provider>
-
-</jaspic-providers>
-
-
-
-
diff --git a/src/test/tomee-plus/conf/provider-configuration.xsd b/src/test/tomee-plus/conf/provider-configuration.xsd
deleted file mode 100644
index 9a9f0ad..0000000
--- a/src/test/tomee-plus/conf/provider-configuration.xsd
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<!--
-  This schema is for ProviderConfiguration entries that describes the 
-  configuration necessary for loading a auth config security provider
-
-  The provider-config element is the root it may have zero or more
-  provider-config-entry
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           targetNamespace="http://java.oracle.com/xml/ns/jaspic"
-           xmlns="http://java.oracle.com/xml/ns/jaspic"
-           elementFormDefault="qualified">
-
-  <xs:element name="provider-config" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="provider-config-entry"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <!--
-      provider-config-entry contains 
-         1) Optional provider-class name or null
-         2) optional properties that conform to the syntax defined by  
-            http://java.sun.com/dtd/properties.dtd
-         3) optional message-layer that indicates which message-layer the provider
-            will act on.
-         4) optional app-context-id the application context id for that specific 
-            application the provider is to be used.
-         5) optional reg-description describes the purpose of the provider.
-  -->
-  <xs:element name="provider-config-entry" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="provider-class"/>
-        <xs:element minOccurs="0" ref="properties"/>
-        <xs:element minOccurs="0" ref="message-layer"/>
-        <xs:element minOccurs="0" ref="app-context-id"/>
-        <xs:element minOccurs="0" ref="reg-description"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="provider-class" type="xs:string"/>
-  <xs:element name="message-layer" type="xs:string"/>
-  <xs:element name="app-context-id" type="xs:string"/>
-  <xs:element name="reg-description" type="xs:string"/>
-  <xs:element name="properties">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="comment"/>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="entry"/>
-      </xs:sequence>
-      <xs:attributeGroup ref="attlist.properties"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.properties">
-    <xs:attribute name="version" default="1.0">
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="1.0"/>
-        </xs:restriction>
-      </xs:simpleType>
-    </xs:attribute>
-  </xs:attributeGroup>
-  <xs:element name="comment" type="xs:string"/>
-  <xs:element name="entry">
-    <xs:complexType mixed="true">
-      <xs:attributeGroup ref="attlist.entry"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.entry">
-    <xs:attribute name="key" use="required"/>
-  </xs:attributeGroup>
-</xs:schema>
diff --git a/src/test/tomee/conf/ProviderConfiguration.xml b/src/test/tomee/conf/ProviderConfiguration.xml
deleted file mode 100644
index e21cbff..0000000
--- a/src/test/tomee/conf/ProviderConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<provider-config
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://java.oracle.com/xml/ns/jaspic"
-  xsi:schemaLocation="http://java.oracle.com/xml/ns/jaspic provider-configuration.xsd">
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>null</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProvider</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">false</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>SOAP</message-layer>
-    <app-context-id>Catalina/localhost /Hello_web/Hello</app-context-id>
-    <reg-description>TestSuite JSR 196 Config Provider</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-  <provider-config-entry>
-    <provider-class>com.sun.ts.tests.jaspic.tssv.config.TSAuthConfigProviderServlet</provider-class>
-    <properties version="1.0">
-      <entry key="AuthStatus_SEND_SUCCESS">true</entry>
-      <entry key="requestPolicy">USER_NAME_PASSWORD</entry>
-    </properties>
-    <message-layer>HttpServlet</message-layer>
-    <app-context-id>Catalina/localhost /spitests_servlet_web/WrapperServlet</app-context-id>
-    <reg-description>Registration for TSAuthConfigProviderServlet using spitests_servlet_web</reg-description>
-  </provider-config-entry>
-</provider-config>
diff --git a/src/test/tomee/conf/context.xml b/src/test/tomee/conf/context.xml
index 484d69a..b30f568 100644
--- a/src/test/tomee/conf/context.xml
+++ b/src/test/tomee/conf/context.xml
@@ -30,12 +30,5 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
-    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
-    Does not allow multiple authenticator valve
-    We need to hear back or to find a way to only add this for jaspic webapp or tests
 
-    <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
-           jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
-    />
-    -->
 </Context>
diff --git a/src/test/tomee/conf/jaspic-providers.xml b/src/test/tomee/conf/jaspic-providers.xml
deleted file mode 100644
index fc0ebe1..0000000
--- a/src/test/tomee/conf/jaspic-providers.xml
+++ /dev/null
@@ -1,424 +0,0 @@
-<?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.
--->
-<jaspic-providers xmlns="http://tomcat.apache.org/xml"
-                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                  xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd"
-                  version="1.0">
-
-
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_autoapplysession_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_customform_base_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_customform_expression_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_form_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test1_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test2_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_rememberme_test3_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_sam_delegation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_sam_obtainbean_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_cleansubject_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_secureresponse_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequest_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequestduringauthen_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_ham_workflow_validaterequestwithfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_customhandler_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_hashalgorithm_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_hashalgorithmparam_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidcallerquery_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invaliddatasource_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidgroupsquery_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidhashalgorithmparam_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_invalidpriorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_multi_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_notvalidated_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_priorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_priorityuseforexprbean_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_database_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_idstorepermission_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_basic_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_binddn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_groupmemberof_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_groupmemberofnotexist_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidbinddn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidbinddnpassword_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallerbasedn_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallernameattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallersearchbase_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidcallersearchfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupmemberattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupnameattr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupsearchbase_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidgroupsearchfilter_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidsearchscopeexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_invalidurl_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_notvalidated_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_priorityuseforexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopebothonelevel_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopebothsubtree_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopecalleronelevelgroupsubtree_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopecallersubtreegrouponelevel_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_searchscopeexpr_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_ldap_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_multi_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_multiauthz_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_noidstore_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_useforgroup_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_idstore_useforvalidation_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_authenticate_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_callerdata_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_ejb_web"
-            description="any">
-  </provider>
-  <provider name="any"
-            className="org.apache.tomee.security.provider.TomEESecurityAuthConfigProvider"
-            layer="HttpServlet"
-            appContext="Catalina/localhost /securityapi_securitycontext_getprincipalsbytype_web"
-            description="any">
-  </provider>
-</jaspic-providers>
-
-
-
-
diff --git a/src/test/tomee/conf/provider-configuration.xsd b/src/test/tomee/conf/provider-configuration.xsd
deleted file mode 100644
index 9a9f0ad..0000000
--- a/src/test/tomee/conf/provider-configuration.xsd
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<!--
-  This schema is for ProviderConfiguration entries that describes the 
-  configuration necessary for loading a auth config security provider
-
-  The provider-config element is the root it may have zero or more
-  provider-config-entry
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           targetNamespace="http://java.oracle.com/xml/ns/jaspic"
-           xmlns="http://java.oracle.com/xml/ns/jaspic"
-           elementFormDefault="qualified">
-
-  <xs:element name="provider-config" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="provider-config-entry"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <!--
-      provider-config-entry contains 
-         1) Optional provider-class name or null
-         2) optional properties that conform to the syntax defined by  
-            http://java.sun.com/dtd/properties.dtd
-         3) optional message-layer that indicates which message-layer the provider
-            will act on.
-         4) optional app-context-id the application context id for that specific 
-            application the provider is to be used.
-         5) optional reg-description describes the purpose of the provider.
-  -->
-  <xs:element name="provider-config-entry" >
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="provider-class"/>
-        <xs:element minOccurs="0" ref="properties"/>
-        <xs:element minOccurs="0" ref="message-layer"/>
-        <xs:element minOccurs="0" ref="app-context-id"/>
-        <xs:element minOccurs="0" ref="reg-description"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="provider-class" type="xs:string"/>
-  <xs:element name="message-layer" type="xs:string"/>
-  <xs:element name="app-context-id" type="xs:string"/>
-  <xs:element name="reg-description" type="xs:string"/>
-  <xs:element name="properties">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element minOccurs="0" ref="comment"/>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="entry"/>
-      </xs:sequence>
-      <xs:attributeGroup ref="attlist.properties"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.properties">
-    <xs:attribute name="version" default="1.0">
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="1.0"/>
-        </xs:restriction>
-      </xs:simpleType>
-    </xs:attribute>
-  </xs:attributeGroup>
-  <xs:element name="comment" type="xs:string"/>
-  <xs:element name="entry">
-    <xs:complexType mixed="true">
-      <xs:attributeGroup ref="attlist.entry"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:attributeGroup name="attlist.entry">
-    <xs:attribute name="key" use="required"/>
-  </xs:attributeGroup>
-</xs:schema>

[tomee-tck] 03/03: Security update for permissions tests, jaxrs, servlet and security api

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit 69a89e650011b6b7d0129903dbfc8ec9387bc17c
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Mon Apr 26 16:31:34 2021 +0200

    Security update for permissions tests, jaxrs, servlet and security api
    
    Signed-off-by: Jean-Louis Monteiro <jl...@tomitribe.com>
---
 .../openejb/tck/commands/JavaTestCommand.groovy    |  9 ++-
 src/test/tomee-plume/conf/catalina.policy          | 72 ++++++++++++++++------
 src/test/tomee-plume/conf/context.xml              |  8 ---
 src/test/tomee-plume/conf/tomcat-users.xml         |  4 +-
 4 files changed, 63 insertions(+), 30 deletions(-)

diff --git a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
index aece499..f0c9c13 100644
--- a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
+++ b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
@@ -230,12 +230,17 @@ class JavaTestCommand
                 }
 
                 def containerJavaOpts = get('container.java.opts', "")
+
+                // force memory on tasks because with JDK 8 it's computed with a bit too much
+                containerJavaOpts += " -Xmx512m -Dtest.ejb.stateful.timeout.wait.seconds=60"
+
+
                 if (options.contains('security')) {
                     log.info("Enabling server security manager")
 
                     // -Djava.security.properties=conf/security.properties
-                    containerJavaOpts += " -Djava.security.manager " +
-                            "-Djava.security.policy==${project.basedir}/${openejbHome}/conf/catalina.policy " +
+                    containerJavaOpts += " -Djava.security.manager -Dcts.home=${javaeeCtsHome} -Djava.security.debug=none " +
+                            "-Djava.security.policy=${project.basedir}/${openejbHome}/conf/catalina.policy " +
                             "-Djava.security.properties=${project.basedir}/${openejbHome}/conf/security.properties"
                 }
                 if (options.contains('websocket')) {
diff --git a/src/test/tomee-plume/conf/catalina.policy b/src/test/tomee-plume/conf/catalina.policy
index c18010f..82499e5 100644
--- a/src/test/tomee-plume/conf/catalina.policy
+++ b/src/test/tomee-plume/conf/catalina.policy
@@ -62,8 +62,8 @@ grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
 // These permissions apply to the logging API
 // Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
 // update this section accordingly.
-//  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {
+// grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
         permission java.io.FilePermission
          "${java.home}${file.separator}lib${file.separator}logging.properties", "read";
 
@@ -90,6 +90,10 @@ grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
         permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read";
         permission java.util.PropertyPermission "catalina.base", "read";
 
+        // TomEE specific
+        permission java.util.PropertyPermission "tomee.*", "read";
+
+
         // Note: To enable per context logging configuration, permit read access to
         // the appropriate file. Be sure that the logging configuration is
         // secure before enabling such access.
@@ -115,9 +119,14 @@ grant codeBase "file:${catalina.home}/lib/-" {
 
 // If using a per instance lib directory, i.e. ${catalina.base}/lib,
 // then the following permission will need to be uncommented
-// grant codeBase "file:${catalina.base}/lib/-" {
-//         permission java.security.AllPermission;
-// };
+grant codeBase "file:${catalina.base}/lib/-" {
+        permission java.security.AllPermission;
+};
+
+// TomEE webapp for deployment
+grant codeBase "file:${catalina.base}/webapps/tomee/-" {
+    permission java.security.AllPermission;
+};
 
 
 // ========== WEB APPLICATION PERMISSIONS =====================================
@@ -157,6 +166,25 @@ grant {
     permission java.util.PropertyPermission "java.vm.vendor", "read";
     permission java.util.PropertyPermission "java.vm.name", "read";
 
+    // TomEE
+    permission java.util.PropertyPermission "tomee.*", "read";
+    permission java.util.PropertyPermission "openejb.*", "read";
+    permission java.util.PropertyPermission "user.name", "read";
+    permission java.util.PropertyPermission "java.io.tmpdir", "read";
+    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.loader"; // tomee
+    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.core"; // tomee
+    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.realm"; // tomee
+    permission java.io.FilePermission "${catalina.base}/lib/-", "read"; // java ee api class, slf4j, owb, etc
+    permission java.lang.RuntimePermission "accessDeclaredMembers"; // owb
+    permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; // owb
+    permission java.net.SocketPermission "localhost", "connect,resolve"; // jndi
+    permission java.net.SocketPermission "127.0.0.1", "connect,resolve"; // jndi
+    permission javax.security.auth.AuthPermission "modifyPrincipals"; // tomee security
+    permission javax.security.auth.AuthPermission "modifyPrivateCredentials"; // tomee security
+
+    // TomEE for CTS classes in webapps
+    permission java.io.FilePermission "${cts.home}/dist/-", "read";
+
     // Required for OpenJMX
     permission java.lang.RuntimePermission "getAttribute";
 
@@ -175,6 +203,9 @@ grant {
     // Applications using WebSocket need to be able to access these packages
     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
+
+    // TomEE for CTS classes
+    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.ts.*";
 };
 
 
@@ -259,17 +290,22 @@ grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
 // grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
 // };
 
-// ================ Apache TomEE ============== (To be refined)
-grant codeBase "jar:file:${catalina.home}/lib/*!/-" {
-    permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
-    permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.base}/lib/-" {
-    permission java.security.AllPermission;
+// TomEE for CTS configuration
+grant codeBase "file:${cts.home}/dist/com/sun/ts/tests/servlet/ee/spec/security/permissiondd/servlet_ee_spec_security_permissiondd_web/-" {
+    permission java.util.PropertyPermission "cts.*", "read";
+
+    permission java.security.SecurityPermission "CTSPermission1_name";
+    permission java.security.SecurityPermission "CTSPermission1_name2";
+    permission java.security.SecurityPermission "CTSPermission2_name";
+    permission java.security.SecurityPermission "CTSPermission_second_name";
+
+    permission java.lang.RuntimePermission "loadLibrary.*";
+    permission java.lang.RuntimePermission "queuePrintJob";
+
+    permission java.net.SocketPermission "*", "connect";
+
+    permission java.io.FilePermission "*", "read";
+
+    permission java.util.PropertyPermission "*", "read";
 };
-grant {
-        // "standard" properties that can be read by anyone
-        permission java.security.AllPermission ;
-};
\ No newline at end of file
+
diff --git a/src/test/tomee-plume/conf/context.xml b/src/test/tomee-plume/conf/context.xml
index 5d42cfe..3c422ef 100644
--- a/src/test/tomee-plume/conf/context.xml
+++ b/src/test/tomee-plume/conf/context.xml
@@ -30,14 +30,6 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
-    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
-    Does not allow multiple authenticator valve
-    We need to hear back or to find a way to only add this for jaspic webapp or tests
-
-    <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
-           jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
-    />
-    -->
 
     <Environment name="myUrl" value="http://google.com"
                  type="java.net.URL" override="false"/>
diff --git a/src/test/tomee-plume/conf/tomcat-users.xml b/src/test/tomee-plume/conf/tomcat-users.xml
index 7de2b4f..9ce0456 100644
--- a/src/test/tomee-plume/conf/tomcat-users.xml
+++ b/src/test/tomee-plume/conf/tomcat-users.xml
@@ -21,9 +21,9 @@
   <user name="admin" password="admin" roles="manager"/>
   <user name="jave_vi" password="javaee_vi" roles="staff"/>
   <user name="javee_vi" password="javaee_vi" roles="staff"/>
-  <user name="javajoe" password="javajoe" roles="Manager,Employee,guest"/>
+  <user name="javajoe" password="javajoe" roles="Manager,Employee,guest,OTHERROLE"/>
   <user name="javaee" password="javaee" roles="Administrator,Employee,mgr,asadmin"/>
-  <user name="j2ee" password="j2ee" roles="Administrator,Employee,mgr,asadmin,staff"/>
+  <user name="j2ee" password="j2ee" roles="Administrator,Employee,mgr,asadmin,staff,DIRECTOR"/>
 
   <user name="CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US" roles="Administrator"/>
 </tomcat-users>

[tomee-tck] 01/03: Not needed anymore, as we patch in tomee or tomee-jakarta

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit cc0f8779df7871913bfd5806aa57166603fdfb7a
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Mon Apr 26 16:29:42 2021 +0200

    Not needed anymore, as we patch in tomee or tomee-jakarta
    
    Signed-off-by: Jean-Louis Monteiro <jl...@tomitribe.com>
---
 .../apache/openejb/cts/CallbackHandlerImpl.java    | 157 ---------------------
 1 file changed, 157 deletions(-)

diff --git a/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java b/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
deleted file mode 100644
index be3dcaf..0000000
--- a/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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.openejb.cts;
-
-import org.apache.catalina.Contained;
-import org.apache.catalina.Container;
-import org.apache.catalina.realm.GenericPrincipal;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-import org.apache.tomcat.util.res.StringManager;
-
-import jakarta.security.auth.message.callback.CallerPrincipalCallback;
-import jakarta.security.auth.message.callback.GroupPrincipalCallback;
-import jakarta.security.auth.message.callback.PasswordValidationCallback;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * This is a clone of Tomcat default callback handler but with a better handling of the Generic Principals when more than
- * one callback is used.
- *
- * For instance https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java#L96
- * keeps adding new Generic Principals even for the same name whereas the authenticator base
- * https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/authenticator/AuthenticatorBase.java#L956
- * randomly picks the first one. So it results in random failures
- *
- * See https://github.com/eclipse-ee4j/jakartaee-tck/issues/575
- */
-public class CallbackHandlerImpl implements CallbackHandler, Contained {
-
-    private static final StringManager sm = StringManager.getManager(
-        org.apache.catalina.authenticator.jaspic.CallbackHandlerImpl.class);
-    private final Log log = LogFactory.getLog(org.apache.catalina.authenticator.jaspic.CallbackHandlerImpl.class); // must not be static
-
-    private Container container;
-
-
-    @Override
-    public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-
-        String name = null;
-        Principal principal = null;
-        Subject subject = null;
-        String[] groups = null;
-
-        if (callbacks != null) {
-            // Need to combine data from multiple callbacks so use this to hold
-            // the data
-            // Process the callbacks
-            for (Callback callback : callbacks) {
-                if (callback instanceof CallerPrincipalCallback) {
-                    CallerPrincipalCallback cpc = (CallerPrincipalCallback) callback;
-                    name = cpc.getName();
-                    principal = cpc.getPrincipal();
-                    subject = cpc.getSubject();
-                } else if (callback instanceof GroupPrincipalCallback) {
-                    GroupPrincipalCallback gpc = (GroupPrincipalCallback) callback;
-                    groups = gpc.getGroups();
-                } else if (callback instanceof PasswordValidationCallback) {
-                    if (container == null) {
-                        log.warn(sm.getString("callbackHandlerImpl.containerMissing", callback.getClass().getName()));
-                    } else if (container.getRealm() == null) {
-                        log.warn(sm.getString("callbackHandlerImpl.realmMissing",
-                                              callback.getClass().getName(), container.getName()));
-                    } else {
-                        PasswordValidationCallback pvc = (PasswordValidationCallback) callback;
-                        principal = container.getRealm().authenticate(pvc.getUsername(),
-                                                                      String.valueOf(pvc.getPassword()));
-                        subject = pvc.getSubject();
-                    }
-                } else {
-                    log.error(sm.getString("callbackHandlerImpl.jaspicCallbackMissing",
-                            callback.getClass().getName()));
-                }
-            }
-
-            // Create the GenericPrincipal
-            Principal gp = getPrincipal(principal, name, groups);
-            if (subject != null && gp != null) {
-
-                // merge if needed
-                String mergeName = gp.getName();
-                List<String> mergeRoles = new ArrayList<>(Arrays.asList(((GenericPrincipal) gp).getRoles()));
-                Principal mergePrincipal = ((GenericPrincipal) gp).getUserPrincipal();
-
-                for (Object oPrincipal : subject.getPrivateCredentials()) {
-                    if (!(oPrincipal instanceof GenericPrincipal)) {
-                        continue;
-                    }
-                    final GenericPrincipal privateCredential = (GenericPrincipal) oPrincipal;
-                    if (mergeName != null && mergeName.equals(privateCredential.getName())) {
-                        mergeRoles.addAll(Arrays.asList(privateCredential.getRoles()));
-                        subject.getPrivateCredentials().remove(oPrincipal);
-                    }
-                }
-
-                subject.getPrivateCredentials().add(new GenericPrincipal(mergeName, null, mergeRoles, mergePrincipal));
-            }
-        }
-    }
-
-    private Principal getPrincipal(Principal principal, String name, String[] groups) {
-        // If the Principal is cached in the session JASPIC may simply return it
-        if (principal instanceof GenericPrincipal) {
-            return principal;
-        }
-        if (name == null && principal != null) {
-            name = principal.getName();
-        }
-        if (name == null) {
-            return null;
-        }
-        List<String> roles;
-        if (groups == null || groups.length == 0) {
-            roles = Collections.emptyList();
-        } else {
-            roles = Arrays.asList(groups);
-        }
-
-        return new GenericPrincipal(name, null, roles, principal);
-    }
-
-    // Contained interface methods
-    @Override
-    public Container getContainer() {
-        return this.container;
-    }
-
-
-    @Override
-    public void setContainer(Container container) {
-        this.container = container;
-    }
-}