--- id: gssapi version: "1.11.1" license: ISC license_treatment: permissive maintenance: aging --- # gssapi — Python GSSAPI Wrapper License: permissive · Maintenance: aging · Downloads: 5.3M/mo ## What it is and what it does Python-GSSAPI is a wrapper around the GSSAPI C libraries that enables Python applications to perform Kerberos authentication and related security operations. It exposes both a low-level C-style API that closely mirrors RFC 2744 and a high-level, Pythonic object-oriented API for easier integration. The package supports Kerberos as its primary mechanism but is designed to work with other GSSAPI mechanisms as well. The library handles credential acquisition, context initialization, token exchange, and credential delegation. It includes support for multiple RFC extensions (GSS-API Negotiation, credential storage, SASL extensions, and Kerberos-specific features) and provides detailed error handling through typed exceptions. Installation requires a system GSSAPI implementation and C compiler, but pre-built wheels are available for common platforms and Python versions. Use it for: - Implement Kerberos-based single sign-on (SSO) in web applications or services that need to authenticate against Active Directory or MIT Kerberos realms. - Build client libraries that negotiate authentication using SPNEGO (GSS-API Negotiation Mechanism) for interoperability with Windows and Unix systems. - Delegate user credentials to backend services while maintaining security boundaries in multi-tier applications. - Integrate Kerberos authentication into Python-based system administration tools or monitoring agents that operate in enterprise environments. - Implement mutual authentication and secure token exchange for inter-service communication in distributed systems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python-GSSAPI wraps the GSSAPI C libraries to provide both low-level RFC 2744-compliant and high-level Pythonic APIs for Kerberos authentication and related security mechanisms. Yes, if you need Kerberos or GSSAPI authentication in Python and have a working GSSAPI implementation available on your system. The package is production-stable, actively maintained, and provides both low-level and high-level APIs. The main barrier is the system-level dependency on GSSAPI libraries and a C compiler; if those are already in place, installation is straightforward. Not suitable if you lack system GSSAPI support or cannot install a C compiler. ## Install pip install gssapi uv add gssapi poetry add gssapi ## Installing gssapi Before you install: Medium install friction due to compiled C extension requiring a working GSSAPI implementation (such as MIT Kerberos) and a C compiler. The package is actively maintained with recent commits and provides pre-built wheels for common platforms and Python versions. License in practice: ISC license is permissive and imposes minimal restrictions; you can use, modify, and distribute this package with few obligations. Quickstart: pip install gssapi from gssapi.raw import acquire_cred, init_context from gssapi import Name name = Name(b"user@REALM", name_type=None) cred = acquire_cred(name=name) Requires a working GSSAPI implementation (e.g., MIT Kerberos) with header files and a C compiler installed on the system. Verify before relying: - Whether pre-built wheels cover all target deployment platforms or if source compilation is often needed in practice. - Performance characteristics and thread-safety guarantees for the free-threading support (marked as beta in PEP 779). - Real-world compatibility with non-Kerberos GSSAPI mechanisms beyond the documented RFC extensions. ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 5.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kerberos authentication python, gssapi wrapper, kerberos client library, spnego negotiation, credential delegation, gss-api bindings, kerberos, authentication, enterprise-security [View on SkillFed](https://skillfed.io/packages/gssapi) · [View on PyPI](https://pypi.org/project/gssapi/)