{"id":24034,"library":"minikerberos","title":"minikerberos","description":"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.","status":"active","version":"0.4.9","language":"python","source_language":"en","source_url":"https://github.com/skelsec/minikerberos","tags":["kerberos","windows-active-directory","security","authentication","asyncio"],"install":[{"cmd":"pip install minikerberos","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"ASN.1 encoding/decoding for Kerberos structures","package":"asn1crypto","optional":false},{"reason":"Cryptographic operations (required only for PKI/auth)","package":"oscrypto","optional":true}],"imports":[{"note":"Main asynchronous client class","wrong":"","symbol":"AIOKerberosClient","correct":"from minikerberos.aioclient import AIOKerberosClient"},{"note":"Synchronous client class","wrong":"","symbol":"KerberosClient","correct":"from minikerberos.client import KerberosClient"},{"note":"Utility to obtain TGT","wrong":"","symbol":"getKerberosTGT","correct":"from minikerberos.common import getKerberosTGT"}],"quickstart":{"code":"from minikerberos.aioclient import AIOKerberosClient\nfrom minikerberos.common import getKerberosTGT\nimport asyncio\n\nasync def example():\n    username = 'administrator'\n    domain = 'example.local'\n    password = 'password123!'\n    # Use environment variable for sensitive data (replace with actual auth if needed)\n    # username = os.environ.get('KRB_USER', 'administrator')\n    # password = os.environ.get('KRB_PASS', '')\n    # domain = os.environ.get('KRB_DOMAIN', 'example.local')\n    client = AIOKerberosClient(domain, username, password)\n    tgt = await client.get_TGT()\n    print('TGT obtained successfully')\n\nasyncio.run(example())","lang":"python","description":"Basic example: authenticate and obtain a TGT using the asynchronous client."},"warnings":[{"fix":"Review the examples at https://github.com/skelsec/minikerberos/tree/master/examples for updated usage.","message":"API 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.","severity":"breaking","affected_versions":"<=0.3.x -> >=0.4.0"},{"fix":"pip install oscrypto","message":"The '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.","severity":"gotcha","affected_versions":">=0.4.4"},{"fix":"Use 'from minikerberos.client import KerberosClient' or 'from minikerberos.aioclient import AIOKerberosClient'.","message":"The top-level imports like 'from minikerberos import KerberosClient' are deprecated. Correct import paths use submodules.","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install minikerberos' in the correct Python environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'minikerberos'"},{"fix":"Use 'AIOKerberosClient' with async/await, or check minikerberos.client for sync methods (e.g., 'KerberosClient().tgt' attribute after login).","cause":"Using old synchronous client API. In 0.4.x, the method is 'get_TGT()' on async client, but synchronous client uses a different method.","error":"'KerberosClient' object has no attribute 'get_TGT'"},{"fix":"Ensure all string parameters are Python str, not bytes. Use .decode() if necessary.","cause":"Passing bytes instead of string for text fields (e.g., username, password).","error":"ValueError: Only unicode objects are acceptable for encoding"},{"fix":"pip install oscrypto","cause":"oscrypto not installed but required for PKI operations (e.g., using certificates).","error":"oscrypto.errors.LibraryNotFoundError: No crypto library found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}