Skip to content

Commit ae90521

Browse files
committed
applied gradel spotless formating
1 parent 7dfd891 commit ae90521

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,7 @@ static RoleDescriptor kibanaSystem(String name) {
522522
// For ExtraHop and QualysGAV specific actions. Kibana reads, writes and manages this index
523523
// for configured ILM policies.
524524
RoleDescriptor.IndicesPrivileges.builder()
525-
.indices(
526-
"logs-extrahop.investigation-*",
527-
"logs-qualys_gav.asset-*"
528-
)
525+
.indices("logs-extrahop.investigation-*", "logs-qualys_gav.asset-*")
529526
.privileges(
530527
"manage",
531528
"create_index",

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,8 +1890,8 @@ public void testKibanaSystemRole() {
18901890
Arrays.asList(
18911891
"logs-extrahop.investigation-" + randomAlphaOfLength(randomIntBetween(1, 10)),
18921892
"logs-qualys_gav.asset-" + randomAlphaOfLength(randomIntBetween(1, 10))
1893-
).forEach((index) -> {
1894-
final IndexAbstraction indexAbstraction = mockIndexAbstraction(index);
1893+
).forEach((index_qualys_extra_hop) -> {
1894+
final IndexAbstraction indexAbstraction = mockIndexAbstraction(index_qualys_extra_hop);
18951895

18961896
// Assert Read Actions (Allowed by "read")
18971897
assertThat(kibanaRole.indices().allowedIndicesMatcher(GetIndexAction.NAME).test(indexAbstraction), is(true));
@@ -1906,30 +1906,17 @@ public void testKibanaSystemRole() {
19061906

19071907
// Assert Index Management Actions (Allowed by "create_index", "delete_index", and "manage")
19081908
// Allowed by the explicit "create_index" privilege
1909-
assertThat(
1910-
kibanaRole.indices().allowedIndicesMatcher(TransportCreateIndexAction.TYPE.name()).test(indexAbstraction),
1911-
is(true)
1912-
);
1909+
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportCreateIndexAction.TYPE.name()).test(indexAbstraction), is(true));
19131910
// Allowed by the explicit TransportDeleteIndexAction
1914-
assertThat(
1915-
kibanaRole.indices().allowedIndicesMatcher(TransportDeleteIndexAction.TYPE.name()).test(indexAbstraction),
1916-
is(true)
1917-
);
1911+
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportDeleteIndexAction.TYPE.name()).test(indexAbstraction), is(true));
19181912

19191913
// Allowed due to the "manage" privilege and explicit TransportAutoPutMappingAction
1920-
assertThat(
1921-
kibanaRole.indices().allowedIndicesMatcher(TransportPutMappingAction.TYPE.name()).test(indexAbstraction),
1922-
is(true)
1923-
);
1914+
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportPutMappingAction.TYPE.name()).test(indexAbstraction), is(true));
19241915
// Allowed due to the explicit TransportIndicesAliasesAction
1925-
assertThat(
1926-
kibanaRole.indices().allowedIndicesMatcher(TransportIndicesAliasesAction.NAME).test(indexAbstraction),
1927-
is(true)
1928-
);
1916+
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportIndicesAliasesAction.NAME).test(indexAbstraction), is(true));
19291917
// Rollover requires 'manage' on the alias and 'create_index', both of which are granted.
19301918
assertThat(kibanaRole.indices().allowedIndicesMatcher(RolloverAction.NAME).test(indexAbstraction), is(true));
19311919

1932-
19331920
// Assert Denied Actions
19341921
// This role should not have cross-cluster permissions on these indices
19351922
assertThat(kibanaRole.indices().allowedIndicesMatcher(READ_CROSS_CLUSTER_NAME).test(indexAbstraction), is(false));

0 commit comments

Comments
 (0)