Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import java.io.IOException;
import java.util.Collections;
import java.util.concurrent.TimeoutException;

import org.apache.commons.lang3.RandomStringUtils;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.graphene.page.Page;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.dmr.ModelNode;
import org.jboss.hal.resources.Ids;
import org.jboss.hal.testsuite.Console;
import org.jboss.hal.testsuite.CrudOperations;
Expand All @@ -25,9 +27,11 @@
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.online.ModelNodeResult;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.Values;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;

import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;
import static org.jboss.hal.testsuite.fixtures.undertow.UndertowFixtures.serverAddress;
Expand Down Expand Up @@ -68,15 +72,19 @@ public class AJPListenerConfigurationTest {
private static final String WORKER_TO_BE_EDITED = "worker-to-be-edited-" + RandomStringUtils.randomAlphanumeric(7);

@BeforeClass
public static void setUp() throws IOException, CommandFailedException {
public static void setUp() throws IOException, CommandFailedException, InterruptedException, TimeoutException {
operations.add(IOFixtures.bufferPoolAddress(BUFFER_POOL_TO_BE_EDITED)).assertSuccess();
operations.add(IOFixtures.workerAddress(WORKER_TO_BE_EDITED)).assertSuccess();
operations.add(serverAddress(UNDERTOW_SERVER_TO_BE_TESTED)).assertSuccess();
client.apply(new AddLocalSocketBinding(SOCKET_BINDING));
client.apply(new AddLocalSocketBinding(SOCKET_BINDING_TO_BE_EDITED));
client.apply(new AddLocalSocketBinding(SOCKET_REDIRECT_TO_BE_EDITED));
// Adjusting REQUIRE_AJP_SECRET to satisfy the CVE-2026-15554 fix, see https://access.redhat.com/solutions/7146626
operations.add(Address.of("system-property", "io.undertow.ajp.REQUIRE_AJP_SECRET"),
Values.of("value", ModelNode.FALSE)).assertSuccess();
new Administration(client).restart();
operations.add(serverAddress(UNDERTOW_SERVER_TO_BE_TESTED).and("ajp-listener", AJP_LISTENER_TO_BE_EDITED),
Values.of("socket-binding", SOCKET_BINDING.toLowerCase() + "ref")).assertSuccess();
Values.of("socket-binding", SOCKET_BINDING.toLowerCase() + "ref")).assertSuccess();
}

@AfterClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package org.jboss.hal.testsuite.test.configuration.undertow.server.listener;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

import org.apache.commons.lang3.RandomStringUtils;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.graphene.page.Page;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.dmr.ModelNode;
import org.jboss.hal.resources.Ids;
import org.jboss.hal.testsuite.Console;
import org.jboss.hal.testsuite.CrudOperations;
Expand All @@ -23,9 +25,11 @@
import org.openqa.selenium.WebDriver;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.Values;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;

@RunWith(Arquillian.class)
public class AJPListenerTest {
Expand Down Expand Up @@ -62,14 +66,18 @@ public class AJPListenerTest {
"socket-binding-to-be-removed-" + RandomStringUtils.randomAlphanumeric(7);

@BeforeClass
public static void setUp() throws IOException, CommandFailedException {
public static void setUp() throws IOException, CommandFailedException, InterruptedException, TimeoutException {
operations.add(UndertowFixtures.serverAddress(UNDERTOW_SERVER_TO_BE_TESTED));
client.apply(new AddLocalSocketBinding(SOCKET_BINDING_TO_BE_ADDED));
client.apply(new AddLocalSocketBinding(SOCKET_BINDING_TO_BE_REMOVED));
operations.add(
UndertowFixtures.ajpListenerAddress(UNDERTOW_SERVER_TO_BE_TESTED, AJP_LISTENER_TO_BE_REMOVED),
Values
.of("socket-binding", SOCKET_BINDING_TO_BE_REMOVED.toLowerCase() + "ref"));
// Adjusting REQUIRE_AJP_SECRET to satisfy the CVE-2026-15554 fix, see https://access.redhat.com/solutions/7146626
operations.add(Address.of("system-property", "io.undertow.ajp.REQUIRE_AJP_SECRET"),
Values.of("value", ModelNode.FALSE)).assertSuccess();
new Administration(client).restart();
}

@AfterClass
Expand Down
Loading