Skip to main content

PostgreSQL RBAC management for DBWarden

Project description

dbwarden-pgsql-rbac

PostgreSQL RBAC object handlers for DBWarden.

Brings roles, grants, default privileges, and row-level security policies into DBWarden's schema diff, so access control is versioned and migrated alongside your tables.

Object types

Object type Manages
role CREATE/ALTER/DROP ROLE, including LOGIN, SUPERUSER, and connection limits
default_privileges ALTER DEFAULT PRIVILEGES
policies CREATE/ALTER/DROP POLICY and ROW LEVEL SECURITY state
grants GRANT / REVOKE on tables and other objects

Roles register first: nothing can be granted to a role that does not exist yet, and both policies and default privileges reference roles by name.

Installation

dbwarden plugin add dbwarden-pgsql-rbac

Trust tier

This is an official DBWarden plugin. Its distribution name is classified before any of its code is imported, and dbwarden plugin add verifies the PyPI Trusted-Publishing attestation (PEP 740) against dbwarden-org/dbwarden-pgsql-rbac before installing. It loads automatically once installed, with no dbwarden plugin trust step.

Development

uv venv && uv pip install -e . -e ../dbwarden pytest
pytest -q

The tests/test_conformance.py suite runs DBWarden's shared conformance harness (dbwarden.plugin_conformance): entry point resolution, no import-time side effects, hook signatures, public-API-only imports, and idempotent setup().

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbwarden_pgsql_rbac-0.1.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbwarden_pgsql_rbac-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file dbwarden_pgsql_rbac-0.1.1.tar.gz.

File metadata

  • Download URL: dbwarden_pgsql_rbac-0.1.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for dbwarden_pgsql_rbac-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5954f04a3f175d695ae734dd93132030b5a27c4dad44a2b621e205a8eec69db9
MD5 d7be22e9de40889df58600000324dace
BLAKE2b-256 2fd0757bedf8d977e5aff7b5e27e0b3ad5201c5bf103e4d64636386fc21cc1e8

See more details on using hashes here.

File details

Details for the file dbwarden_pgsql_rbac-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dbwarden_pgsql_rbac-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 337055dffbd989ecef6a8e25134bb81917a7e50287df93ea3b358c911ceccc5f
MD5 cadbf9ecc97caf40fcc7c50dee273607
BLAKE2b-256 7429b7aaf99d41a249a5bba93e87a09cfa197c138ca3ba137eeb9001b109c676

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page