Skip to content

Commit

Permalink
security test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Apr 15, 2024
1 parent 55436b7 commit 9e2bcc7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3247,7 +3247,7 @@ private CrossClusterApiKeyAccessWithSerialization randomCrossClusterApiKeyAccess
}
]
}""",
"[{\"cluster\":[\"cross_cluster_search\"],"
"[{\"cluster\":[\"cross_cluster_search\",\"monitor_enrich\"],"
+ "\"indices\":[{\"names\":[\"logs*\"],"
+ "\"privileges\":[\"read\",\"read_cross_cluster\",\"view_index_metadata\"]}],"
+ "\"applications\":[],\"run_as\":[]}]"
Expand Down Expand Up @@ -3300,7 +3300,7 @@ private CrossClusterApiKeyAccessWithSerialization randomCrossClusterApiKeyAccess
}
]
}""",
"[{\"cluster\":[\"cross_cluster_search\",\"cross_cluster_replication\"],"
"[{\"cluster\":[\"cross_cluster_search\",\"monitor_enrich\",\"cross_cluster_replication\"],"
+ "\"indices\":[{\"names\":[\"logs*\"],\"privileges\":[\"read\",\"read_cross_cluster\",\"view_index_metadata\"],"
+ "\"field_security\":{\"grant\":[\"*\"],\"except\":[\"private\"]},\"query\":\"{\\\"term\\\":{\\\"tag\\\":42}}\"},"
+ "{\"names\":[\"archive\"],\"privileges\":[\"cross_cluster_replication\",\"cross_cluster_replication_internal\"],"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public void testCrossClusterAccessWithInvalidRoleDescriptors() {
assertThat(
actual.getMessage(),
equalTo(
"Role descriptor for cross cluster access can only contain index privileges but other privileges found for subject ["
"Role descriptor for cross cluster access can only contain index and " +
"cluster privileges but other privileges found for subject ["
+ expectedPrincipal
+ "]"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void testCreateApiKeyRequestHasTypeOfCrossCluster() throws Exception {
List.of(
new RoleDescriptor(
"cross_cluster",
new String[] { "cross_cluster_search" },
new String[] { "cross_cluster_search", "monitor_enrich" },
new RoleDescriptor.IndicesPrivileges[] {
RoleDescriptor.IndicesPrivileges.builder()
.indices("logs")
Expand Down

0 comments on commit 9e2bcc7

Please sign in to comment.