skillfed

python-kadmin-rs

Python interface to the Kerberos administration interface (kadm5)

python-kadmin-rs v0.7.4 182.3K downloads/30d#10,105 on PyPI2
Permissive license MIT Active released

What it is and what it does

python-kadmin-rs wraps a Rust library that provides safe bindings to libkadm5, the Kerberos administration library. It lets you manage Kerberos realms—create, modify, and list principals—either remotely (via password authentication) or locally (on the KDC itself). The package supports both MIT Kerberos and Heimdal variants and loads the library at runtime rather than linking statically, so it can adapt to whichever Kerberos implementation is installed.

The Python API sits atop a thread-safe Rust interface, so you can use it in multithreaded applications without manually managing synchronization. It's early-stage (Alpha) but actively maintained, with wheels built for modern Python versions (3.11–3.15) on macOS and Linux. You'll need the underlying Kerberos library installed on your system for it to work.

Use it for:

  • Automate user provisioning by creating and managing Kerberos principals from Python scripts or applications.
  • Query and list principals in a Kerberos realm for auditing or inventory purposes.
  • Integrate Kerberos administration into a larger identity management or authentication system.
  • Run administrative tasks locally on a KDC without needing separate kadmin command-line tools.
  • Build a web service or API that exposes Kerberos realm management to other systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python bindings for Kerberos administration (kadm5), enabling remote and local management of Kerberos realms through MIT Kerberos or Heimdal.

Yes, if you need to administer Kerberos realms from Python and can tolerate Alpha-stage software. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and offers a clean API for both remote and local operations. Install friction is moderate due to compiled wheels and the system Kerberos dependency, but that is unavoidable for this use case. Not suitable if you require production-grade stability guarantees.

Install

python-kadmin-rs on PyPI

pip

pip install python-kadmin-rs

uv

uv add python-kadmin-rs

poetry

poetry add python-kadmin-rs

Installing python-kadmin-rs

Before you install

Medium install friction due to compiled wheels; requires Python 3.11–3.15 and a compatible Kerberos library (MIT or Heimdal) at runtime. Actively maintained with recent releases, but early-stage (Alpha status).

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

import kadmin

# Remote operation
kadm = kadmin.KAdmin.with_password(
    kadmin.KAdm5Variant.MitClient,
    "user/admin@EXAMPLE.ORG",
    "password"
)
print(kadm.list_principals("*"))

# Local operation
kadm_local = kadmin.KAdmin.with_local(kadmin.KAdm5Variant.MitClient)
print(kadm_local.list_principals("*"))

Requires libkadm5 (MIT Kerberos or Heimdal) installed and discoverable at runtime; not thread-safe without using the sync interface.

Verify before relying

  • Whether the sync interface used by Python bindings fully resolves thread-safety concerns for production workloads.
  • Performance characteristics and scalability limits for bulk principal operations.
  • Compatibility matrix between specific MIT Kerberos and Heimdal versions.
  • Whether local operations require administrative privileges or keytab access.

Package facts

License MIT (permissive)
Python support supports the current Python release (<3.16,>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 182,290/month — #10,105 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_kadmin_rs-0.7.4-cp311-cp311-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp311-cp311-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp311-cp311-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp311-cp311-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp312-cp312-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp312-cp312-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp312-cp312-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp312-cp312-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp313-cp313-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp313-cp313-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp313-cp313-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp313-cp313-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp314-cp314-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp314-cp314-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-manylinux_2_28_x86_64.whl

Keywords: krb5, kadmin, kadm5, kerberos

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: MacOSOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: RustTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Systems Administration :: Authentication/DirectoryTyping :: Typed

Tags

kerberos administration pythonkadm5 bindingskrb5 realm managementkerberos user provisioningkadmin python interfaceheimdal mit kerberos adminkerberos principal management
kerberosauthenticationrust-bindings

More Python Modules packages