mirror of
https://github.com/Graylog2/graylog2-server.git
synced 2026-03-13 09:32:21 +08:00
Insecure startup of OS in datanode only if explicitly configured (#16108)
* Insecure startup of OS in datanode only if explicitly configured * Data node can be started without starting OS, just to be discovered by pre-flight mode
This commit is contained in:
@@ -41,9 +41,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.file.Path;
|
||||
import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
@@ -67,7 +65,7 @@ public class DatanodeSecuritySetupIT {
|
||||
private Path httpCert;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() throws UnknownHostException {
|
||||
void setUp() {
|
||||
|
||||
String containerHostname = "graylog-datanode-host-" + RandomStringUtils.random(8, "0123456789abcdef");
|
||||
// first generate a self-signed CA
|
||||
@@ -86,6 +84,7 @@ public class DatanodeSecuritySetupIT {
|
||||
// configure transport security
|
||||
datanodeContainer.withEnv("GRAYLOG_DATANODE_TRANSPORT_CERTIFICATE", "datanode-transport-certificates.p12");
|
||||
datanodeContainer.withEnv("GRAYLOG_DATANODE_TRANSPORT_CERTIFICATE_PASSWORD", "password");
|
||||
datanodeContainer.withEnv("GRAYLOG_DATANODE_INSECURE_STARTUP", "false");
|
||||
|
||||
// configure http security
|
||||
datanodeContainer.withEnv("GRAYLOG_DATANODE_HTTP_CERTIFICATE", "datanode-https-certificates.p12");
|
||||
|
||||
@@ -73,6 +73,7 @@ public class DatanodeContainerizedBackend {
|
||||
.withNetwork(network)
|
||||
|
||||
.withEnv("GRAYLOG_DATANODE_OPENSEARCH_LOCATION", IMAGE_WORKING_DIR)
|
||||
.withEnv("GRAYLOG_DATANODE_INSECURE_STARTUP", "true")
|
||||
.withEnv("GRAYLOG_DATANODE_OPENSEARCH_DATA_LOCATION", IMAGE_WORKING_DIR + "/data")
|
||||
.withEnv("GRAYLOG_DATANODE_OPENSEARCH_LOGS_LOCATION", IMAGE_WORKING_DIR + "/logs")
|
||||
.withEnv("GRAYLOG_DATANODE_OPENSEARCH_CONFIG_LOCATION", IMAGE_WORKING_DIR + "/config")
|
||||
|
||||
Reference in New Issue
Block a user