Skip to content
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

Make column privileges matchable/callable #1

Open
MichaelTiemannOSC opened this issue Jan 15, 2022 · 3 comments
Open

Make column privileges matchable/callable #1

MichaelTiemannOSC opened this issue Jan 15, 2022 · 3 comments

Comments

@MichaelTiemannOSC
Copy link
Contributor

Rather than forcing users to enumerate every possible column name in the schema, column checks could be checked against a pattern (such as a prefix or regex) or even checked via a (lambda) function.

In this way, a USER1 could create and query all columns that their pattern matches (which might be the prefix '' or the pattern r'*').

USER2 could create and query all columns prefixed with 'quant_' and 'user_', but not '_dev'

USER3 could create and query only columns prefixed with 'user_'

This could extend beyond pattern matching to an arbitrary evaluation function, with all the performance and security problems contained therein.

Thoughts, @erikerlandson ?

@erikerlandson
Copy link
Contributor

just to confirm, what you are asking is something like this:

    "columns": [
      { "name": "dev.*", "allow": false }
    ]

so asking trino to hide all columns whose name starts with "dev" ?

@MichaelTiemannOSC
Copy link
Contributor Author

MichaelTiemannOSC commented Jan 15, 2022 via email

@erikerlandson
Copy link
Contributor

Have not yet received a response about whether hidden columns can be given as regex yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants