Skip to content

Commit 5ff384c

Browse files
committed
few event adjustments
1 parent afa7bae commit 5ff384c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

service/common/src/main/java/org/apache/polaris/service/admin/PolarisServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public Response rotateCredentials(
429429
PolarisAdminService adminService = newAdminService(realmContext, securityContext);
430430
PrincipalWithCredentials rotatedPrincipal = adminService.rotateCredentials(principalName);
431431
polarisEventListener.onAfterCredentialsRotate(
432-
new AfterCredentialsRotateEvent(eventId, principalName, rotatedPrincipal), callContext);
432+
new AfterCredentialsRotateEvent(eventId, rotatedPrincipal), callContext);
433433
return Response.ok(rotatedPrincipal).build();
434434
}
435435

@@ -885,7 +885,7 @@ public Response addGrantToCatalogRole(
885885
}
886886
polarisEventListener.onAfterAddGrantToCatalogRole(
887887
new AfterAddGrantToCatalogRoleEvent(
888-
eventId, catalogName, catalogRoleName, privilege, grantRequest),
888+
eventId, catalogName, catalogRoleName, privilege, grantRequest.getGrant()),
889889
callContext);
890890
return Response.status(Response.Status.CREATED).build();
891891
}

service/common/src/main/java/org/apache/polaris/service/events/AfterAddGrantToCatalogRoleEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package org.apache.polaris.service.events;
2121

2222
import org.apache.polaris.core.admin.model.AddGrantRequest;
23+
import org.apache.polaris.core.admin.model.GrantResource;
2324
import org.apache.polaris.core.entity.PolarisPrivilege;
2425

2526
/**
@@ -29,12 +30,12 @@
2930
* @param catalogName the name of the catalog
3031
* @param catalogRoleName the name of the catalog role
3132
* @param privilege the privilege granted
32-
* @param grantRequest the grant request
33+
* @param grantResource the grant resource
3334
*/
3435
public record AfterAddGrantToCatalogRoleEvent(
3536
String eventId,
3637
String catalogName,
3738
String catalogRoleName,
3839
PolarisPrivilege privilege,
39-
AddGrantRequest grantRequest)
40+
GrantResource grantResource)
4041
implements PolarisEvent {}

service/common/src/main/java/org/apache/polaris/service/events/AfterCredentialsRotateEvent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
* Event fired after credentials are rotated for a principal in Polaris.
2626
*
2727
* @param eventId the unique identifier for this event
28-
* @param principalName the name of the principal whose credentials were rotated
2928
* @param rotatedPrincipal the updated principal with new credentials
3029
*/
3130
public record AfterCredentialsRotateEvent(
32-
String eventId, String principalName, PrincipalWithCredentials rotatedPrincipal)
31+
String eventId, PrincipalWithCredentials rotatedPrincipal)
3332
implements PolarisEvent {}

0 commit comments

Comments
 (0)