#PostgreSQL Configuration
1 messages · Page 1 of 1 (latest)
Hi @plain talon , you can use the configuration YAML file's 'database' field to configure the PostgreSQL database. Here are the docs for it: https://docs.permify.co/docs/reference/configuration/. Is this helpful, or are you asking for something else?
Permify offers various options for configuring your Permify API Server.
Thanks for the reply.
We have running applications that use Asp.Net Core for the frontend, Web API in the middle tier, and PostgreSQL as the database. We have created a user configuration system within our frontend application to grant UI based permissions to users for various actions, such as add, edit, delete, retrieve, etc. How can we integrate Permify to manage application-specific database actions(roles, policies), such as add, edit, delete, and select, based on changes made in the frontend user configuration?
For example, let's consider a scenario where our application's user interface is associated with two database tables, and a new user role has been defined in the frontend, taking into account actions like add, edit, delete, with tenant-wise data access. Using Permify, how can we ensure that the permissions or actions configured are reflected in the corresponding database objects?
Hi @plain talon, as far as I understand you have an UI in your frontend app where some permissions, roles could defined from end user and you want to reflect those changes, those new permissions or roles to existing Permify authorization schema. Am I on the right track ?
Yes, you're on the right track. We indeed need to reflect those new permissions or roles in both the existing Permify authorization schema and the database table objects associated with the permission-granting user interface
Thanks for clarifying. I've shared this with my engineering team, and we've had a quick brainstorming session about it. We'll share technical documentation with you on how this could be achieved with our current solution by the end of this week. I hope that works for you @plain talon
Thanks and I'm glad to hear that you've shared the information with your engineering team.
One more doubt, I have defined a sample Permify schema with entity names that correspond to the database table names. However, I have some questions about how the permissions associated with the schema-defined entities, specifically roles and policies, will be reflected within the corresponding database table objects.
For example, we have a database table named 'PurchaseOrder,' and we have two users named 'admin' and 'staff.' When using Permify to configure the relationship and actions for these entities and users, the permissions are set as follows:
Admin:
- Create
- Update
- Delete
- Retrieve (associated tenant data only)
Staff:
- Create
- Retrieve (associated tenant data only)
Could you please explain how these permissions will be enforced within the 'PurchaseOrder' database table? I'm looking for guidance on how the specified permissions will be implemented and managed effectively in Permify
Here is the example schema for the case you described: https://play.permify.co/?s=_mHT40Rw65g4HKgNPWHIM.
About the management part;
- You should write every new data related to authorization using the WriteAPI: https://docs.permify.co/docs/api-overview/data/write-data/
- For efficient and collaborative schema management, we have a suggested workflow that we've commonly seen used by our users: https://docs.permify.co/docs/api-overview/schema/write-schema/#suggested-workflow-for-schema-changes.
Additionally, the technical documentation we'll provide hopefully will further streamline the process for your specific case.
Could you please provide an update on the progress and let me know if there are any specific details or requirements you need from our end?
I have a doubt about how the roles and policies corresponding to the table objects will be defined within PostgreSQL.
Hi @plain talon, sorry for the delayed reply, we've completed the technical documentation that shows how to manage permission on user interface with current version of Permify. Since we don't have the exact details for your model, we just follow a basic scenario to demonstrate the JSON queries. Here is the docs: https://permify.notion.site/Permission-Management-on-UI-99a1773375d84266b8f7d68e8a0d532e wondering your thoughts on this.
To be honest I don't understand the question exactly, could you elaborate more on this ?
I asked about the RLS part.
Okey but what's your concerns or doub specifically on this matter.
You can also open an issue about it to share with the community in our open source: https://github.com/Permify/permify/issues.
I am using PostgreSQL as my application database. How can we implement Row Level Security using Permify to control access to rows in the database table based on the characteristics of the user executing a query?