xref: /freebsd/crypto/krb5/doc/pdf/basic.tex (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1*7f2fe78bSCy Schubert%% Generated by Sphinx.
2*7f2fe78bSCy Schubert\def\sphinxdocclass{report}
3*7f2fe78bSCy Schubert\documentclass[letterpaper,10pt,english]{sphinxmanual}
4*7f2fe78bSCy Schubert\ifdefined\pdfpxdimen
5*7f2fe78bSCy Schubert   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
6*7f2fe78bSCy Schubert\fi \sphinxpxdimen=.75bp\relax
7*7f2fe78bSCy Schubert\ifdefined\pdfimageresolution
8*7f2fe78bSCy Schubert    \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
9*7f2fe78bSCy Schubert\fi
10*7f2fe78bSCy Schubert%% let collapsible pdf bookmarks panel have high depth per default
11*7f2fe78bSCy Schubert\PassOptionsToPackage{bookmarksdepth=5}{hyperref}
12*7f2fe78bSCy Schubert
13*7f2fe78bSCy Schubert\PassOptionsToPackage{warn}{textcomp}
14*7f2fe78bSCy Schubert\usepackage[utf8]{inputenc}
15*7f2fe78bSCy Schubert\ifdefined\DeclareUnicodeCharacter
16*7f2fe78bSCy Schubert% support both utf8 and utf8x syntaxes
17*7f2fe78bSCy Schubert  \ifdefined\DeclareUnicodeCharacterAsOptional
18*7f2fe78bSCy Schubert    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
19*7f2fe78bSCy Schubert  \else
20*7f2fe78bSCy Schubert    \let\sphinxDUC\DeclareUnicodeCharacter
21*7f2fe78bSCy Schubert  \fi
22*7f2fe78bSCy Schubert  \sphinxDUC{00A0}{\nobreakspace}
23*7f2fe78bSCy Schubert  \sphinxDUC{2500}{\sphinxunichar{2500}}
24*7f2fe78bSCy Schubert  \sphinxDUC{2502}{\sphinxunichar{2502}}
25*7f2fe78bSCy Schubert  \sphinxDUC{2514}{\sphinxunichar{2514}}
26*7f2fe78bSCy Schubert  \sphinxDUC{251C}{\sphinxunichar{251C}}
27*7f2fe78bSCy Schubert  \sphinxDUC{2572}{\textbackslash}
28*7f2fe78bSCy Schubert\fi
29*7f2fe78bSCy Schubert\usepackage{cmap}
30*7f2fe78bSCy Schubert\usepackage[T1]{fontenc}
31*7f2fe78bSCy Schubert\usepackage{amsmath,amssymb,amstext}
32*7f2fe78bSCy Schubert\usepackage{babel}
33*7f2fe78bSCy Schubert
34*7f2fe78bSCy Schubert
35*7f2fe78bSCy Schubert
36*7f2fe78bSCy Schubert\usepackage{tgtermes}
37*7f2fe78bSCy Schubert\usepackage{tgheros}
38*7f2fe78bSCy Schubert\renewcommand{\ttdefault}{txtt}
39*7f2fe78bSCy Schubert
40*7f2fe78bSCy Schubert
41*7f2fe78bSCy Schubert
42*7f2fe78bSCy Schubert\usepackage[Bjarne]{fncychap}
43*7f2fe78bSCy Schubert\usepackage{sphinx}
44*7f2fe78bSCy Schubert
45*7f2fe78bSCy Schubert\fvset{fontsize=auto}
46*7f2fe78bSCy Schubert\usepackage{geometry}
47*7f2fe78bSCy Schubert
48*7f2fe78bSCy Schubert
49*7f2fe78bSCy Schubert% Include hyperref last.
50*7f2fe78bSCy Schubert\usepackage{hyperref}
51*7f2fe78bSCy Schubert% Fix anchor placement for figures with captions.
52*7f2fe78bSCy Schubert\usepackage{hypcap}% it must be loaded after hyperref.
53*7f2fe78bSCy Schubert% Set up styles of URL: it should be placed after hyperref.
54*7f2fe78bSCy Schubert\urlstyle{same}
55*7f2fe78bSCy Schubert
56*7f2fe78bSCy Schubert
57*7f2fe78bSCy Schubert\usepackage{sphinxmessages}
58*7f2fe78bSCy Schubert\setcounter{tocdepth}{0}
59*7f2fe78bSCy Schubert
60*7f2fe78bSCy Schubert
61*7f2fe78bSCy Schubert
62*7f2fe78bSCy Schubert\title{Kerberos Concepts}
63*7f2fe78bSCy Schubert\date{ }
64*7f2fe78bSCy Schubert\release{1.21.3}
65*7f2fe78bSCy Schubert\author{MIT}
66*7f2fe78bSCy Schubert\newcommand{\sphinxlogo}{\vbox{}}
67*7f2fe78bSCy Schubert\renewcommand{\releasename}{Release}
68*7f2fe78bSCy Schubert\makeindex
69*7f2fe78bSCy Schubert\begin{document}
70*7f2fe78bSCy Schubert
71*7f2fe78bSCy Schubert\pagestyle{empty}
72*7f2fe78bSCy Schubert\sphinxmaketitle
73*7f2fe78bSCy Schubert\pagestyle{plain}
74*7f2fe78bSCy Schubert\sphinxtableofcontents
75*7f2fe78bSCy Schubert\pagestyle{normal}
76*7f2fe78bSCy Schubert\phantomsection\label{\detokenize{basic/index::doc}}
77*7f2fe78bSCy Schubert
78*7f2fe78bSCy Schubert
79*7f2fe78bSCy Schubert
80*7f2fe78bSCy Schubert\chapter{Credential cache}
81*7f2fe78bSCy Schubert\label{\detokenize{basic/ccache_def:credential-cache}}\label{\detokenize{basic/ccache_def:ccache-definition}}\label{\detokenize{basic/ccache_def::doc}}
82*7f2fe78bSCy Schubert\sphinxAtStartPar
83*7f2fe78bSCy SchubertA credential cache (or “ccache”) holds Kerberos credentials while they
84*7f2fe78bSCy Schubertremain valid and, generally, while the user’s session lasts, so that
85*7f2fe78bSCy Schubertauthenticating to a service multiple times (e.g., connecting to a web
86*7f2fe78bSCy Schubertor mail server more than once) doesn’t require contacting the KDC
87*7f2fe78bSCy Schubertevery time.
88*7f2fe78bSCy Schubert
89*7f2fe78bSCy Schubert\sphinxAtStartPar
90*7f2fe78bSCy SchubertA credential cache usually contains one initial ticket which is
91*7f2fe78bSCy Schubertobtained using a password or another form of identity verification.
92*7f2fe78bSCy SchubertIf this ticket is a ticket\sphinxhyphen{}granting ticket, it can be used to obtain
93*7f2fe78bSCy Schubertadditional credentials without the password.  Because the credential
94*7f2fe78bSCy Schubertcache does not store the password, less long\sphinxhyphen{}term damage can be done
95*7f2fe78bSCy Schubertto the user’s account if the machine is compromised.
96*7f2fe78bSCy Schubert
97*7f2fe78bSCy Schubert\sphinxAtStartPar
98*7f2fe78bSCy SchubertA credentials cache stores a default client principal name, set when
99*7f2fe78bSCy Schubertthe cache is created.  This is the name shown at the top of the
100*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} output.
101*7f2fe78bSCy Schubert
102*7f2fe78bSCy Schubert\sphinxAtStartPar
103*7f2fe78bSCy SchubertEach normal cache entry includes a service principal name, a client
104*7f2fe78bSCy Schubertprincipal name (which, in some ccache types, need not be the same as
105*7f2fe78bSCy Schubertthe default), lifetime information, and flags, along with the
106*7f2fe78bSCy Schubertcredential itself.  There are also other entries, indicated by special
107*7f2fe78bSCy Schubertnames, that store additional information.
108*7f2fe78bSCy Schubert
109*7f2fe78bSCy Schubert
110*7f2fe78bSCy Schubert\section{ccache types}
111*7f2fe78bSCy Schubert\label{\detokenize{basic/ccache_def:ccache-types}}
112*7f2fe78bSCy Schubert\sphinxAtStartPar
113*7f2fe78bSCy SchubertThe credential cache interface, like the {\hyperref[\detokenize{basic/keytab_def:keytab-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{keytab}}}} and
114*7f2fe78bSCy Schubert{\hyperref[\detokenize{basic/rcache_def:rcache-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{replay cache}}}} interfaces, uses \sphinxtitleref{TYPE:value} strings to
115*7f2fe78bSCy Schubertindicate the type of credential cache and any associated cache naming
116*7f2fe78bSCy Schubertdata to use.
117*7f2fe78bSCy Schubert
118*7f2fe78bSCy Schubert\sphinxAtStartPar
119*7f2fe78bSCy SchubertThere are several kinds of credentials cache supported in the MIT
120*7f2fe78bSCy SchubertKerberos library.  Not all are supported on every platform.  In most
121*7f2fe78bSCy Schubertcases, it should be correct to use the default type built into the
122*7f2fe78bSCy Schubertlibrary.
123*7f2fe78bSCy Schubert\begin{enumerate}
124*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
125*7f2fe78bSCy Schubert\item {}
126*7f2fe78bSCy Schubert\sphinxAtStartPar
127*7f2fe78bSCy Schubert\sphinxstylestrong{API} is only implemented on Windows.  It communicates with a
128*7f2fe78bSCy Schubertserver process that holds the credentials in memory for the user,
129*7f2fe78bSCy Schubertrather than writing them to disk.
130*7f2fe78bSCy Schubert
131*7f2fe78bSCy Schubert\item {}
132*7f2fe78bSCy Schubert\sphinxAtStartPar
133*7f2fe78bSCy Schubert\sphinxstylestrong{DIR} points to the storage location of the collection of the
134*7f2fe78bSCy Schubertcredential caches in \sphinxstyleemphasis{FILE:} format. It is most useful when dealing
135*7f2fe78bSCy Schubertwith multiple Kerberos realms and KDCs.  For release 1.10 the
136*7f2fe78bSCy Schubertdirectory must already exist.  In post\sphinxhyphen{}1.10 releases the
137*7f2fe78bSCy Schubertrequirement is for parent directory to exist and the current
138*7f2fe78bSCy Schubertprocess must have permissions to create the directory if it does
139*7f2fe78bSCy Schubertnot exist. See {\hyperref[\detokenize{basic/ccache_def:col-ccache}]{\sphinxcrossref{\DUrole{std,std-ref}{Collections of caches}}}} for details.  New in release 1.10.
140*7f2fe78bSCy SchubertThe following residual forms are supported:
141*7f2fe78bSCy Schubert\begin{itemize}
142*7f2fe78bSCy Schubert\item {}
143*7f2fe78bSCy Schubert\sphinxAtStartPar
144*7f2fe78bSCy SchubertDIR:dirname
145*7f2fe78bSCy Schubert
146*7f2fe78bSCy Schubert\item {}
147*7f2fe78bSCy Schubert\sphinxAtStartPar
148*7f2fe78bSCy SchubertDIR::dirpath/filename \sphinxhyphen{} a single cache within the directory
149*7f2fe78bSCy Schubert
150*7f2fe78bSCy Schubert\end{itemize}
151*7f2fe78bSCy Schubert
152*7f2fe78bSCy Schubert\sphinxAtStartPar
153*7f2fe78bSCy SchubertSwitching to a ccache of the latter type causes it to become the
154*7f2fe78bSCy Schubertprimary for the directory.
155*7f2fe78bSCy Schubert
156*7f2fe78bSCy Schubert\item {}
157*7f2fe78bSCy Schubert\sphinxAtStartPar
158*7f2fe78bSCy Schubert\sphinxstylestrong{FILE} caches are the simplest and most portable. A simple flat
159*7f2fe78bSCy Schubertfile format is used to store one credential after another.  This is
160*7f2fe78bSCy Schubertthe default ccache type if no type is specified in a ccache name.
161*7f2fe78bSCy Schubert
162*7f2fe78bSCy Schubert\item {}
163*7f2fe78bSCy Schubert\sphinxAtStartPar
164*7f2fe78bSCy Schubert\sphinxstylestrong{KCM} caches work by contacting a daemon process called \sphinxcode{\sphinxupquote{kcm}}
165*7f2fe78bSCy Schubertto perform cache operations.  If the cache name is just \sphinxcode{\sphinxupquote{KCM:}},
166*7f2fe78bSCy Schubertthe default cache as determined by the KCM daemon will be used.
167*7f2fe78bSCy SchubertNewly created caches must generally be named \sphinxcode{\sphinxupquote{KCM:uid:name}},
168*7f2fe78bSCy Schubertwhere \sphinxstyleemphasis{uid} is the effective user ID of the running process.
169*7f2fe78bSCy Schubert
170*7f2fe78bSCy Schubert\sphinxAtStartPar
171*7f2fe78bSCy SchubertKCM client support is new in release 1.13.  A KCM daemon has not
172*7f2fe78bSCy Schubertyet been implemented in MIT krb5, but the client will interoperate
173*7f2fe78bSCy Schubertwith the KCM daemon implemented by Heimdal.  macOS 10.7 and higher
174*7f2fe78bSCy Schubertprovides a KCM daemon as part of the operating system, and the
175*7f2fe78bSCy Schubert\sphinxstylestrong{KCM} cache type is used as the default cache on that platform in
176*7f2fe78bSCy Schuberta default build.
177*7f2fe78bSCy Schubert
178*7f2fe78bSCy Schubert\item {}
179*7f2fe78bSCy Schubert\sphinxAtStartPar
180*7f2fe78bSCy Schubert\sphinxstylestrong{KEYRING} is Linux\sphinxhyphen{}specific, and uses the kernel keyring support
181*7f2fe78bSCy Schubertto store credential data in unswappable kernel memory where only
182*7f2fe78bSCy Schubertthe current user should be able to access it.  The following
183*7f2fe78bSCy Schubertresidual forms are supported:
184*7f2fe78bSCy Schubert\begin{itemize}
185*7f2fe78bSCy Schubert\item {}
186*7f2fe78bSCy Schubert\sphinxAtStartPar
187*7f2fe78bSCy SchubertKEYRING:name
188*7f2fe78bSCy Schubert
189*7f2fe78bSCy Schubert\item {}
190*7f2fe78bSCy Schubert\sphinxAtStartPar
191*7f2fe78bSCy SchubertKEYRING:process:name \sphinxhyphen{} process keyring
192*7f2fe78bSCy Schubert
193*7f2fe78bSCy Schubert\item {}
194*7f2fe78bSCy Schubert\sphinxAtStartPar
195*7f2fe78bSCy SchubertKEYRING:thread:name \sphinxhyphen{}  thread keyring
196*7f2fe78bSCy Schubert
197*7f2fe78bSCy Schubert\end{itemize}
198*7f2fe78bSCy Schubert
199*7f2fe78bSCy Schubert\sphinxAtStartPar
200*7f2fe78bSCy SchubertStarting with release 1.12 the \sphinxstyleemphasis{KEYRING} type supports collections.
201*7f2fe78bSCy SchubertThe following new residual forms were added:
202*7f2fe78bSCy Schubert\begin{itemize}
203*7f2fe78bSCy Schubert\item {}
204*7f2fe78bSCy Schubert\sphinxAtStartPar
205*7f2fe78bSCy SchubertKEYRING:session:name \sphinxhyphen{} session keyring
206*7f2fe78bSCy Schubert
207*7f2fe78bSCy Schubert\item {}
208*7f2fe78bSCy Schubert\sphinxAtStartPar
209*7f2fe78bSCy SchubertKEYRING:user:name \sphinxhyphen{} user keyring
210*7f2fe78bSCy Schubert
211*7f2fe78bSCy Schubert\item {}
212*7f2fe78bSCy Schubert\sphinxAtStartPar
213*7f2fe78bSCy SchubertKEYRING:persistent:uidnumber \sphinxhyphen{} persistent per\sphinxhyphen{}UID collection.
214*7f2fe78bSCy SchubertUnlike the user keyring, this collection survives after the user
215*7f2fe78bSCy Schubertlogs out, until the cache credentials expire.  This type of
216*7f2fe78bSCy Schubertccache requires support from the kernel; otherwise, it will fall
217*7f2fe78bSCy Schubertback to the user keyring.
218*7f2fe78bSCy Schubert
219*7f2fe78bSCy Schubert\end{itemize}
220*7f2fe78bSCy Schubert
221*7f2fe78bSCy Schubert\sphinxAtStartPar
222*7f2fe78bSCy SchubertSee {\hyperref[\detokenize{basic/ccache_def:col-ccache}]{\sphinxcrossref{\DUrole{std,std-ref}{Collections of caches}}}} for details.
223*7f2fe78bSCy Schubert
224*7f2fe78bSCy Schubert\item {}
225*7f2fe78bSCy Schubert\sphinxAtStartPar
226*7f2fe78bSCy Schubert\sphinxstylestrong{MEMORY} caches are for storage of credentials that don’t need to
227*7f2fe78bSCy Schubertbe made available outside of the current process.  For example, a
228*7f2fe78bSCy Schubertmemory ccache is used by \DUrole{xref,std,std-ref}{kadmin(1)} to store the
229*7f2fe78bSCy Schubertadministrative ticket used to contact the admin server.  Memory
230*7f2fe78bSCy Schubertccaches are faster than file ccaches and are automatically
231*7f2fe78bSCy Schubertdestroyed when the process exits.
232*7f2fe78bSCy Schubert
233*7f2fe78bSCy Schubert\item {}
234*7f2fe78bSCy Schubert\sphinxAtStartPar
235*7f2fe78bSCy Schubert\sphinxstylestrong{MSLSA} is a Windows\sphinxhyphen{}specific cache type that accesses the
236*7f2fe78bSCy SchubertWindows credential store.
237*7f2fe78bSCy Schubert
238*7f2fe78bSCy Schubert\end{enumerate}
239*7f2fe78bSCy Schubert
240*7f2fe78bSCy Schubert
241*7f2fe78bSCy Schubert\section{Collections of caches}
242*7f2fe78bSCy Schubert\label{\detokenize{basic/ccache_def:collections-of-caches}}\label{\detokenize{basic/ccache_def:col-ccache}}
243*7f2fe78bSCy Schubert\sphinxAtStartPar
244*7f2fe78bSCy SchubertSome credential cache types can support collections of multiple
245*7f2fe78bSCy Schubertcaches.  One of the caches in the collection is designated as the
246*7f2fe78bSCy Schubert\sphinxstyleemphasis{primary} and will be used when the collection is resolved as a cache.
247*7f2fe78bSCy SchubertWhen a collection\sphinxhyphen{}enabled cache type is the default cache for a
248*7f2fe78bSCy Schubertprocess, applications can search the specified collection for a
249*7f2fe78bSCy Schubertspecific client principal, and GSSAPI applications will automatically
250*7f2fe78bSCy Schubertselect between the caches in the collection based on criteria such as
251*7f2fe78bSCy Schubertthe target service realm.
252*7f2fe78bSCy Schubert
253*7f2fe78bSCy Schubert\sphinxAtStartPar
254*7f2fe78bSCy SchubertCredential cache collections are new in release 1.10, with support
255*7f2fe78bSCy Schubertfrom the \sphinxstylestrong{DIR} and \sphinxstylestrong{API} ccache types.  Starting in release 1.12,
256*7f2fe78bSCy Schubertcollections are also supported by the \sphinxstylestrong{KEYRING} ccache type.
257*7f2fe78bSCy SchubertCollections are supported by the \sphinxstylestrong{KCM} ccache type in release 1.13.
258*7f2fe78bSCy Schubert
259*7f2fe78bSCy Schubert
260*7f2fe78bSCy Schubert\subsection{Tool alterations to use cache collection}
261*7f2fe78bSCy Schubert\label{\detokenize{basic/ccache_def:tool-alterations-to-use-cache-collection}}\begin{itemize}
262*7f2fe78bSCy Schubert\item {}
263*7f2fe78bSCy Schubert\sphinxAtStartPar
264*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{kdestroy(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} will destroy all caches in the collection.
265*7f2fe78bSCy Schubert
266*7f2fe78bSCy Schubert\item {}
267*7f2fe78bSCy Schubert\sphinxAtStartPar
268*7f2fe78bSCy SchubertIf the default cache type supports switching, \DUrole{xref,std,std-ref}{kinit(1)}
269*7f2fe78bSCy Schubert\sphinxstyleemphasis{princname} will search the collection for a matching cache and
270*7f2fe78bSCy Schubertstore credentials there, or will store credentials in a new unique
271*7f2fe78bSCy Schubertcache of the default type if no existing cache for the principal
272*7f2fe78bSCy Schubertexists.  Either way, kinit will switch to the selected cache.
273*7f2fe78bSCy Schubert
274*7f2fe78bSCy Schubert\item {}
275*7f2fe78bSCy Schubert\sphinxAtStartPar
276*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}l} will list the caches in the collection.
277*7f2fe78bSCy Schubert
278*7f2fe78bSCy Schubert\item {}
279*7f2fe78bSCy Schubert\sphinxAtStartPar
280*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} will show the content of all caches in the
281*7f2fe78bSCy Schubertcollection.
282*7f2fe78bSCy Schubert
283*7f2fe78bSCy Schubert\item {}
284*7f2fe78bSCy Schubert\sphinxAtStartPar
285*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{kswitch(1)} \sphinxstyleemphasis{\sphinxhyphen{}p princname} will search the collection for a
286*7f2fe78bSCy Schubertmatching cache and switch to it.
287*7f2fe78bSCy Schubert
288*7f2fe78bSCy Schubert\item {}
289*7f2fe78bSCy Schubert\sphinxAtStartPar
290*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{kswitch(1)} \sphinxstyleemphasis{\sphinxhyphen{}c cachename} will switch to a specified cache.
291*7f2fe78bSCy Schubert
292*7f2fe78bSCy Schubert\end{itemize}
293*7f2fe78bSCy Schubert
294*7f2fe78bSCy Schubert
295*7f2fe78bSCy Schubert\section{Default ccache name}
296*7f2fe78bSCy Schubert\label{\detokenize{basic/ccache_def:default-ccache-name}}
297*7f2fe78bSCy Schubert\sphinxAtStartPar
298*7f2fe78bSCy SchubertThe default credential cache name is determined by the following, in
299*7f2fe78bSCy Schubertdescending order of priority:
300*7f2fe78bSCy Schubert\begin{enumerate}
301*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
302*7f2fe78bSCy Schubert\item {}
303*7f2fe78bSCy Schubert\sphinxAtStartPar
304*7f2fe78bSCy SchubertThe \sphinxstylestrong{KRB5CCNAME} environment variable.  For example,
305*7f2fe78bSCy Schubert\sphinxcode{\sphinxupquote{KRB5CCNAME=DIR:/mydir/}}.
306*7f2fe78bSCy Schubert
307*7f2fe78bSCy Schubert\item {}
308*7f2fe78bSCy Schubert\sphinxAtStartPar
309*7f2fe78bSCy SchubertThe \sphinxstylestrong{default\_ccache\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults}.
310*7f2fe78bSCy Schubert
311*7f2fe78bSCy Schubert\item {}
312*7f2fe78bSCy Schubert\sphinxAtStartPar
313*7f2fe78bSCy SchubertThe hardcoded default, \DUrole{xref,std,std-ref}{DEFCCNAME}.
314*7f2fe78bSCy Schubert
315*7f2fe78bSCy Schubert\end{enumerate}
316*7f2fe78bSCy Schubert
317*7f2fe78bSCy Schubert
318*7f2fe78bSCy Schubert\chapter{keytab}
319*7f2fe78bSCy Schubert\label{\detokenize{basic/keytab_def:keytab}}\label{\detokenize{basic/keytab_def:keytab-definition}}\label{\detokenize{basic/keytab_def::doc}}
320*7f2fe78bSCy Schubert\sphinxAtStartPar
321*7f2fe78bSCy SchubertA keytab (short for “key table”) stores long\sphinxhyphen{}term keys for one or more
322*7f2fe78bSCy Schubertprincipals.  Keytabs are normally represented by files in a standard
323*7f2fe78bSCy Schubertformat, although in rare cases they can be represented in other ways.
324*7f2fe78bSCy SchubertKeytabs are used most often to allow server applications to accept
325*7f2fe78bSCy Schubertauthentications from clients, but can also be used to obtain initial
326*7f2fe78bSCy Schubertcredentials for client applications.
327*7f2fe78bSCy Schubert
328*7f2fe78bSCy Schubert\sphinxAtStartPar
329*7f2fe78bSCy SchubertKeytabs are named using the format \sphinxstyleemphasis{type}\sphinxcode{\sphinxupquote{:}}\sphinxstyleemphasis{value}.  Usually
330*7f2fe78bSCy Schubert\sphinxstyleemphasis{type} is \sphinxcode{\sphinxupquote{FILE}} and \sphinxstyleemphasis{value} is the absolute pathname of the file.
331*7f2fe78bSCy SchubertThe other possible value for \sphinxstyleemphasis{type} is \sphinxcode{\sphinxupquote{MEMORY}}, which indicates a
332*7f2fe78bSCy Schuberttemporary keytab stored in the memory of the current process.
333*7f2fe78bSCy Schubert
334*7f2fe78bSCy Schubert\sphinxAtStartPar
335*7f2fe78bSCy SchubertA keytab contains one or more entries, where each entry consists of a
336*7f2fe78bSCy Schuberttimestamp (indicating when the entry was written to the keytab), a
337*7f2fe78bSCy Schubertprincipal name, a key version number, an encryption type, and the
338*7f2fe78bSCy Schubertencryption key itself.
339*7f2fe78bSCy Schubert
340*7f2fe78bSCy Schubert\sphinxAtStartPar
341*7f2fe78bSCy SchubertA keytab can be displayed using the \DUrole{xref,std,std-ref}{klist(1)} command with the
342*7f2fe78bSCy Schubert\sphinxcode{\sphinxupquote{\sphinxhyphen{}k}} option.  Keytabs can be created or appended to by extracting
343*7f2fe78bSCy Schubertkeys from the KDC database using the \DUrole{xref,std,std-ref}{kadmin(1)} \DUrole{xref,std,std-ref}{ktadd}
344*7f2fe78bSCy Schubertcommand.  Keytabs can be manipulated using the \DUrole{xref,std,std-ref}{ktutil(1)} and
345*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{k5srvutil(1)} commands.
346*7f2fe78bSCy Schubert
347*7f2fe78bSCy Schubert
348*7f2fe78bSCy Schubert\section{Default keytab}
349*7f2fe78bSCy Schubert\label{\detokenize{basic/keytab_def:default-keytab}}
350*7f2fe78bSCy Schubert\sphinxAtStartPar
351*7f2fe78bSCy SchubertThe default keytab is used by server applications if the application
352*7f2fe78bSCy Schubertdoes not request a specific keytab.  The name of the default keytab is
353*7f2fe78bSCy Schubertdetermined by the following, in decreasing order of preference:
354*7f2fe78bSCy Schubert\begin{enumerate}
355*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
356*7f2fe78bSCy Schubert\item {}
357*7f2fe78bSCy Schubert\sphinxAtStartPar
358*7f2fe78bSCy SchubertThe \sphinxstylestrong{KRB5\_KTNAME} environment variable.
359*7f2fe78bSCy Schubert
360*7f2fe78bSCy Schubert\item {}
361*7f2fe78bSCy Schubert\sphinxAtStartPar
362*7f2fe78bSCy SchubertThe \sphinxstylestrong{default\_keytab\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults}.
363*7f2fe78bSCy Schubert
364*7f2fe78bSCy Schubert\item {}
365*7f2fe78bSCy Schubert\sphinxAtStartPar
366*7f2fe78bSCy SchubertThe hardcoded default, \DUrole{xref,std,std-ref}{DEFKTNAME}.
367*7f2fe78bSCy Schubert
368*7f2fe78bSCy Schubert\end{enumerate}
369*7f2fe78bSCy Schubert
370*7f2fe78bSCy Schubert
371*7f2fe78bSCy Schubert\section{Default client keytab}
372*7f2fe78bSCy Schubert\label{\detokenize{basic/keytab_def:default-client-keytab}}
373*7f2fe78bSCy Schubert\sphinxAtStartPar
374*7f2fe78bSCy SchubertThe default client keytab is used, if it is present and readable, to
375*7f2fe78bSCy Schubertautomatically obtain initial credentials for GSSAPI client
376*7f2fe78bSCy Schubertapplications.  The principal name of the first entry in the client
377*7f2fe78bSCy Schubertkeytab is used by default when obtaining initial credentials.  The
378*7f2fe78bSCy Schubertname of the default client keytab is determined by the following, in
379*7f2fe78bSCy Schubertdecreasing order of preference:
380*7f2fe78bSCy Schubert\begin{enumerate}
381*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
382*7f2fe78bSCy Schubert\item {}
383*7f2fe78bSCy Schubert\sphinxAtStartPar
384*7f2fe78bSCy SchubertThe \sphinxstylestrong{KRB5\_CLIENT\_KTNAME} environment variable.
385*7f2fe78bSCy Schubert
386*7f2fe78bSCy Schubert\item {}
387*7f2fe78bSCy Schubert\sphinxAtStartPar
388*7f2fe78bSCy SchubertThe \sphinxstylestrong{default\_client\_keytab\_name} profile variable in
389*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{libdefaults}.
390*7f2fe78bSCy Schubert
391*7f2fe78bSCy Schubert\item {}
392*7f2fe78bSCy Schubert\sphinxAtStartPar
393*7f2fe78bSCy SchubertThe hardcoded default, \DUrole{xref,std,std-ref}{DEFCKTNAME}.
394*7f2fe78bSCy Schubert
395*7f2fe78bSCy Schubert\end{enumerate}
396*7f2fe78bSCy Schubert
397*7f2fe78bSCy Schubert
398*7f2fe78bSCy Schubert\chapter{replay cache}
399*7f2fe78bSCy Schubert\label{\detokenize{basic/rcache_def:replay-cache}}\label{\detokenize{basic/rcache_def:rcache-definition}}\label{\detokenize{basic/rcache_def::doc}}
400*7f2fe78bSCy Schubert\sphinxAtStartPar
401*7f2fe78bSCy SchubertA replay cache (or “rcache”) keeps track of all authenticators
402*7f2fe78bSCy Schubertrecently presented to a service.  If a duplicate authentication
403*7f2fe78bSCy Schubertrequest is detected in the replay cache, an error message is sent to
404*7f2fe78bSCy Schubertthe application program.
405*7f2fe78bSCy Schubert
406*7f2fe78bSCy Schubert\sphinxAtStartPar
407*7f2fe78bSCy SchubertThe replay cache interface, like the credential cache and
408*7f2fe78bSCy Schubert{\hyperref[\detokenize{basic/keytab_def:keytab-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{keytab}}}} interfaces, uses \sphinxtitleref{type:residual} strings to
409*7f2fe78bSCy Schubertindicate the type of replay cache and any associated cache naming
410*7f2fe78bSCy Schubertdata to use.
411*7f2fe78bSCy Schubert
412*7f2fe78bSCy Schubert
413*7f2fe78bSCy Schubert\section{Background information}
414*7f2fe78bSCy Schubert\label{\detokenize{basic/rcache_def:background-information}}
415*7f2fe78bSCy Schubert\sphinxAtStartPar
416*7f2fe78bSCy SchubertSome Kerberos or GSSAPI services use a simple authentication mechanism
417*7f2fe78bSCy Schubertwhere a message is sent containing an authenticator, which establishes
418*7f2fe78bSCy Schubertthe encryption key that the client will use for talking to the
419*7f2fe78bSCy Schubertservice.  But nothing about that prevents an eavesdropper from
420*7f2fe78bSCy Schubertrecording the messages sent by the client, establishing a new
421*7f2fe78bSCy Schubertconnection, and re\sphinxhyphen{}sending or “replaying” the same messages; the
422*7f2fe78bSCy Schubertreplayed authenticator will establish the same encryption key for the
423*7f2fe78bSCy Schubertnew session, and the following messages will be decrypted and
424*7f2fe78bSCy Schubertprocessed.  The attacker may not know what the messages say, and can’t
425*7f2fe78bSCy Schubertgenerate new messages under the same encryption key, but in some
426*7f2fe78bSCy Schubertinstances it may be harmful to the user (or helpful to the attacker)
427*7f2fe78bSCy Schubertto cause the server to see the same messages again a second time.  For
428*7f2fe78bSCy Schubertexample, if the legitimate client sends “delete first message in
429*7f2fe78bSCy Schubertmailbox”, a replay from an attacker may delete another, different
430*7f2fe78bSCy Schubert“first” message.  (Protocol design to guard against such problems has
431*7f2fe78bSCy Schubertbeen discussed in \index{RFC@\spxentry{RFC}!RFC 4120\#section\sphinxhyphen{}10@\spxentry{RFC 4120\#section\sphinxhyphen{}10}}\sphinxhref{https://tools.ietf.org/html/rfc4120.html\#section-10}{\sphinxstylestrong{RFC 4120\#section\sphinxhyphen{}10}}.)
432*7f2fe78bSCy Schubert
433*7f2fe78bSCy Schubert\sphinxAtStartPar
434*7f2fe78bSCy SchubertEven if one protocol uses further protection to verify that the client
435*7f2fe78bSCy Schubertside of the connection actually knows the encryption keys (and thus is
436*7f2fe78bSCy Schubertpresumably a legitimate user), if another service uses the same
437*7f2fe78bSCy Schubertservice principal name, it may be possible to record an authenticator
438*7f2fe78bSCy Schubertused with the first protocol and “replay” it against the second.
439*7f2fe78bSCy Schubert
440*7f2fe78bSCy Schubert\sphinxAtStartPar
441*7f2fe78bSCy SchubertThe replay cache mitigates these attacks somewhat, by keeping track of
442*7f2fe78bSCy Schubertauthenticators that have been seen until their five\sphinxhyphen{}minute window
443*7f2fe78bSCy Schubertexpires.  Different authenticators generated by multiple connections
444*7f2fe78bSCy Schubertfrom the same legitimate client will generally have different
445*7f2fe78bSCy Schuberttimestamps, and thus will not be considered the same.
446*7f2fe78bSCy Schubert
447*7f2fe78bSCy Schubert\sphinxAtStartPar
448*7f2fe78bSCy SchubertThis mechanism isn’t perfect.  If a message is sent to one application
449*7f2fe78bSCy Schubertserver but a man\sphinxhyphen{}in\sphinxhyphen{}the\sphinxhyphen{}middle attacker can prevent it from actually
450*7f2fe78bSCy Schubertarriving at that server, the attacker could then use the authenticator
451*7f2fe78bSCy Schubert(once!) against a different service on the same host.  This could be a
452*7f2fe78bSCy Schubertproblem if the message from the client included something more than
453*7f2fe78bSCy Schubertauthentication in the first message that could be useful to the
454*7f2fe78bSCy Schubertattacker (which is uncommon; in most protocols the server has to
455*7f2fe78bSCy Schubertindicate a successful authentication before the client sends
456*7f2fe78bSCy Schubertadditional messages), or if the simple act of presenting the
457*7f2fe78bSCy Schubertauthenticator triggers some interesting action in the service being
458*7f2fe78bSCy Schubertattacked.
459*7f2fe78bSCy Schubert
460*7f2fe78bSCy Schubert
461*7f2fe78bSCy Schubert\section{Replay cache types}
462*7f2fe78bSCy Schubert\label{\detokenize{basic/rcache_def:replay-cache-types}}
463*7f2fe78bSCy Schubert\sphinxAtStartPar
464*7f2fe78bSCy SchubertUnlike the credential cache and keytab interfaces, replay cache types
465*7f2fe78bSCy Schubertare in lowercase.  The following types are defined:
466*7f2fe78bSCy Schubert\begin{enumerate}
467*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
468*7f2fe78bSCy Schubert\item {}
469*7f2fe78bSCy Schubert\sphinxAtStartPar
470*7f2fe78bSCy Schubert\sphinxstylestrong{none} disables the replay cache.  The residual value is ignored.
471*7f2fe78bSCy Schubert
472*7f2fe78bSCy Schubert\item {}
473*7f2fe78bSCy Schubert\sphinxAtStartPar
474*7f2fe78bSCy Schubert\sphinxstylestrong{file2} (new in release 1.18) uses a hash\sphinxhyphen{}based format to store
475*7f2fe78bSCy Schubertreplay records.  The file may grow to accommodate hash collisions.
476*7f2fe78bSCy SchubertThe residual value is the filename.
477*7f2fe78bSCy Schubert
478*7f2fe78bSCy Schubert\item {}
479*7f2fe78bSCy Schubert\sphinxAtStartPar
480*7f2fe78bSCy Schubert\sphinxstylestrong{dfl} is the default type if no environment variable or
481*7f2fe78bSCy Schubertconfiguration specifies a different type.  It stores replay data in
482*7f2fe78bSCy Schuberta file2 replay cache with a filename based on the effective uid.
483*7f2fe78bSCy SchubertThe residual value is ignored.
484*7f2fe78bSCy Schubert
485*7f2fe78bSCy Schubert\end{enumerate}
486*7f2fe78bSCy Schubert
487*7f2fe78bSCy Schubert\sphinxAtStartPar
488*7f2fe78bSCy SchubertFor the dfl type, the location of the replay cache file is determined
489*7f2fe78bSCy Schubertas follows:
490*7f2fe78bSCy Schubert\begin{enumerate}
491*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
492*7f2fe78bSCy Schubert\item {}
493*7f2fe78bSCy Schubert\sphinxAtStartPar
494*7f2fe78bSCy SchubertThe directory is taken from the \sphinxstylestrong{KRB5RCACHEDIR} environment
495*7f2fe78bSCy Schubertvariable, or the \sphinxstylestrong{TMPDIR} environment variable, or a temporary
496*7f2fe78bSCy Schubertdirectory determined at configuration time such as \sphinxcode{\sphinxupquote{/var/tmp}}, in
497*7f2fe78bSCy Schubertdescending order of preference.
498*7f2fe78bSCy Schubert
499*7f2fe78bSCy Schubert\item {}
500*7f2fe78bSCy Schubert\sphinxAtStartPar
501*7f2fe78bSCy SchubertThe filename is \sphinxcode{\sphinxupquote{krb5\_EUID.rcache2}} where EUID is the effective
502*7f2fe78bSCy Schubertuid of the process.
503*7f2fe78bSCy Schubert
504*7f2fe78bSCy Schubert\item {}
505*7f2fe78bSCy Schubert\sphinxAtStartPar
506*7f2fe78bSCy SchubertThe file is opened without following symbolic links, and ownership
507*7f2fe78bSCy Schubertof the file is verified to match the effective uid.
508*7f2fe78bSCy Schubert
509*7f2fe78bSCy Schubert\end{enumerate}
510*7f2fe78bSCy Schubert
511*7f2fe78bSCy Schubert\sphinxAtStartPar
512*7f2fe78bSCy SchubertOn Windows, the directory for the dfl type is the local appdata
513*7f2fe78bSCy Schubertdirectory, unless overridden by the \sphinxstylestrong{KRB5RCACHEDIR} environment
514*7f2fe78bSCy Schubertvariable.  The filename on Windows is \sphinxcode{\sphinxupquote{krb5.rcache2}}, and the file
515*7f2fe78bSCy Schubertis opened normally.
516*7f2fe78bSCy Schubert
517*7f2fe78bSCy Schubert
518*7f2fe78bSCy Schubert\section{Default replay cache name}
519*7f2fe78bSCy Schubert\label{\detokenize{basic/rcache_def:default-replay-cache-name}}
520*7f2fe78bSCy Schubert\sphinxAtStartPar
521*7f2fe78bSCy SchubertThe default replay cache name is determined by the following, in
522*7f2fe78bSCy Schubertdescending order of priority:
523*7f2fe78bSCy Schubert\begin{enumerate}
524*7f2fe78bSCy Schubert\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
525*7f2fe78bSCy Schubert\item {}
526*7f2fe78bSCy Schubert\sphinxAtStartPar
527*7f2fe78bSCy SchubertThe \sphinxstylestrong{KRB5RCACHENAME} environment variable (new in release 1.18).
528*7f2fe78bSCy Schubert
529*7f2fe78bSCy Schubert\item {}
530*7f2fe78bSCy Schubert\sphinxAtStartPar
531*7f2fe78bSCy SchubertThe \sphinxstylestrong{KRB5RCACHETYPE} environment variable.  If this variable is
532*7f2fe78bSCy Schubertset, the residual value is empty.
533*7f2fe78bSCy Schubert
534*7f2fe78bSCy Schubert\item {}
535*7f2fe78bSCy Schubert\sphinxAtStartPar
536*7f2fe78bSCy SchubertThe \sphinxstylestrong{default\_rcache\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults}
537*7f2fe78bSCy Schubert(new in release 1.18).
538*7f2fe78bSCy Schubert
539*7f2fe78bSCy Schubert\item {}
540*7f2fe78bSCy Schubert\sphinxAtStartPar
541*7f2fe78bSCy SchubertIf none of the above are set, the default replay cache name is
542*7f2fe78bSCy Schubert\sphinxcode{\sphinxupquote{dfl:}}.
543*7f2fe78bSCy Schubert
544*7f2fe78bSCy Schubert\end{enumerate}
545*7f2fe78bSCy Schubert
546*7f2fe78bSCy Schubert
547*7f2fe78bSCy Schubert\chapter{stash file}
548*7f2fe78bSCy Schubert\label{\detokenize{basic/stash_file_def:stash-file}}\label{\detokenize{basic/stash_file_def:stash-definition}}\label{\detokenize{basic/stash_file_def::doc}}
549*7f2fe78bSCy Schubert\sphinxAtStartPar
550*7f2fe78bSCy SchubertThe stash file is a local copy of the master key that resides in
551*7f2fe78bSCy Schubertencrypted form on the KDC’s local disk.  The stash file is used to
552*7f2fe78bSCy Schubertauthenticate the KDC to itself automatically before starting the
553*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{kadmind(8)} and \DUrole{xref,std,std-ref}{krb5kdc(8)} daemons (e.g., as part of the
554*7f2fe78bSCy Schubertmachine’s boot sequence).  The stash file, like the keytab file (see
555*7f2fe78bSCy Schubert\DUrole{xref,std,std-ref}{keytab\_file}) is a potential point\sphinxhyphen{}of\sphinxhyphen{}entry for a break\sphinxhyphen{}in, and
556*7f2fe78bSCy Schubertif compromised, would allow unrestricted access to the Kerberos
557*7f2fe78bSCy Schubertdatabase.  If you choose to install a stash file, it should be
558*7f2fe78bSCy Schubertreadable only by root, and should exist only on the KDC’s local disk.
559*7f2fe78bSCy SchubertThe file should not be part of any backup of the machine, unless
560*7f2fe78bSCy Schubertaccess to the backup data is secured as tightly as access to the
561*7f2fe78bSCy Schubertmaster password itself.
562*7f2fe78bSCy Schubert
563*7f2fe78bSCy Schubert\begin{sphinxadmonition}{note}{Note:}
564*7f2fe78bSCy Schubert\sphinxAtStartPar
565*7f2fe78bSCy SchubertIf you choose not to install a stash file, the KDC will prompt you for the master key each time it starts up.
566*7f2fe78bSCy SchubertThis means that the KDC will not be able to start automatically, such as after a system reboot.
567*7f2fe78bSCy Schubert\end{sphinxadmonition}
568*7f2fe78bSCy Schubert
569*7f2fe78bSCy Schubert
570*7f2fe78bSCy Schubert\chapter{Supported date and time formats}
571*7f2fe78bSCy Schubert\label{\detokenize{basic/date_format:supported-date-and-time-formats}}\label{\detokenize{basic/date_format:datetime}}\label{\detokenize{basic/date_format::doc}}
572*7f2fe78bSCy Schubert
573*7f2fe78bSCy Schubert\section{Time duration}
574*7f2fe78bSCy Schubert\label{\detokenize{basic/date_format:time-duration}}\label{\detokenize{basic/date_format:duration}}
575*7f2fe78bSCy Schubert\sphinxAtStartPar
576*7f2fe78bSCy SchubertThis format is used to express a time duration in the Kerberos
577*7f2fe78bSCy Schubertconfiguration files and user commands.  The allowed formats are:
578*7f2fe78bSCy Schubert\begin{quote}
579*7f2fe78bSCy Schubert
580*7f2fe78bSCy Schubert
581*7f2fe78bSCy Schubert\begin{savenotes}\sphinxattablestart
582*7f2fe78bSCy Schubert\centering
583*7f2fe78bSCy Schubert\begin{tabulary}{\linewidth}[t]{|T|T|T|}
584*7f2fe78bSCy Schubert\hline
585*7f2fe78bSCy Schubert
586*7f2fe78bSCy Schubert\sphinxAtStartPar
587*7f2fe78bSCy SchubertFormat
588*7f2fe78bSCy Schubert&
589*7f2fe78bSCy Schubert\sphinxAtStartPar
590*7f2fe78bSCy SchubertExample
591*7f2fe78bSCy Schubert&
592*7f2fe78bSCy Schubert\sphinxAtStartPar
593*7f2fe78bSCy SchubertValue
594*7f2fe78bSCy Schubert\\
595*7f2fe78bSCy Schubert\hline
596*7f2fe78bSCy Schubert\sphinxAtStartPar
597*7f2fe78bSCy Schuberth:m{[}:s{]}
598*7f2fe78bSCy Schubert&
599*7f2fe78bSCy Schubert\sphinxAtStartPar
600*7f2fe78bSCy Schubert36:00
601*7f2fe78bSCy Schubert&
602*7f2fe78bSCy Schubert\sphinxAtStartPar
603*7f2fe78bSCy Schubert36 hours
604*7f2fe78bSCy Schubert\\
605*7f2fe78bSCy Schubert\hline
606*7f2fe78bSCy Schubert\sphinxAtStartPar
607*7f2fe78bSCy SchubertNdNhNmNs
608*7f2fe78bSCy Schubert&
609*7f2fe78bSCy Schubert\sphinxAtStartPar
610*7f2fe78bSCy Schubert8h30s
611*7f2fe78bSCy Schubert&
612*7f2fe78bSCy Schubert\sphinxAtStartPar
613*7f2fe78bSCy Schubert8 hours 30 seconds
614*7f2fe78bSCy Schubert\\
615*7f2fe78bSCy Schubert\hline
616*7f2fe78bSCy Schubert\sphinxAtStartPar
617*7f2fe78bSCy SchubertN (number of seconds)
618*7f2fe78bSCy Schubert&
619*7f2fe78bSCy Schubert\sphinxAtStartPar
620*7f2fe78bSCy Schubert3600
621*7f2fe78bSCy Schubert&
622*7f2fe78bSCy Schubert\sphinxAtStartPar
623*7f2fe78bSCy Schubert1 hour
624*7f2fe78bSCy Schubert\\
625*7f2fe78bSCy Schubert\hline
626*7f2fe78bSCy Schubert\end{tabulary}
627*7f2fe78bSCy Schubert\par
628*7f2fe78bSCy Schubert\sphinxattableend\end{savenotes}
629*7f2fe78bSCy Schubert\end{quote}
630*7f2fe78bSCy Schubert
631*7f2fe78bSCy Schubert\sphinxAtStartPar
632*7f2fe78bSCy SchubertHere \sphinxstyleemphasis{N} denotes a number, \sphinxstyleemphasis{d} \sphinxhyphen{} days, \sphinxstyleemphasis{h} \sphinxhyphen{} hours, \sphinxstyleemphasis{m} \sphinxhyphen{} minutes,
633*7f2fe78bSCy Schubert\sphinxstyleemphasis{s} \sphinxhyphen{} seconds.
634*7f2fe78bSCy Schubert
635*7f2fe78bSCy Schubert\begin{sphinxadmonition}{note}{Note:}
636*7f2fe78bSCy Schubert\sphinxAtStartPar
637*7f2fe78bSCy SchubertThe time interval should not exceed 2147483647 seconds.
638*7f2fe78bSCy Schubert\end{sphinxadmonition}
639*7f2fe78bSCy Schubert
640*7f2fe78bSCy Schubert\sphinxAtStartPar
641*7f2fe78bSCy SchubertExamples:
642*7f2fe78bSCy Schubert
643*7f2fe78bSCy Schubert\begin{sphinxVerbatim}[commandchars=\\\{\}]
644*7f2fe78bSCy Schubert\PYG{n}{Request} \PYG{n}{a} \PYG{n}{ticket} \PYG{n}{valid} \PYG{k}{for} \PYG{n}{one} \PYG{n}{hour}\PYG{p}{,} \PYG{n}{five} \PYG{n}{hours}\PYG{p}{,} \PYG{l+m+mi}{30} \PYG{n}{minutes}
645*7f2fe78bSCy Schubert\PYG{o+ow}{and} \PYG{l+m+mi}{10} \PYG{n}{days} \PYG{n}{respectively}\PYG{p}{:}
646*7f2fe78bSCy Schubert
647*7f2fe78bSCy Schubert  \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{3600}
648*7f2fe78bSCy Schubert  \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{5}\PYG{p}{:}\PYG{l+m+mi}{00}
649*7f2fe78bSCy Schubert  \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{30}\PYG{n}{m}
650*7f2fe78bSCy Schubert  \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{10d 0h 0m 0s}\PYG{l+s+s2}{\PYGZdq{}}
651*7f2fe78bSCy Schubert\end{sphinxVerbatim}
652*7f2fe78bSCy Schubert
653*7f2fe78bSCy Schubert
654*7f2fe78bSCy Schubert\section{getdate time}
655*7f2fe78bSCy Schubert\label{\detokenize{basic/date_format:getdate-time}}\label{\detokenize{basic/date_format:getdate}}
656*7f2fe78bSCy Schubert\sphinxAtStartPar
657*7f2fe78bSCy SchubertSome of the kadmin and kdb5\_util commands take a date\sphinxhyphen{}time in a
658*7f2fe78bSCy Schuberthuman\sphinxhyphen{}readable format.  Some of the acceptable date\sphinxhyphen{}time
659*7f2fe78bSCy Schubertstrings are:
660*7f2fe78bSCy Schubert\begin{quote}
661*7f2fe78bSCy Schubert
662*7f2fe78bSCy Schubert
663*7f2fe78bSCy Schubert\begin{savenotes}\sphinxattablestart
664*7f2fe78bSCy Schubert\centering
665*7f2fe78bSCy Schubert\begin{tabulary}{\linewidth}[t]{|T|T|T|}
666*7f2fe78bSCy Schubert\hline
667*7f2fe78bSCy Schubert\sphinxstyletheadfamily &\sphinxstyletheadfamily
668*7f2fe78bSCy Schubert\sphinxAtStartPar
669*7f2fe78bSCy SchubertFormat
670*7f2fe78bSCy Schubert&\sphinxstyletheadfamily
671*7f2fe78bSCy Schubert\sphinxAtStartPar
672*7f2fe78bSCy SchubertExample
673*7f2fe78bSCy Schubert\\
674*7f2fe78bSCy Schubert\hline\sphinxmultirow{3}{4}{%
675*7f2fe78bSCy Schubert\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
676*7f2fe78bSCy Schubert\sphinxAtStartPar
677*7f2fe78bSCy SchubertDate
678*7f2fe78bSCy Schubert\par
679*7f2fe78bSCy Schubert\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
680*7f2fe78bSCy Schubert}%
681*7f2fe78bSCy Schubert&
682*7f2fe78bSCy Schubert\sphinxAtStartPar
683*7f2fe78bSCy Schubertmm/dd/yy
684*7f2fe78bSCy Schubert&
685*7f2fe78bSCy Schubert\sphinxAtStartPar
686*7f2fe78bSCy Schubert07/27/12
687*7f2fe78bSCy Schubert\\
688*7f2fe78bSCy Schubert\cline{2-3}\sphinxtablestrut{4}&
689*7f2fe78bSCy Schubert\sphinxAtStartPar
690*7f2fe78bSCy Schubertmonth dd, yyyy
691*7f2fe78bSCy Schubert&
692*7f2fe78bSCy Schubert\sphinxAtStartPar
693*7f2fe78bSCy SchubertJul 27, 2012
694*7f2fe78bSCy Schubert\\
695*7f2fe78bSCy Schubert\cline{2-3}\sphinxtablestrut{4}&
696*7f2fe78bSCy Schubert\sphinxAtStartPar
697*7f2fe78bSCy Schubertyyyy\sphinxhyphen{}mm\sphinxhyphen{}dd
698*7f2fe78bSCy Schubert&
699*7f2fe78bSCy Schubert\sphinxAtStartPar
700*7f2fe78bSCy Schubert2012\sphinxhyphen{}07\sphinxhyphen{}27
701*7f2fe78bSCy Schubert\\
702*7f2fe78bSCy Schubert\hline\sphinxmultirow{2}{11}{%
703*7f2fe78bSCy Schubert\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
704*7f2fe78bSCy Schubert\sphinxAtStartPar
705*7f2fe78bSCy SchubertAbsolute
706*7f2fe78bSCy Schuberttime
707*7f2fe78bSCy Schubert\par
708*7f2fe78bSCy Schubert\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
709*7f2fe78bSCy Schubert}%
710*7f2fe78bSCy Schubert&
711*7f2fe78bSCy Schubert\sphinxAtStartPar
712*7f2fe78bSCy SchubertHH:mm{[}:ss{]}pp
713*7f2fe78bSCy Schubert&
714*7f2fe78bSCy Schubert\sphinxAtStartPar
715*7f2fe78bSCy Schubert08:30 PM
716*7f2fe78bSCy Schubert\\
717*7f2fe78bSCy Schubert\cline{2-3}\sphinxtablestrut{11}&
718*7f2fe78bSCy Schubert\sphinxAtStartPar
719*7f2fe78bSCy Schuberthh:mm{[}:ss{]}
720*7f2fe78bSCy Schubert&
721*7f2fe78bSCy Schubert\sphinxAtStartPar
722*7f2fe78bSCy Schubert20:30
723*7f2fe78bSCy Schubert\\
724*7f2fe78bSCy Schubert\hline
725*7f2fe78bSCy Schubert\sphinxAtStartPar
726*7f2fe78bSCy SchubertRelative
727*7f2fe78bSCy Schuberttime
728*7f2fe78bSCy Schubert&
729*7f2fe78bSCy Schubert\sphinxAtStartPar
730*7f2fe78bSCy SchubertN tt
731*7f2fe78bSCy Schubert&
732*7f2fe78bSCy Schubert\sphinxAtStartPar
733*7f2fe78bSCy Schubert30 sec
734*7f2fe78bSCy Schubert\\
735*7f2fe78bSCy Schubert\hline\sphinxmultirow{2}{19}{%
736*7f2fe78bSCy Schubert\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
737*7f2fe78bSCy Schubert\sphinxAtStartPar
738*7f2fe78bSCy SchubertTime zone
739*7f2fe78bSCy Schubert\par
740*7f2fe78bSCy Schubert\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
741*7f2fe78bSCy Schubert}%
742*7f2fe78bSCy Schubert&
743*7f2fe78bSCy Schubert\sphinxAtStartPar
744*7f2fe78bSCy SchubertZ
745*7f2fe78bSCy Schubert&
746*7f2fe78bSCy Schubert\sphinxAtStartPar
747*7f2fe78bSCy SchubertEST
748*7f2fe78bSCy Schubert\\
749*7f2fe78bSCy Schubert\cline{2-3}\sphinxtablestrut{19}&
750*7f2fe78bSCy Schubert\sphinxAtStartPar
751*7f2fe78bSCy Schubertz
752*7f2fe78bSCy Schubert&
753*7f2fe78bSCy Schubert\sphinxAtStartPar
754*7f2fe78bSCy Schubert\sphinxhyphen{}0400
755*7f2fe78bSCy Schubert\\
756*7f2fe78bSCy Schubert\hline
757*7f2fe78bSCy Schubert\end{tabulary}
758*7f2fe78bSCy Schubert\par
759*7f2fe78bSCy Schubert\sphinxattableend\end{savenotes}
760*7f2fe78bSCy Schubert\end{quote}
761*7f2fe78bSCy Schubert
762*7f2fe78bSCy Schubert\sphinxAtStartPar
763*7f2fe78bSCy Schubert(See {\hyperref[\detokenize{basic/date_format:abbreviation}]{\sphinxcrossref{\DUrole{std,std-ref}{Abbreviations used in this document}}}}.)
764*7f2fe78bSCy Schubert
765*7f2fe78bSCy Schubert\sphinxAtStartPar
766*7f2fe78bSCy SchubertExamples:
767*7f2fe78bSCy Schubert
768*7f2fe78bSCy Schubert\begin{sphinxVerbatim}[commandchars=\\\{\}]
769*7f2fe78bSCy Schubert\PYG{n}{Create} \PYG{n}{a} \PYG{n}{principal} \PYG{n}{that} \PYG{n}{expires} \PYG{n}{on} \PYG{n}{the} \PYG{n}{date} \PYG{n}{indicated}\PYG{p}{:}
770*7f2fe78bSCy Schubert    \PYG{n}{addprinc} \PYG{n}{test1} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{3/27/12 10:00:07 EST}\PYG{l+s+s2}{\PYGZdq{}}
771*7f2fe78bSCy Schubert    \PYG{n}{addprinc} \PYG{n}{test2} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{January 23, 2015 10:05pm}\PYG{l+s+s2}{\PYGZdq{}}
772*7f2fe78bSCy Schubert    \PYG{n}{addprinc} \PYG{n}{test3} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{22:00 GMT}\PYG{l+s+s2}{\PYGZdq{}}
773*7f2fe78bSCy Schubert\PYG{n}{Add} \PYG{n}{a} \PYG{n}{principal} \PYG{n}{that} \PYG{n}{will} \PYG{n}{expire} \PYG{o+ow}{in} \PYG{l+m+mi}{30} \PYG{n}{minutes}\PYG{p}{:}
774*7f2fe78bSCy Schubert    \PYG{n}{addprinc} \PYG{n}{test4} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30 minutes}\PYG{l+s+s2}{\PYGZdq{}}
775*7f2fe78bSCy Schubert\end{sphinxVerbatim}
776*7f2fe78bSCy Schubert
777*7f2fe78bSCy Schubert
778*7f2fe78bSCy Schubert\section{Absolute time}
779*7f2fe78bSCy Schubert\label{\detokenize{basic/date_format:absolute-time}}\label{\detokenize{basic/date_format:abstime}}
780*7f2fe78bSCy Schubert\sphinxAtStartPar
781*7f2fe78bSCy SchubertThis rarely used date\sphinxhyphen{}time format can be noted in one of the
782*7f2fe78bSCy Schubertfollowing ways:
783*7f2fe78bSCy Schubert\begin{quote}
784*7f2fe78bSCy Schubert
785*7f2fe78bSCy Schubert
786*7f2fe78bSCy Schubert\begin{savenotes}\sphinxattablestart
787*7f2fe78bSCy Schubert\centering
788*7f2fe78bSCy Schubert\begin{tabulary}{\linewidth}[t]{|T|T|T|}
789*7f2fe78bSCy Schubert\hline
790*7f2fe78bSCy Schubert\sphinxstyletheadfamily
791*7f2fe78bSCy Schubert\sphinxAtStartPar
792*7f2fe78bSCy SchubertFormat
793*7f2fe78bSCy Schubert&\sphinxstyletheadfamily
794*7f2fe78bSCy Schubert\sphinxAtStartPar
795*7f2fe78bSCy SchubertExample
796*7f2fe78bSCy Schubert&\sphinxstyletheadfamily
797*7f2fe78bSCy Schubert\sphinxAtStartPar
798*7f2fe78bSCy SchubertValue
799*7f2fe78bSCy Schubert\\
800*7f2fe78bSCy Schubert\hline
801*7f2fe78bSCy Schubert\sphinxAtStartPar
802*7f2fe78bSCy Schubertyyyymmddhhmmss
803*7f2fe78bSCy Schubert&
804*7f2fe78bSCy Schubert\sphinxAtStartPar
805*7f2fe78bSCy Schubert20141231235900
806*7f2fe78bSCy Schubert&\sphinxmultirow{5}{6}{%
807*7f2fe78bSCy Schubert\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
808*7f2fe78bSCy Schubert\sphinxAtStartPar
809*7f2fe78bSCy SchubertOne minute
810*7f2fe78bSCy Schubertbefore 2015
811*7f2fe78bSCy Schubert\par
812*7f2fe78bSCy Schubert\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
813*7f2fe78bSCy Schubert}%
814*7f2fe78bSCy Schubert\\
815*7f2fe78bSCy Schubert\cline{1-2}
816*7f2fe78bSCy Schubert\sphinxAtStartPar
817*7f2fe78bSCy Schubertyyyy.mm.dd.hh.mm.ss
818*7f2fe78bSCy Schubert&
819*7f2fe78bSCy Schubert\sphinxAtStartPar
820*7f2fe78bSCy Schubert2014.12.31.23.59.00
821*7f2fe78bSCy Schubert&\sphinxtablestrut{6}\\
822*7f2fe78bSCy Schubert\cline{1-2}
823*7f2fe78bSCy Schubert\sphinxAtStartPar
824*7f2fe78bSCy Schubertyymmddhhmmss
825*7f2fe78bSCy Schubert&
826*7f2fe78bSCy Schubert\sphinxAtStartPar
827*7f2fe78bSCy Schubert141231235900
828*7f2fe78bSCy Schubert&\sphinxtablestrut{6}\\
829*7f2fe78bSCy Schubert\cline{1-2}
830*7f2fe78bSCy Schubert\sphinxAtStartPar
831*7f2fe78bSCy Schubertyy.mm.dd.hh.mm.ss
832*7f2fe78bSCy Schubert&
833*7f2fe78bSCy Schubert\sphinxAtStartPar
834*7f2fe78bSCy Schubert14.12.31.23.59.00
835*7f2fe78bSCy Schubert&\sphinxtablestrut{6}\\
836*7f2fe78bSCy Schubert\cline{1-2}
837*7f2fe78bSCy Schubert\sphinxAtStartPar
838*7f2fe78bSCy Schubertdd\sphinxhyphen{}month\sphinxhyphen{}yyyy:hh:mm:ss
839*7f2fe78bSCy Schubert&
840*7f2fe78bSCy Schubert\sphinxAtStartPar
841*7f2fe78bSCy Schubert31\sphinxhyphen{}Dec\sphinxhyphen{}2014:23:59:00
842*7f2fe78bSCy Schubert&\sphinxtablestrut{6}\\
843*7f2fe78bSCy Schubert\hline
844*7f2fe78bSCy Schubert\sphinxAtStartPar
845*7f2fe78bSCy Schuberthh:mm:ss
846*7f2fe78bSCy Schubert&
847*7f2fe78bSCy Schubert\sphinxAtStartPar
848*7f2fe78bSCy Schubert20:00:00
849*7f2fe78bSCy Schubert&\sphinxmultirow{2}{17}{%
850*7f2fe78bSCy Schubert\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
851*7f2fe78bSCy Schubert\sphinxAtStartPar
852*7f2fe78bSCy Schubert8 o’clock in
853*7f2fe78bSCy Schubertthe evening
854*7f2fe78bSCy Schubert\par
855*7f2fe78bSCy Schubert\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
856*7f2fe78bSCy Schubert}%
857*7f2fe78bSCy Schubert\\
858*7f2fe78bSCy Schubert\cline{1-2}
859*7f2fe78bSCy Schubert\sphinxAtStartPar
860*7f2fe78bSCy Schuberthhmmss
861*7f2fe78bSCy Schubert&
862*7f2fe78bSCy Schubert\sphinxAtStartPar
863*7f2fe78bSCy Schubert200000
864*7f2fe78bSCy Schubert&\sphinxtablestrut{17}\\
865*7f2fe78bSCy Schubert\hline
866*7f2fe78bSCy Schubert\end{tabulary}
867*7f2fe78bSCy Schubert\par
868*7f2fe78bSCy Schubert\sphinxattableend\end{savenotes}
869*7f2fe78bSCy Schubert\end{quote}
870*7f2fe78bSCy Schubert
871*7f2fe78bSCy Schubert\sphinxAtStartPar
872*7f2fe78bSCy Schubert(See {\hyperref[\detokenize{basic/date_format:abbreviation}]{\sphinxcrossref{\DUrole{std,std-ref}{Abbreviations used in this document}}}}.)
873*7f2fe78bSCy Schubert
874*7f2fe78bSCy Schubert\sphinxAtStartPar
875*7f2fe78bSCy SchubertExample:
876*7f2fe78bSCy Schubert
877*7f2fe78bSCy Schubert\begin{sphinxVerbatim}[commandchars=\\\{\}]
878*7f2fe78bSCy Schubert\PYG{n}{Set} \PYG{n}{the} \PYG{n}{default} \PYG{n}{expiration} \PYG{n}{date} \PYG{n}{to} \PYG{n}{July} \PYG{l+m+mi}{27}\PYG{p}{,} \PYG{l+m+mi}{2012} \PYG{n}{at} \PYG{l+m+mi}{20}\PYG{p}{:}\PYG{l+m+mi}{30}
879*7f2fe78bSCy Schubert\PYG{n}{default\PYGZus{}principal\PYGZus{}expiration} \PYG{o}{=} \PYG{l+m+mi}{20120727203000}
880*7f2fe78bSCy Schubert\end{sphinxVerbatim}
881*7f2fe78bSCy Schubert
882*7f2fe78bSCy Schubert
883*7f2fe78bSCy Schubert\subsection{Abbreviations used in this document}
884*7f2fe78bSCy Schubert\label{\detokenize{basic/date_format:abbreviations-used-in-this-document}}\label{\detokenize{basic/date_format:abbreviation}}
885*7f2fe78bSCy Schubert\begin{DUlineblock}{0em}
886*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{month}  : locale’s month name or its abbreviation;
887*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{dd}   : day of month (01\sphinxhyphen{}31);
888*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{HH}   : hours (00\sphinxhyphen{}12);
889*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{hh}   : hours (00\sphinxhyphen{}23);
890*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{mm}   : in time \sphinxhyphen{} minutes (00\sphinxhyphen{}59); in date \sphinxhyphen{} month (01\sphinxhyphen{}12);
891*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{N}    : number;
892*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{pp}   : AM or PM;
893*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{ss}   : seconds  (00\sphinxhyphen{}60);
894*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{tt}   : time units (hours, minutes, min, seconds, sec);
895*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{yyyy} : year;
896*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{yy}   : last two digits of the year;
897*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{Z}    : alphabetic time zone abbreviation;
898*7f2fe78bSCy Schubert\item[] \sphinxstyleemphasis{z}    : numeric time zone;
899*7f2fe78bSCy Schubert\end{DUlineblock}
900*7f2fe78bSCy Schubert
901*7f2fe78bSCy Schubert\begin{sphinxadmonition}{note}{Note:}\begin{itemize}
902*7f2fe78bSCy Schubert\item {}
903*7f2fe78bSCy Schubert\sphinxAtStartPar
904*7f2fe78bSCy SchubertIf the date specification contains spaces, you may need to
905*7f2fe78bSCy Schubertenclose it in double quotes;
906*7f2fe78bSCy Schubert
907*7f2fe78bSCy Schubert\item {}
908*7f2fe78bSCy Schubert\sphinxAtStartPar
909*7f2fe78bSCy SchubertAll keywords are case\sphinxhyphen{}insensitive.
910*7f2fe78bSCy Schubert
911*7f2fe78bSCy Schubert\end{itemize}
912*7f2fe78bSCy Schubert\end{sphinxadmonition}
913*7f2fe78bSCy Schubert
914*7f2fe78bSCy Schubert
915*7f2fe78bSCy Schubert
916*7f2fe78bSCy Schubert\renewcommand{\indexname}{Index}
917*7f2fe78bSCy Schubert\printindex
918*7f2fe78bSCy Schubert\end{document}