Kerberos Ticket Manager
Project description
Kerberos Ticket Manager
Simple kinit wrapper to update Kerberos ticket periodically for long running application.
Getting Started
Periodical kerberos ticket update
from krbticket import KrbTicket
ticket = KrbTicket.init("<principal>", "<keytab path>")
ticket.updater_start()
If keytab path
is not specifyed, kinit uses KRB5_KTNAME
env, or /etc/krb5.keytab
to find a keytab file. see: kerberos(1) and kinit(1).
Retry
krbticket supports retry feature utilizing retrying which provides various retry strategy. To change the behavior, pass the options using retry_options
of KrbConfig. The dafault values are:
- wait_exponential_multiplier = 1000
- wait_exponential_multiplier = 30000
- stop_max_attempt_number = 10
from krbticket import KrbTicket
retry_options = {
'wait_exponential_multiplier': 1000,
'wait_exponential_multiplier': 10000,
'stop_max_attempt_number': 5
}
ticket = KrbTicket.init("<principal>", "<keytab path>", retry_options=retry_options)
ticket.updater_start()
Update Interval
TBD
Test
docker run --rm -p 88:88 ksauzz/docker-krb5:0.0.1
pip install -r requirements-test.txt -r requirements.txt
KRB5_CONFIG=tests/conf/krb5.conf.local pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
krbticket-1.0.1.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for krbticket-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0d0e7d38f292d6669524d3dc0f5729b923a1befb18becb131b2846ce75949b |
|
MD5 | 3ee49dabac6b6272f594bb98d8632615 |
|
BLAKE2b-256 | b1eb2e746f249633b361ccc31247dc0d90efa8e7fe6f7ba0ee33415c07149aa8 |