Enable schema declarations for policy tables
There is currently no way for a policy writer to specify the schema (column names) for a table introduced in policy. Once the policy engine knows the schema for a table, it can (i) do syntax checks to ensure rules use the proper number of columns and (ii) enable column-named references for those tables.
This would mean adding statements to the policy language such as schema[p("uuid", "name", "status")] to declare that table p has 3 columns named uuid, name, and status.
This change would also require changes to the policy engine. Currently, column-references are translated into positional-
There are some open questions that need to be answered. What happens when someone (i) adds a schema, (ii) writes rules using column references and (iii) removes and/or changes the schema? This sequence is problematic because we currently implement column-references by compiling away the references at read-time; hence, deleting the schema is impossible if there are column-references (without deleting the rules with col-references) and therefore updating the schema is impossible (without deleting the rules with col-references).
This blueprint requires a spec.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Medium
- Drafter:
- Tim Hinrichs
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by