Update security tests
Original commit: elastic/x-pack-elasticsearch@732a4c5850
This commit is contained in:
parent
b437341ddc
commit
5a25213db9
|
@ -229,7 +229,7 @@ public class JdbcSecurityIT extends SqlSecurityTestCase {
|
||||||
createUser("full_access", "read_all");
|
createUser("full_access", "read_all");
|
||||||
|
|
||||||
expectActionMatchesAdmin(
|
expectActionMatchesAdmin(
|
||||||
con -> con.getMetaData().getTables("%", "%", "%", null),
|
con -> con.getMetaData().getTables("%", "%", "%t", null),
|
||||||
"full_access",
|
"full_access",
|
||||||
con -> con.getMetaData().getTables("%", "%", "%", null));
|
con -> con.getMetaData().getTables("%", "%", "%", null));
|
||||||
new AuditLogAsserter()
|
new AuditLogAsserter()
|
||||||
|
@ -278,7 +278,7 @@ public class JdbcSecurityIT extends SqlSecurityTestCase {
|
||||||
createUser("full_access", "read_all");
|
createUser("full_access", "read_all");
|
||||||
|
|
||||||
expectActionMatchesAdmin(
|
expectActionMatchesAdmin(
|
||||||
con -> con.getMetaData().getColumns("%", "%", "%", "%"),
|
con -> con.getMetaData().getColumns("%", "%", "%t", "%"),
|
||||||
"full_access",
|
"full_access",
|
||||||
con -> con.getMetaData().getColumns("%", "%", "%", "%"));
|
con -> con.getMetaData().getColumns("%", "%", "%", "%"));
|
||||||
new AuditLogAsserter()
|
new AuditLogAsserter()
|
||||||
|
|
|
@ -335,7 +335,7 @@ public abstract class SqlSecurityTestCase extends ESRestTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testShowTablesWorksAsAdmin() throws Exception {
|
public void testShowTablesWorksAsAdmin() throws Exception {
|
||||||
actions.expectShowTables(Arrays.asList("bort", "test"), null);
|
actions.expectShowTables(Arrays.asList(".security-6", "bort", "test"), null);
|
||||||
new AuditLogAsserter()
|
new AuditLogAsserter()
|
||||||
.expectSqlCompositeAction("test_admin", "bort", "test")
|
.expectSqlCompositeAction("test_admin", "bort", "test")
|
||||||
.assertLogs();
|
.assertLogs();
|
||||||
|
@ -344,7 +344,7 @@ public abstract class SqlSecurityTestCase extends ESRestTestCase {
|
||||||
public void testShowTablesWorksAsFullAccess() throws Exception {
|
public void testShowTablesWorksAsFullAccess() throws Exception {
|
||||||
createUser("full_access", "read_all");
|
createUser("full_access", "read_all");
|
||||||
|
|
||||||
actions.expectMatchesAdmin("SHOW TABLES", "full_access", "SHOW TABLES");
|
actions.expectMatchesAdmin("SHOW TABLES LIKE '*t'", "full_access", "SHOW TABLES");
|
||||||
new AuditLogAsserter()
|
new AuditLogAsserter()
|
||||||
.expectSqlCompositeAction("test_admin", "bort", "test")
|
.expectSqlCompositeAction("test_admin", "bort", "test")
|
||||||
.expectSqlCompositeAction("full_access", "bort", "test")
|
.expectSqlCompositeAction("full_access", "bort", "test")
|
||||||
|
|
Loading…
Reference in New Issue