Skip to main content

ClickHouse RBAC management for DBWarden

Project description

dbwarden-ch-rbac

ClickHouse RBAC object handlers for DBWarden.

Teaches DBWarden's schema diff to manage ClickHouse access control the same way it manages tables: extracted from a live snapshot, diffed against your models, and emitted as reversible migration SQL.

Object types

Object type Manages
ch_settings_profile CREATE/ALTER/DROP SETTINGS PROFILE
ch_role CREATE/ALTER/DROP ROLE
ch_user CREATE/ALTER/DROP USER, including auth, host, and default roles
ch_quota CREATE/ALTER/DROP QUOTA
ch_row_policy CREATE/ALTER/DROP ROW POLICY
ch_named_collection CREATE/ALTER/DROP NAMED COLLECTION, with secret values redacted in snapshots
ch_grant GRANT / REVOKE

Handlers register in ClickHouse's RBAC dependency order (profiles, then roles, then users, then everything that references them) so a single migration applies cleanly in one pass.

Installation

dbwarden plugin add dbwarden-ch-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-ch-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_ch_rbac-0.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

dbwarden_ch_rbac-0.1.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dbwarden_ch_rbac-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a760395af7c8a83e930172726462c5d425cddfce8b5579cb26cd2a9a24b5b08
MD5 5f61c1845125203b12e48001c9a84835
BLAKE2b-256 bed26a42cfe73a604c46730edee67cf1973414ce9355093ffd11dc18afe4d5de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbwarden_ch_rbac-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 106a5f9201f2250127eab2d6fbccfa174c2506ebaeaff349eba4c47a741d5955
MD5 94b73d4bd9556ddafb2744d53c41b724
BLAKE2b-256 5ee88bf6ca7fc84f13f5ecd48053ec76964b7e3d07da6825efde73752c08c8d1

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