| Summary: | Server Test: container managed apps require Security Manager enabled testing for GlassFish,WebLogic, WebSphere, JBoss | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Michael OBrien <michael.f.obrien> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | eclipselink.foundation-inbox, michael.f.obrien |
| Version: | unspecified | Flags: | michael.f.obrien:
documentation+
|
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| URL: | http://wiki.eclipse.org/EclipseLink/Examples/JPA/GlassFishV3_Web_Tutorial#Enabling_the_Security_Manager_in_GlassFish_3 | ||
| Whiteboard: | |||
| Bug Depends on: | 332312 | ||
| Bug Blocks: | 316513, 331162, 333336 | ||
|
Description
Michael OBrien
>Most issues will occur on predeploy()/deploy() of existing EARs with security on
>Specifically GlassFish with the SecurityManager turned on so the following code blocks execute
import java.security.AccessController;
import org.eclipse.persistence.internal.security.PrivilegedAccessHelper;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
AccessController.doPrivileged(...);
}
>GlassFish V3 Security Manager Enablement Turning on the security manager in GlassFish is very simple. It is WebLogic that has some issues that we need to look at surrounding any custom JTA datasources and their specific grants Just an fyi that no Grant elements are required in the EAR if you use the default datasource. <jta-data-source>jdbc/__default</jta-data-source> >We can use the existing code for both and configure the server on the fly by creating and deleting the following two security properties This will simplify partitioning the test suite in secure/unsecured asadmin start-domain asadmin --user admin create-jvm-options -Djava.security.manager asadmin --user admin create-jvm-options -Declipselink.security.usedoprivileged=true asadmin stop-domain asadmin start-domain >Look for the following log to verify. [#|2011-01-14T12:18:45.513-0430|INFO|glassfish3.0.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=11;_ThreadName=Thread-1;|SEC1001: Security Manager is ON.|#] The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |