-
Notifications
You must be signed in to change notification settings - Fork 10
Revoke all from public on c functions #318
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
Revoke all from public on c functions #318
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❌ Your project status has failed because the head coverage (85.40%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## TDE_REL_17_STABLE #318 +/- ##
==================================================
Coverage 85.39% 85.40%
==================================================
Files 22 22
Lines 2602 2603 +1
Branches 393 394 +1
==================================================
+ Hits 2222 2223 +1
Misses 304 304
Partials 76 76
🚀 New features to boost your workflow:
|
fecffc9
to
eaa8f25
Compare
contrib/pg_tde/t/001_basic.pl
Outdated
LEFT JOIN LATERAL aclexplode(proacl) ON TRUE | ||
WHERE | ||
proname LIKE 'pg_tde%' AND | ||
lanname = 'c' AND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this test could skip this condition, and check all functions? We only allow a few functions by default, so the list would be short, and then it would also verify the sql language functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to check the sql language functions we should probably just do the ones that are SECURITY DEFINER, which currently is none. I did consider adding that, but as there are none it felt a bit weird 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added security definer functions for considerations if there ever are any :) .
I support the general idea but I am pretty sure we have some functions which should be default be callable by anyone, e.g. |
eaa8f25
to
59e7777
Compare
Added |
59e7777
to
8d1f004
Compare
Even though we do have some access control in most of our C functions, it seems dangerous to not revoke them from public by default. A whitelist of allowed functions seems safer than a black list. Also include non-C functions which are security definer.
8d1f004
to
0f3ad27
Compare
Added |
It feels better to have a white list of publicly executable functions than a black list.
I wasn't sure where tests that asserts that CREATE EXTENSION does the right thing belongs, but it felt like basic usage to me so I put the assertion that this is done there.
We don't have any security definer functions, but if we did they would also need to be revoked from public by default.