The PyKerberos package is a high-level wrapper for Kerberos (GSSAPI) operations, with the goal of avoiding building a module that wraps the entire Kerberos.framework, and instead provides a limited set of functions to accomplish what is required for client/server Kerberos authentication.

Most of the C code was adapted from Apache’s mod_auth_kerb-5.0rc7.

test

To run tests in the test folder, you must have valid Kerberos setup on the test computer.

The script .travis.sh can be used as a quick and easy way to set up a Kerberos KDC and Apache web endpoint available for testing. Otherwise you can also run the following command to run a self-contained Docker container:

docker run \
-v $(pwd):/app \
-w /app \
-e PYENV=2.7.13 \
-e KERBEROS_USERNAME=administrator \
-e KERBEROS_PASSWORD=Password01 \
-e KERBEROS_REALM=example.com \
-e KERBEROS_PORT=80 \
ubuntu:16.04 \
/bin/bash .travis.sh

The docker command needs to be run in the same directory as the library, which can be tested with different Python versions by changing the value of the PYENV environment value set in the command.

Notice:The checkPassword method provided by the library is for testing purposes only, as it does not provide any protection against possible KDC spoofing. This method should not be used in any production code.

#PyKerberos #Homepage #Documentation #Downloads #High #Level #Wrapper #Kerberos #Operations #PyKerberos

Leave a Comment

Your email address will not be published. Required fields are marked *