Skip to content

Hide sensitive columns #2654

Answered by steve-chavez
seven1240 asked this question in Q&A
Discussion options

You must be logged in to vote

I could add a "updateble view" to hide the column, but view has no foreign key info.

We infer the FKs of a view, see https://postgrest.org/en/stable/api.html#embedding-views, so you can use an auto-updatable view for that.

or is there some other way to play with the PostgreSQL roles manually?

Additionally you could GRANT SELECT(col1, col2) ON tbl TO role and not include the password column. Then only make the UPDATE available through a SECURITY DEFINER function.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by seven1240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2653 on February 09, 2023 18:53.