Issue with Applying Privileges for All Schemas #633
Replies: 8 comments
-
Example of YML File using the This shows that the --config option works correctly, and when we run the --real option there is an error with the YML shown above. |
Beta Was this translation helpful? Give feedback.
-
More specifically I need to sync with all schemas for a given database EXCEPT for the public schema. I've tried the global option to handle all schemas for the privileges and also the managed_roles_query to exclude the public schema. The issue is we do not want to have the newly created roles to have privileges on the public schema such as creating new tables. This I know is default PS functionality, so perhaps this can only be accomplished with a post psql script. |
Beta Was this translation helpful? Give feedback.
-
Hi @erin-nielsen, thanks for reaching. There is no If you want to customize per database schema, overwrite Is this clear for you ? Regards, |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the reply @bersace!! BTW we are using Postgres v15.6 with Version 6 of ldap2pg. When we try using the Alternatively, I tried using the global option on the privileges as it seems to indicate this in the documentation that it doesn't really support the I also tried using the schemas_query and while the query is correct, that too resulted in no privileges being granted. I can only seem to get it to work if I explicitly specify the schemas, but the issue is if new ones are created we do not want to have to update the YML. |
Beta Was this translation helpful? Give feedback.
-
BTW - you may see I'm also playing with managed_roles_query. The customer is wanting the new roles being created to not have any privileges granted to them within the public schema, which PS does by default. I'm not sure we can accomplish this using ldap2pg or not, it may just have to be a custom script that's run post sync.. |
Beta Was this translation helpful? Give feedback.
-
Can we can possibly an update on my questions? Thank you!!!!! |
Beta Was this translation helpful? Give feedback.
-
Hi Erin,
I you include |
Beta Was this translation helpful? Give feedback.
-
Please paste code instead of screenshot.
Comparing Note that |
Beta Was this translation helpful? Give feedback.
-
Hello!
I am having an issue with the YML specifically the "grant" tag, using version 6.
The documentation states for ldap2pg v4.0 (https://ldap2pg.readthedocs.io/en/latest/changelog/?h=__all__#ldap2pg-40)
Deprecation:
schema __all__
should be used instead of__all__
The following YML snippet will not pick up ANY schemas to set the privileges. And does not work for either the --config or --real option.
The following YML snippet will yield the correct results with the --config option, however when I run with the --real option we encounter the following error that seems to indicate that this token is not being replaced and it is using it as a literal value.
A work-around is to specify each schema name which DOES grant privileges correctly however, the requirement is for this to be dynamic if new schemas are being created. Therefore, this work-around is not acceptable.
Is there another way to achieve the grant privileges to all schemas?
Thank you!
Erin
Beta Was this translation helpful? Give feedback.
All reactions