diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java index 51f96b7bba6..48feeaccb26 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java @@ -132,7 +132,8 @@ public class AuditTrailService extends AbstractComponent implements AuditTrail { } @Override - public void accessGranted(User user, String action, TransportMessage message, String[] roleNames, @Nullable Set specificIndices) { + public void accessGranted(User user, String action, TransportMessage message, String[] roleNames, + @Nullable Set specificIndices) { if (licenseState.isAuditingAllowed()) { for (AuditTrail auditTrail : auditTrails) { auditTrail.accessGranted(user, action, message, roleNames, specificIndices); @@ -141,7 +142,8 @@ public class AuditTrailService extends AbstractComponent implements AuditTrail { } @Override - public void accessDenied(User user, String action, TransportMessage message, String[] roleNames, @Nullable Set specificIndices) { + public void accessDenied(User user, String action, TransportMessage message, String[] roleNames, + @Nullable Set specificIndices) { if (licenseState.isAuditingAllowed()) { for (AuditTrail auditTrail : auditTrails) { auditTrail.accessDenied(user, action, message, roleNames, specificIndices); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java index d750a9e8921..56fc079a64f 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java @@ -245,7 +245,8 @@ public class AuthorizationServiceTests extends ESTestCase { assertThrowsAuthorizationException( () -> authorize(createAuthentication(SystemUser.INSTANCE), "cluster:admin/whatever", request), "cluster:admin/whatever", SystemUser.INSTANCE.principal()); - verify(auditTrail).accessDenied(SystemUser.INSTANCE, "cluster:admin/whatever", request, new String[] { SystemUser.ROLE_NAME }, null); + verify(auditTrail).accessDenied(SystemUser.INSTANCE, "cluster:admin/whatever", request, new String[] { SystemUser.ROLE_NAME }, + null); verifyNoMoreInteractions(auditTrail); }