-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openapi: Add masks
field to /v1/compile results.
#121
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
I had been thinking about something related reading your PR message -- I'm on the fence about encoding masking as function+args: it suggests an openness to the system that we perhaps don't need. Unless of course, want to support exactly that, but I think that's a product decision; we could make both work. I think the simpler, more static approach would be to declare certain well-known mask options, and encode them more directly: {
"masks": {
"tickets.assignee": { "replace": "***" },
"tickets.customer.id": { "md5hash": {} },
"tickets.customer.phone": { "lastN": 4 }
}
} (💭 Unrelated: Do we support three-part refs for masks? What column of which table does |
I hadn't considered this problem because up until just recently, we were not making hard assumptions about what In the LINQ/EF Core use case, 3-part refs usually imply a JOIN being used to look up a field, like jumping from a For the masking use case, I'd assume that the LINQ+UCAST library would have to do one of the following:
What makes this tricky/hard is that in the |
I agree with this opinion-- I'd been mulling over the initial sketch, and realized pretty quickly that unconstrained lists of args are going to be a pain in strongly-typed languages, like C# and Go. Having a more fixed structure as you suggested, with known key-value pairs, should be much easier to scale across languages. (EDIT: I've gone and updated the spec to follow a stronger, more locked-down format, as discussed.) |
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
I suppose I hadn't thought about anything not "a.b" until kurt wanted "a" 😅 So "a.b.c" hadn't crossed my mind, and I don't know if, as a consequence, the compile machinery will let that pass. I think an action item here would be to put some LINQ-specific test cases into the EOPA sources. Perhaps we even need to make |
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
378262a
to
b79cba1
Compare
What Changed?
This PR adds an object property to each
/v1/compile
return type, allowing us to include masking rules in the output for later consumption by downstream tooling.What I have in mind for masking rules looks roughly like:
Where the key is the column name, and the value is an object of the form
{"mask_function": [args...]}
Open Questions
options.masks
)"tickets.assignee": "***"
would indicate a replacement with the constant string***
)