-
Notifications
You must be signed in to change notification settings - Fork 74
feat(pgsql): extend Grant kind specification with schema, tables, columns, sequences, routines, foreign data wrappers, foreign servers #235
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Bastien CERIANI <[email protected]> Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
Signed-off-by: Julien Christophe <[email protected]>
e40c724
to
31dbebe
Compare
Signed-off-by: Julien Christophe <[email protected]>
31dbebe
to
e0f9a4b
Compare
@Duologic, can anyone among the maintainers review this PR? |
Adding @chlunde to the loop - this change is really needed by many Postgres users |
Just tested and I can confirmed that I can achieve
Looking forward to use official provider not custom build. |
@dawidmalina thanks for testing! If we have consensus on the schema design, I think that (and testing) is most important. Linewise, the change is huge (+2000 lines), so getting a few eyes on this would be very helpful. |
Any updates on this? I would really like to see that to be part of the official release. |
@Bastichou could you take a look at this version? I've read through all the issues and closed duplicates, and I think this solves a lot of them. I'd like to make this part of the next release, so thanks a lot for everyone working on this! Two things I would like to test:
@Sabotaz do you think this could be handled in the future, could you expand a bit on this? Thanks! |
Can you elaborate what design you mean? The CRD design? Code design? |
Description of your changes
Fixes #217
This PR is a rework of #218 who is still a draft and will probably be closed soon by his owner (cf. comments).
This PR create more fields in the
forProvider
part of the Grant kind for managing grants on different objects.I refactored #218 by removing the defined
objectType
andobjects
fields, and using specific fields for each type of grant. I believe it follows the original philosophy of the Grant kind better.This PR does not cover the
GRANT xxx ON ALL xxx IN SCHEMA yyy
case.I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
I tested this PR using both
make test
andmake e2e
.I tested the raw queries on my local database.
e2e tests & unit tests have been updated with more Grant configurations :
However, I have only tested requests for multiple objets (i.e:
grant all on table1, table2 to user
) on my local database.I did not test this PR against sql injections, as I believe it is already a problem for the actual Grant feature (see #18 , #22 for mysql, and I would say #22 did not fully fix the problem for mysql as the injection can still be performed using some other fields: database, table, user).