provider-sql
provider-sql copied to clipboard
How to do "GRANT ALL ON SCHEMA public TO demo;" in postgres grant?
What problem are you facing?
I'm trying for postgres Grant to invoke:
GRANT ALL ON SCHEMA public TO demo;
but can't find anything that would allow me to do it. Is there any way?
How could Crossplane help solve your problem?
I'd expect for grant object to have such an option.
Hi, I was checking quite a similar feature but seems like the grant privileges at the table/schema level is not supported by the provider.
I'm considering trying to contribute to add this feature. But I'm not really familiar with Go. I was checking this: https://github.com/crossplane-contrib/provider-sql/blob/35ae0ec0b00b2b3436ac16c67b4e8aeea0c61532/pkg/controller/postgresql/grant/reconciler.go#L253
Hi @sokoow and @Bastichou I am currently facing issues on the same spectrum as you guys are, having grant privileges at table/schema level is needed to solve the major scenarios i am running into with the provider
Did you guys have any luck working around these limitations?
Hi,
Unfortunately not yet.. I just had time to have a look to the base code. Like I said this would be my first contribution so I don't have any ETA.
Same here. GRANT privilege ON table/schema
is an essential and highly needed feature. Without this, there is no way to manage user permissions declaratively :(
Hi,
I agree with the previous comments especially as the Public schema is no longer really public since the version 15 of PostgreSQL (cf https://www.cybertec-postgresql.com/en/error-permission-denied-schema-public/).
This feature is important for one of my projects because we will not stay on PostgreSQL version 14 forever...
Hi guys,
I have a work in progress to fix this issue. Too early yet to have a PR but i'll keep you posted.
Goal is to add the management of Schema resource and then extend the Grant resource to allow schema reference.
https://github.com/Bastichou/provider-sql/tree/feat/support-pgsql-schema-resource