Conversation
Signed-off-by: Bastien CERIANI <bastien.ceriani@gmail.com> Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Julien Christophe <julien.christophe@datanumia.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
…-grant-support-to-schema
…-grant-support-to-schema
38ce595 to
6e47912
Compare
Quote multiple parameters in GRANT/REVOKE statements to prevent SQL injection. Qualify aclexplode ACL column references with their table aliases (n.nspacl, db.datacl) for consistency. Error instead of panic for Observe, Create, and Delete. Add tests to assert generated SQL strings directly. Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
ac42126 to
e9b0e9a
Compare
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
|
hey @fernandezcuesta, I think another issue stemming from the rebase and Crossplane v2 adjustment may be the fact that cluster variant of apiVersion: postgresql.sql.crossplane.io/v1alpha1
kind: Grant
metadata:
name: demo-application-staging-user-1
spec:
deletionPolicy: Delete
forProvider:
database: demo-application-staging-dedicated
databaseRef:
name: demo-application-staging-dedicated
privileges:
- SELECT
role: demo-application-staging-user
roleRef:
name: demo-application-staging-user
schema: public
tables:
- deployments
managementPolicies:
- '*'
providerConfigRef:
name: demo-application-staging-user-db-connectionto apply after adding the same behaviour to namespaced reconciler (this PR with these 2 commits) demo-application-staging-dedicated=> SELECT table_schema, table_name, privilege_type
FROM information_schema.table_privileges
WHERE grantee = 'demo-application-staging-user';
table_schema | table_name | privilege_type
--------------+-------------+----------------
public | deployments | SELECT
(1 row)
demo-application-staging-dedicated=> |
…cific database — tables, schemas, sequences, columns, routines, fallback to provider config one's otherwise Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
…espaced Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
591f50b to
582048b
Compare
Thanks! added |
| }, | ||
| RoleTable: { | ||
| "ALL": {"SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "MAINTAIN"}, | ||
| "ALL PRIVILEGES": {"SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "MAINTAIN"}, |
There was a problem hiding this comment.
Hmm, this might break when new privs are added in the provider and running against an old server, or old provider-sql running against a new server. It would be nice to have e2e test coverage and also have a manual dispatch or env var override for e2e to run on a different major version of PostgreSQL?
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ecb0fd337
Maybe try on PG 16 and it will fail if we have e2e coverage here. Or we should state the minimum version is PG 17
There was a problem hiding this comment.
Did a best effort but not 100% confident it's the right approach
Co-authored-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
|
@fernandezcuesta thanks for the effort to follow up on this. Is it possible to test this new build somewhere? |
|
yeah let me finish with the PR review and I'll let you know |
Co-authored-by: Carl Henrik Lunde <chlunde@ifi.uio.no> Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
|
@dawidmalina ghcr.io/crossplane-contrib/provider-sql:v0.15.0-rc.1 |
|
@fernandezcuesta - no issues after switching to this version. Working as expected :) thank you |
Description of your changes
This is a follow up of #235 with some minor issues found while merging from master.
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Added tests