You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/09/22 18:01:28 UTC

[GitHub] [accumulo-access] keith-turner opened a new issue, #14: Consider adding default expression for empty expressions

keith-turner opened a new issue, #14:
URL: https://github.com/apache/accumulo-access/issues/14

   Accumulo supports the functionality of setting a default expression for the empty expression.  Need to determine if this library should offer a similar functionality that would use a configured access expression when it sees an empty expression.
   
   This could look like the following the API, where when the empty expression is encountered the expression `C&D` is used instead.
   
   ```java
           var evaluator = AccessEvaluator.builder()
                                          .authorizations(authsSet)
                                          .emptyExpressionDefault("C&D")
                                          .build();
   ```
   
   Could possibly have an option to disallow the empty expression instead of this, where it would throw an exception when seeing the empty expression.  Something like the following.
   
   ```java
           var evaluator = AccessEvaluator.builder()
                                          .authorizations(authsSet)
                                          .failOnEmptyExpression(true)
                                          .build();
   ```


-- 
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: notifications-unsubscribe@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider adding default expression for empty expressions [accumulo-access]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on issue #14:
URL: https://github.com/apache/accumulo-access/issues/14#issuecomment-1943209498

   I don't think we really need the default expression, since the caller can easily swap out the empty expression it sees in the data with one it is configured to use instead, if it really wanted to, before it calls the evaluator. That's not really something the evaluator needs to do. The same is true about the failing on empty expressions. It'd be weird for the caller to intentionally pass an empty expression to this library, and then expect this library to throw the exception, rather than it throw the exception itself prior to passing it to the library in the first place.  I think these features would just bloat the API, without adding much utility to calling code.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org