cecemei commented on code in PR #17564:
URL: https://github.com/apache/druid/pull/17564#discussion_r1891060610
##########
server/src/main/java/org/apache/druid/server/security/Access.java:
##########
@@ -21,52 +21,86 @@
import com.google.common.base.Strings;
import org.apache.druid.java.util.common.StringUtils;
+import org.apache.druid.query.filter.DimFilter;
+
+import javax.annotation.Nullable;
+import java.util.Objects;
+import java.util.Optional;
public class Access
{
public static final String DEFAULT_ERROR_MESSAGE = "Unauthorized";
+ public static final String DEFAULT_AUTHORIZED_MESSAGE = "Authorized";
- public static final Access OK = new Access(true);
- public static final Access DENIED = new Access(false);
+ public static final Access OK = Access.allow();
+ public static final Access DENIED = Access.deny("");
private final boolean allowed;
private final String message;
+ // A row-level policy filter on top of table-level read access. It should be
empty if there are no policy restrictions
+ // or if access is requested for an action other than reading the table.
+ private final Optional<DimFilter> rowFilter;
Review Comment:
Added a Policy class, plz review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]