dlmarion commented on code in PR #6402:
URL: https://github.com/apache/accumulo/pull/6402#discussion_r3560905598
##########
core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java:
##########
@@ -136,14 +157,25 @@ public IteratorOptions describeOptions() {
io.addNamedOption(FILTER_INVALID_ONLY,
"if 'true', the iterator is instructed to ignore the authorizations
and"
+ " only filter invalid visibility labels (default: false)");
- io.addNamedOption(AUTHS,
- "the serialized set of authorizations to filter against (default:
empty"
- + " string, accepts only entries visible by all)");
+ io.addNamedOption(NUM_AUTHS,
+ "The number of serialized authorizations to filter against (default
0)");
+ io.addUnnamedOption(AUTH_PREFIX
+ + "N, where the value is a serialized set of authorizations. N must be
between zero and NUM_AUTHS.");
Review Comment:
> I'm not sure these descriptions really communicate how these are used. Is
the idea that you specify some config like:
>
> ```
> numAuths = 3
> auth_0 = a,b,c
> auth_1 = c,b,d
> auth_2 = a,c,z
> ```
Yes
>
> And then it does something like:
>
> ```
> if (entry.evaluateUsing(auth_0) && entry..evaluateUsing(auth_1) &&
entry..evaluateUsing(auth_2)) {
> return entry;
> }
> ```
>
> Is the idea to replace multiple executions of the iterator with a single
one?
Yes
>
> Instead, I think it might make sense to have a config that preserves the
existing behavior, and extends the existing config:
>
> ```
> auths = a,b,c;c,b,d;a,c,z
> ```
>
> This is simpler, and backwards compatible. The description can be extended
to say: "if multiple serialized sets are configured, separated by semi-colons,
then entries are accepted only if they would be accepted by each of the sets
independently"
I don't think we should do this. The semi-colon can be used in a quoted
authorization.
--
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]