-
Notifications
You must be signed in to change notification settings - Fork 224
Implement PolicyCatalogHandler and Add Policy Privileges Stage 2: AttachPolicy + DetachPolicy #1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement PolicyCatalogHandler and Add Policy Privileges Stage 2: AttachPolicy + DetachPolicy #1416
Conversation
public static PolarisResolvedPathWrapper getResolvedPathWrapper( | ||
@Nonnull PolarisResolutionManifest resolutionManifest, | ||
@Nonnull PolicyAttachmentTarget target) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to extract all getResolvedPathWrapper
s in PolicyCatalog
to this util class to make them shared between PolicyCatalogHandler
and PolicyCatalog
...ice/common/src/main/java/org/apache/polaris/service/catalog/policy/PolicyCatalogHandler.java
Show resolved
Hide resolved
initializeCatalog(); | ||
} | ||
|
||
private PolarisAuthorizableOperation determinePolicyAttachmentOperation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this confused me when I first saw it called because it's talking about "Attachment" operations when half the time it's used for a "Detachment" operation. Maybe just determineRequiredOperation
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! How about determinePolicyMappingOperation
? This name should represent both attachment and detachment.
...ice/common/src/main/java/org/apache/polaris/service/catalog/policy/PolicyCatalogHandler.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Left one nit comment and a non-blocking question
This is a follow-up of #1357. It adds privilege and auth methods for
attachPolicy
anddetachPolicy
.The tests are in
PolicyCatalogHandlerAuthzTest.java
cc: @flyrain