4 * Copyright (c) 1999 - 2002 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the Institute nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 const AUTHENTICATE_OLD = 1;
42 const CHANGEPASSWORD = 2;
43 const GETTICKET_OLD = 3;
44 const SETPASSWORD = 4;
52 const GETPASSWORD = 12;
53 const GETRANDOMKEY = 13;
54 const AUTHENTICATE = 21;
57 const MAXKAKVNO = 127;
59 /* Flags (note 0 is illegal) */
61 const KAFNORMAL = 0x1;
62 /* For the two following the KAFNORMAL MUST not be set */
63 const KAFREE = 0x2; /* on freelist */
64 const KAOLDKEYS = 0x10; /* used to store old keys */
66 const KASPECIAL = 0x100; /* special authserver principal */
67 const KAFASSOCROOT = 0x200; /* root of associate tree */
68 const KAFASSOC = 0x300; /* associate entry */
70 /* The following flags are used on KAA_SetFields() */
71 const KAFADMIN = 0x004; /* administrator */
72 const KAFNOTGS = 0x008; /* can't get or use TGT */
73 const KAFNOSEAL = 0x020; /* can't be used as server */
74 const KAFNOCPW = 0x040; /* can't change password */
75 const KAFNEWASSOC = 0x080; /* can create associates */
79 const KAMAJORVERSION = 5;
80 const KAMINORVERSION = 1;
81 const NEVERDATE = 037777777777;
82 const KADEBUGKCINFOSIZE = 25;
88 const KADATABASEINCONSISTENT = 180480;
89 const KAEXIST = 180481;
91 const KACREATEFAIL = 180483;
92 const KANOENT = 180484;
93 const KAEMPTY = 180485;
94 const KABADNAME = 180486;
95 const KABADINDEX = 180487;
96 const KANOAUTH = 180488;
97 const KAANSWERTOOLONG = 180489;
98 const KABADREQUEST = 180490;
99 const KAOLDINTERFACE = 180491;
100 const KABADARGUMENT = 180492;
101 const KABADCMD = 180493;
102 const KANOKEYS = 180494;
103 const KAREADPW = 180495;
104 const KABADKEY = 180496;
105 const KAUBIKINIT = 180497;
106 const KAUBIKCALL = 180498;
107 const KABADPROTOCOL = 180499;
108 const KANOCELLS = 180500;
109 const KANOCELL = 180501;
110 const KATOOMANYUBIKS = 180502;
111 const KATOOMANYKEYS = 180503;
112 const KABADTICKET = 180504;
113 const KAUNKNOWNKEY = 180505;
114 const KAKEYCACHEINVALID = 180506;
115 const KABADSERVER = 180507;
116 const KABADUSER = 180508;
117 const KABADCPW = 180509;
118 const KABADCREATE = 180510;
119 const KANOTICKET = 180511;
120 const KAASSOCUSER = 180512;
121 const KANOTSPECIAL = 180513;
122 const KACLOCKSKEW = 180514;
123 const KANORECURSE = 180515;
124 const KARXFAIL = 180516;
125 const KANULLPASSWORD = 180517;
126 const KAINTERNALERROR = 180518;
127 const KAPWEXPIRED = 180519;
128 const KAREUSED = 180520;
129 const KATOOSOON = 180521;
130 const KALOCKED = 180522;
143 struct EncryptionKey {
147 const MAXKANAMELEN = 64;
148 #define MAXKANAMELEN 64
149 const KA_LABELSIZE = 4;
151 %#ifndef MAXKTCTICKETLEN
152 const MAXKTCTICKETLEN = 344;
155 typedef string kaname<MAXKANAMELEN>;
158 char name[MAXKANAMELEN];
159 char instance[MAXKANAMELEN];
163 int32_t minor_version;
165 uint32_t user_expiration;
166 Date modification_time;
167 kaident modification_user;
168 Date change_password_time;
169 long max_ticket_lifetime;
172 uint32_t keyCheckSym;
181 Authenticate (IN kaname name,
186 INOUT ka_BBS *answer) = 21;
188 ChangePassword (IN kaname name,
191 INOUT ka_BBS *oanswer) = 2;
195 SetPassword (IN kaname name,
198 IN EncryptionKey password) = 4;
200 SetFields (IN kaname name,
203 IN Date user_expiration,
204 IN int32_t max_ticket_lifetime,
205 IN int32_t maxAssociates,
207 IN int32_t spare2) = 5;
209 CreateUser (IN kaname name,
211 IN EncryptionKey password) = 6;
213 GetEntry (IN kaname name,
215 IN long major_version,
216 OUT kaentryinfo *entry) = 8;
221 GetTicket_old (IN int32_t kvno,
222 IN kaname auth_domain,
223 IN struct ka_CBS *aticket,
226 IN struct ka_CBS *atimes,
227 INOUT struct ka_BBS *oanswer) = 3;
229 GetTicket (IN int32_t kvno,
230 IN kaname auth_domain,
231 IN struct ka_CBS *aticket,
234 IN struct ka_CBS *atimes,
235 INOUT struct ka_BBS *oanswer) = 23;