Skip to content

Commit

Permalink
Merge pull request #8904 from istudens/WFLY-6521
Browse files Browse the repository at this point in the history
WFLY-6521 add missing WildFly Security Manager extension to configura…
  • Loading branch information
bstansberry committed May 11, 2016
2 parents 276e41f + be3d828 commit 0657dfd
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package org.jboss.as.test.integration.domain.management.cli;

import java.io.File;
import java.net.SocketPermission;
import java.net.URL;
import java.util.Map;
import java.util.Map.Entry;
Expand All @@ -36,6 +37,7 @@
import org.jboss.as.test.integration.management.base.AbstractCliTestBase;
import org.jboss.as.test.integration.management.util.CLIOpResult;
import org.jboss.as.test.shared.RetryTaskExecutor;
import org.jboss.as.test.shared.TestSuiteEnvironment;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl;
Expand All @@ -45,6 +47,8 @@
import org.junit.BeforeClass;
import org.junit.Test;

import static org.jboss.as.test.shared.integration.ejb.security.PermissionUtils.createPermissionsXmlAsset;

/**
*
* @author Dominik Pospisil <dpospisi@redhat.com>
Expand All @@ -62,6 +66,10 @@ public static void before() throws Exception {
CLITestSuite.createSupport(RolloutPlanTestCase.class.getSimpleName());
final WebArchive war = ShrinkWrap.create(WebArchive.class, "RolloutPlanTestCase.war");
war.addClass(RolloutPlanTestServlet.class);
war.addAsManifestResource(createPermissionsXmlAsset(
new SocketPermission(TestSuiteEnvironment.formatPossibleIpv6Address(CLITestSuite.hostAddresses.get("master")) + ":" + TEST_PORT, "listen,resolve"), // main-one
new SocketPermission(TestSuiteEnvironment.formatPossibleIpv6Address(CLITestSuite.hostAddresses.get("master")) + ":" + (TEST_PORT + 350), "listen,resolve")), // main-three
"permissions.xml");
String tempDir = System.getProperty("java.io.tmpdir");
warFile = new File(tempDir + File.separator + "RolloutPlanTestCase.war");
new ZipExporterImpl(war).exportTo(warFile, true);
Expand Down
22 changes: 22 additions & 0 deletions testsuite/domain/src/test/resources/domain-configs/domain-rbac.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<extension module="org.jboss.as.weld"/>
<extension module="org.jboss.as.webservices"/>
<extension module="org.wildfly.extension.io"/>
<extension module="org.wildfly.extension.security.manager"/>
<extension module="org.wildfly.extension.undertow"/>
</extensions>

Expand Down Expand Up @@ -117,6 +118,13 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:remoting:2.0"/>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="other" cache-type="default">
Expand Down Expand Up @@ -209,6 +217,13 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:remoting:2.0"/>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="other" cache-type="default">
Expand Down Expand Up @@ -301,6 +316,13 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:remoting:2.0"/>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="other" cache-type="default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<extension module="org.jboss.as.webservices"/>
<extension module="org.wildfly.extension.io"/>
<extension module="org.wildfly.extension.messaging-activemq"/>
<extension module="org.wildfly.extension.security.manager"/>
<extension module="org.wildfly.extension.undertow"/>
</extensions>

Expand Down Expand Up @@ -251,6 +252,13 @@
</mail-session>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="other" cache-type="default">
Expand Down Expand Up @@ -512,6 +520,13 @@
</mail-session>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="other">
Expand Down

0 comments on commit 0657dfd

Please sign in to comment.