permissions
Manage PostgreSQL database permissions by creating users and roles, granting or revoking privileges, and modifying access controls for databases, schemas, and tables.
Instructions
Database permissions management: users, roles, grants, privileges
Input Schema
Name | Required | Description | Default |
---|---|---|---|
attributes | No | User/role attributes | |
database | No | Database name for grants | |
grantOption | No | Grant with GRANT OPTION | |
operation | Yes | Permission operation to perform | |
password | No | Password for user creation/modification | |
privileges | No | Privileges to grant/revoke | |
rolename | No | Role name for role operations | |
schema | No | Schema name for grants | |
table | No | Table name for grants | |
username | No | Username for user operations |
Input Schema (JSON Schema)
{
"properties": {
"attributes": {
"description": "User/role attributes",
"properties": {
"bypassrls": {
"description": "Bypass row level security",
"type": "boolean"
},
"createdb": {
"description": "Create database privilege",
"type": "boolean"
},
"createrole": {
"description": "Create role privilege",
"type": "boolean"
},
"inherit": {
"description": "Inherit privileges",
"type": "boolean"
},
"login": {
"description": "Login privilege",
"type": "boolean"
},
"replication": {
"description": "Replication privilege",
"type": "boolean"
},
"superuser": {
"description": "Superuser privilege",
"type": "boolean"
}
},
"type": "object"
},
"database": {
"description": "Database name for grants",
"type": "string"
},
"grantOption": {
"default": false,
"description": "Grant with GRANT OPTION",
"type": "boolean"
},
"operation": {
"description": "Permission operation to perform",
"enum": [
"list_users",
"list_roles",
"list_grants",
"list_privileges",
"create_user",
"create_role",
"drop_user",
"drop_role",
"grant_role",
"revoke_role",
"grant_privilege",
"revoke_privilege",
"alter_user",
"alter_role",
"check_permissions",
"grant_all_privileges"
],
"type": "string"
},
"password": {
"description": "Password for user creation/modification",
"type": "string"
},
"privileges": {
"description": "Privileges to grant/revoke",
"items": {
"enum": [
"SELECT",
"INSERT",
"UPDATE",
"DELETE",
"TRUNCATE",
"REFERENCES",
"TRIGGER",
"CREATE",
"CONNECT",
"TEMPORARY",
"EXECUTE",
"USAGE",
"ALL"
],
"type": "string"
},
"type": "array"
},
"rolename": {
"description": "Role name for role operations",
"type": "string"
},
"schema": {
"description": "Schema name for grants",
"type": "string"
},
"table": {
"description": "Table name for grants",
"type": "string"
},
"username": {
"description": "Username for user operations",
"type": "string"
}
},
"required": [
"operation"
],
"type": "object"
}