Registry / auth-security / minikerberos

minikerberos

JSON →
library0.4.9pypypi✓ verified 84d ago

Pure Python library for Kerberos manipulation, including AS-REQ, TGS-REQ, Kerberoasting, ASREP roasting, and cross-domain authentication. Version 0.4.9 supports Python >=3.6 and is actively maintained on GitHub by skelsec. Release cadence is irregular, with security fixes and feature additions.

pip install minikerberos
INSTALL
IMPORT
SIG · MINIKERBEROS
M
minikerberos
auth-securitypythonv0.4.9
Install
3.8s avg
Import
485ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.492s · 50.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.478s · 51MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AIOKerberosClient
from minikerberos.aioclient import AIOKerberosClient
Main asynchronous client class
KerberosClient
from minikerberos.client import KerberosClient
Synchronous client class
getKerberosTGT
from minikerberos.common import getKerberosTGT
Utility to obtain TGT

Basic example: authenticate and obtain a TGT using the asynchronous client.

from minikerberos.aioclient import AIOKerberosClient from minikerberos.common import getKerberosTGT import asyncio async def example(): username = 'administrator' domain = 'example.local' password = 'password123!' # Use environment variable for sensitive data (replace with actual auth if needed) # username = os.environ.get('KRB_USER', 'administrator') # password = os.environ.get('KRB_PASS', '') # domain = os.environ.get('KRB_DOMAIN', 'example.local') client = AIOKerberosClient(domain, username, password) tgt = await client.get_TGT() print('TGT obtained successfully') asyncio.run(example())
Debug
Known issues
breakingAPI changed significantly between versions 0.3.x and 0.4.x. The old synchronous client (minikerberos.client) was replaced with both sync and async versions. Many function signatures changed.
fix
Review the examples at https://github.com/skelsec/minikerberos/tree/master/examples for updated usage.
affects: <=0.3.x -> >=0.4.0
gotchaThe 'oscrypto' library is optional but required for PKI-based auth. Installation does not prompt; you must install it manually (pip install oscrypto) if using certificates.
fix
pip install oscrypto
affects: >=0.4.4
deprecatedThe top-level imports like 'from minikerberos import KerberosClient' are deprecated. Correct import paths use submodules.
fix
Use 'from minikerberos.client import KerberosClient' or 'from minikerberos.aioclient import AIOKerberosClient'.
affects: >=0.4.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'minikerberos'
Library not installed or installed in wrong environment.
fix
Run 'pip install minikerberos' in the correct Python environment.
'KerberosClient' object has no attribute 'get_TGT'
Using old synchronous client API. In 0.4.x, the method is 'get_TGT()' on async client, but synchronous client uses a different method.
fix
Use 'AIOKerberosClient' with async/await, or check minikerberos.client for sync methods (e.g., 'KerberosClient().tgt' attribute after login).
ValueError: Only unicode objects are acceptable for encoding
Passing bytes instead of string for text fields (e.g., username, password).
fix
Ensure all string parameters are Python str, not bytes. Use .decode() if necessary.
oscrypto.errors.LibraryNotFoundError: No crypto library found
oscrypto not installed but required for PKI operations (e.g., using certificates).
fix
pip install oscrypto
Upgrade
Version history
0.4.9latest on PyPI · released Oct 29, 2025
Audit
Dependencies
asn1cryptorequiredASN.1 encoding/decoding for Kerberos structures
oscryptooptionalCryptographic operations (required only for PKI/auth)
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources
minikerberos — pip install minikerberos · libregistry