aboutsummaryrefslogtreecommitdiff
path: root/src/tests/t_kdb.py
AgeCommit message (Collapse)AuthorFilesLines
2013-09-28Add "which" function to k5testGreg Hudson1-9/+0
Add a utility function in k5test.py to look for a command in the executable path, and remove it from t_kdb.py.
2013-08-29Make it possible to renew aliased service ticketsGreg Hudson1-0/+8
We always allow aliases in the service principal when processing AS-REQs and TGS-REQs. If the ticket we issued is presented back to us in a TGS-REQ as a header ticket for renewal or similar, we should allow aliases when looking up its key to decode the AP-REQ. ticket: 7699 (new)
2013-08-28Add test for alias to local TGSGreg Hudson1-0/+17
2013-08-28Add tests for service aliases using LDAP moduleGreg Hudson1-8/+34
2013-01-28Refactor LDAP DB option parsing codeGreg Hudson1-1/+1
krb5_ldap_open and krb5_ldap_create contain two large, almost identical blocks of DB option processing code. Factor it out into a new function krb5_ldap_parse_db_params in ldap_misc.c, and simplify the factored-out code. Create a helper function to add server entries and use it to simplify krb5_ldap_read_server_params as well as DB option parsing. Since the new DB option helper uses isspace instead of isblank, we no longer require portability goop for isblank.
2012-12-20Simplify k5test.py environmentsGreg Hudson1-19/+17
The initial k5test.py design, copied from the dejagnu suite, is to create config files and environments for four expected roles: client, server, master, and slave. This approach exaggerates the complexity of the common case, where the configurations don't need to vary, and limits us to having just one slave for kprop/iprop tests. Instead, create just one configuration by default, and add a special_env() method which sets up a differently configured environment for the few test cases which need one. The run_as_*() methods are collapsed into just run(), which accepts an optional argument for the environment returned by special_env().
2012-11-17Fix quoting issues in LDAP KDB moduleGreg Hudson1-2/+0
Modify ldap_filter_correct() to quote special characters for DN strings as well as filters, since it is already used to quote a DN string in krb5_ldap_name_to_policydn() and there's no harm in over-quoting. In krb5_ldap_put_principal(), quote the unparsed principal name for use in DNs we choose. In krb5_ldap_create_password_policy(), use the policy name for the CN of the policy entry instead of the (possibly quoted) first element of the DN. Adapted from a patch by Jim Shi <hanmao_shi@apple.com>. ticket: 7296
2012-11-15Add automated tests for LDAP KDB moduleGreg Hudson1-0/+280
Add new tests kdbtest.c and t_kdb.py. Together these exercise most of the code in the LDAP back end. kdbtest is also run against the DB2 module, which is mostly redundant with other tests, but does exercise the lockout logic a little more thoroughly than t_lockout.py can. To test the LDAP back end, we look for slapd and ldapadd binaries in the path. The system slapd is sometimes constrained by AppArmor or the like, which we can typically work around by making a copy of the binary. slapd detaches before listening on its server socket (this got better in 2.4.27 but still isn't perfect), so we unfortunately have to use a one-second sleep in the slapd setup.