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
2 changes: 1 addition & 1 deletion x-pack/plugin/sql/qa/server/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ subprojects {
nonInputProperties.systemProperty 'tests.audit.logfile',
"${-> testClusters.integTest.singleNode().getAuditLog()}"
nonInputProperties.systemProperty 'tests.audit.yesterday.logfile',
"${-> testClusters.integTest.singleNode().getAuditLog().getParentFile()}/integTest_audit-${new Date().format('yyyy-MM-dd')}.json"
"${-> testClusters.integTest.singleNode().getAuditLog().getParentFile()}/integTest_audit-${new Date().format('yyyy-MM-dd')}-1.json.gz"
}

tasks.named("testingConventions").configure { enabled = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,15 @@
public class CliSecurityIT extends SqlSecurityTestCase {

@Override
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/76806")
public void testDescribeWorksAsFullAccess() {}

@Override
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/76806")
public void testQuerySingleFieldGranted() {}

@Override
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/76806")
public void testScrollWithSingleFieldExcepted() {}

@Override
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/76806")
public void testQueryWorksAsAdmin() {}

static SecurityConfig adminSecurityConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
Expand All @@ -44,6 +47,7 @@
import java.util.TreeMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.zip.GZIPInputStream;

import static java.util.Arrays.asList;
import static java.util.Collections.singletonMap;
Expand Down Expand Up @@ -587,8 +591,11 @@ public void assertLogs() throws Exception {
if (localAuditFileRolledOver == false && Files.exists(ROLLED_OVER_AUDIT_LOG_FILE)) {
// once the audit file rolled over, it will stay like this
auditFileRolledOver = true;
// unzip the file
InputStream gzipStream = new GZIPInputStream(Files.newInputStream(ROLLED_OVER_AUDIT_LOG_FILE));
Reader decoder = new InputStreamReader(gzipStream, StandardCharsets.UTF_8);
// the order in the array matters, as the readers will be used in that order
logReaders[0] = Files.newBufferedReader(ROLLED_OVER_AUDIT_LOG_FILE, StandardCharsets.UTF_8);
logReaders[0] = new BufferedReader(decoder);
}
logReaders[1] = Files.newBufferedReader(AUDIT_LOG_FILE, StandardCharsets.UTF_8);
return null;
Expand Down