summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-06-15 11:14:39 -0400
committerGreg Hudson <ghudson@mit.edu>2012-07-02 00:59:45 -0400
commitd1fe0728c830fe52bdcb5d53c517a9462391069d (patch)
tree9030eff3f99c4fb2f240380999b09be246b8fb41 /src/util
parent49ba7c90fce86581ff6faaa9ee48c80b0be9491e (diff)
downloadkrb5-d1fe0728c830fe52bdcb5d53c517a9462391069d.tar.gz
krb5-d1fe0728c830fe52bdcb5d53c517a9462391069d.tar.xz
krb5-d1fe0728c830fe52bdcb5d53c517a9462391069d.zip
Add krb5_kt_client_default API
The default client keytab is intended to be used to automatically acquire initial credentials for client applications. The current hardcoded default is a placeholder, and will likely change before 1.11. Add test framework settings to ensure that a system default client keytab doesn't interfere with tests, and to allow tests to be written to deliberately use the default client keytab. Add documentation about keytabs to the concepts section of the RST docs, and describe the default client keytab there. ticket: 7188 (new)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/k5test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/k5test.py b/src/util/k5test.py
index f60cb5d0b5..c5669bef29 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -309,6 +309,9 @@ Scripts may use the following realm methods and attributes:
* realm.keytab: A keytab file in realm.testdir. Initially contains a
host keytab unless disabled by the realm construction options.
+* realm.client_keytab: A keytab file in realm.testdir. Initially
+ nonexistent.
+
* realm.ccache: A ccache file in realm.testdir. Initially contains
credentials for user unless disabled by the realm construction
options.
@@ -705,6 +708,7 @@ class K5Realm(object):
self.nfs_princ = 'nfs/%s@%s' % (hostname, self.realm)
self.krbtgt_princ = 'krbtgt/%s@%s' % (self.realm, self.realm)
self.keytab = os.path.join(self.testdir, 'keytab')
+ self.client_keytab = os.path.join(self.testdir, 'client_keytab')
self.ccache = os.path.join(self.testdir, 'ccache')
self.kadmin_ccache = os.path.join(self.testdir, 'kadmin_ccache')
self._krb5_conf = _cfg_merge(_default_krb5_conf, krb5_conf)
@@ -835,6 +839,7 @@ class K5Realm(object):
env['KRB5_KDC_PROFILE'] = filename
env['KRB5CCNAME'] = self.ccache
env['KRB5_KTNAME'] = self.keytab
+ env['KRB5_CLIENT_KTNAME'] = self.client_keytab
env['KRB5RCACHEDIR'] = self.testdir
return env