...
Boolean logic and wildcards are required
Group | Type | Expression | Description |
---|---|---|---|
org:whatever:app:somePolicy | ref/basis groups as members | (group.campus =~ ['palmer', southern'] and group.termStart - 7 > sysdate and group.termEnd + 7 < sysdate) | Give me groups as members where campus and term match |
org:whatever2:app2:somePolicy2 | subjects as members | person.primaryAffiliation =~ ['faculty', 'staff'] and person.dept =~ ['physics', 'math'] | Subjects in a role and dept |
org:whatever3:app3:somePolicy3 | could have some groups and subjects | (group.campus =~ ['palmer', southern'] and group.termStart - 7 > sysdate and group.termEnd + 7 < sysdate) or (person.primaryAffiliation =~ ['faculty', 'staff'] and person.dept =~ ['physics', 'math']) | Take some group populations and some subjects |
Requirements for expressions
Name | Priority | Description | JSON | GraphQL | SQL | JEXL |
---|---|---|---|---|---|---|
Parsable | Required | Needs to be parsed so we can | Yes | Probably | Probably | Yes |
Library in Grouper already | Nice to have | Avoid library bloat | Yes | Soon perhaps | No (there are Java SQL parsers) | Yes |
Supports boolean logic | Required | and, or, not, etc | Clunky | Yes | Yes | Yes |
Supports grouping | Required | parens | Clunky | Yes | Yes | Yes |
Needs wildcards | Required | Some way to have wildcards for values | Yes | Yes | Yes | Not built in but we can use =^ for "like" |
Seems like JEXL is a good place to start
...