Skip to content

Commit

Permalink
Integrate Epicyro 3.0.0
Browse files Browse the repository at this point in the history
Add GFAuthConfigFactory as "alias" to AuthConfigFileFactory

Update server.policy for a new security property we use

Update authentication TCK runner to directly use epicyro factory
  • Loading branch information
arjantijms committed Sep 17, 2023
1 parent dcaf0ae commit 4c01561
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 8 deletions.
2 changes: 1 addition & 1 deletion appserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<!-- Jakarta Security + Authentication/Authorization -->
<soteria.version>3.0.3</soteria.version>
<exousia.version>2.1.0</exousia.version>
<epicyro.version>3.0.0-M1</epicyro.version>
<epicyro.version>3.0.0</epicyro.version>
<nimbus.version>9.31</nimbus.version>
<jcip.version>1.0.2</jcip.version>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* 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
*/
package com.sun.enterprise.security.jmac.config;

import org.glassfish.epicyro.config.factory.file.AuthConfigFileFactory;

/**
* Temporarily kept around, since there are external references to this class.
*
* <p>
* Should be removed in the next major version of GlassFish.
*/
@Deprecated(forRemoval = true)
public class GFAuthConfigFactory extends AuthConfigFileFactory {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -82,6 +82,7 @@ grant {
permission java.lang.RuntimePermission "closeClassLoader";
permission java.io.SerializablePermission "enableSubstitution";
permission java.security.SecurityPermission "getProperty.package.definition";
permission java.security.SecurityPermission "getProperty.authconfigprovider.factory.providers";
};

// Following grant block is only required by Connectors. If Connectors
Expand Down
23 changes: 19 additions & 4 deletions appserver/tests/tck/authentication/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation. All rights reserved.
Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation. 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
Expand Down Expand Up @@ -177,6 +177,8 @@
<tck-setting key="jaspic.home" value="${glassfish.home}/glassfish"/>
<tck-setting key="harness.log.traceflag" value="true"/>
<tck-setting key="s1as.jvm.options" value="-Dj2eelogin.name=${user}:-Dj2eelogin.password=${password}"/>

<tck-setting key="vendor.authconfig.factory" value="org.glassfish.epicyro.config.factory.file.AuthConfigFileFactory"/>

<tck-setting key="webServerHost" value="localhost"/>
<tck-setting key="webServerPort" value="${port.http}"/>
Expand Down Expand Up @@ -264,7 +266,7 @@
<goal>run</goal>
</goals>
<configuration>
<target>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
<limit maxwait="20">
Expand All @@ -279,6 +281,18 @@
<exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin">
<arg value="enable.jaspic" />
</exec>

<!-- Restart GlassFish in debug mode if so requested -->
<sequential if:set="glassfish.suspend">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="stop-domain" />
</exec>
<echo message="Starting GlassFish in suspended mode, waiting on port 9009" />
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="start-domain"/>
<arg value="--suspend" if:set="glassfish.suspend"/>
</exec>
</sequential>
</target>
</configuration>
</execution>
Expand All @@ -294,11 +308,12 @@
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />

<echo level="info" message="Start running all tests" />
<exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin" resultproperty="testResult">
<arg value="-Dmultiple.tests=${run.test}" if:set="run.test" />
<arg value="run.all"/>
<arg value="runclient.nobinaryfinder" if:set="run.test" />
<arg value="run.all" unless:set="run.test" />
<env key="LC_ALL" value="C" />
</exec>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -83,6 +83,7 @@ grant {
permission java.lang.RuntimePermission "closeClassLoader";
permission java.io.SerializablePermission "enableSubstitution";
permission java.security.SecurityPermission "getProperty.package.definition";
permission java.security.SecurityPermission "getProperty.authconfigprovider.factory.providers";
};

// Following grant block is only required by Connectors. If Connectors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -82,6 +82,7 @@ grant {
permission java.lang.RuntimePermission "closeClassLoader";
permission java.io.SerializablePermission "enableSubstitution";
permission java.security.SecurityPermission "getProperty.package.definition";
permission java.security.SecurityPermission "getProperty.authconfigprovider.factory.providers";
};

// Following grant block is only required by Connectors. If Connectors
Expand Down

0 comments on commit 4c01561

Please sign in to comment.