Add generalized definition of krb5_ui_4 and krb5_int32 to the documentation for bette...
[krb5.git] / doc / kadm5acl.texinfo
1 The format of the file is:
2
3 @smallexample
4 Kerberos_principal      permissions     [target_principal]      [restrictions]
5 @end smallexample
6
7 The Kerberos principal (and optional target principal) can include the
8 ``@b{*}'' wildcard, so if you want any principal with the instance
9 ``admin'' to have full permissions on the database, you could use the
10 principal ``@code{*/admin@@REALM}'' where ``REALM'' is your Kerberos
11 realm.  @code{target_principal} can also include backreferences to
12 @code{Kerberos_principal}, in which "@b{*@i{number}}" matches the
13 component @i{number} in the @code{Kerberos_principal}.
14
15 Note:  a common use of an @i{admin} instance is so you can grant
16 separate permissions (such as administrator access to the Kerberos
17 database) to a separate Kerberos principal.  For example, the user
18 @code{@value{ADMINUSER}} might have a principal for his administrative
19 use, called @code{@value{ADMINUSER}/admin}.  This way,
20 @code{@value{ADMINUSER}} would obtain @code{@value{ADMINUSER}/admin}
21 tickets only when he actually needs to use those permissions.
22
23 The permissions are represented by single letters; UPPER-CASE letters
24 represent negative permissions.  The permissions are:
25
26 @table @b
27 @itemx a
28 allows the addition of principals or policies in the database.
29 @itemx A
30 disallows the addition of principals or policies in the database.
31 @itemx d
32 allows the deletion of principals or policies in the database.
33 @itemx D
34 disallows the deletion of principals or policies in the database.
35 @itemx m   
36 allows the modification of principals or policies in the database.
37 @itemx M
38 disallows the modification of principals or policies in the database.
39 @itemx c
40 allows the changing of passwords for principals in the database.
41 @itemx C
42 disallows the changing of passwords for principals in the database.
43 @itemx i
44 allows inquiries to the database.
45 @itemx I
46 disallows inquiries to the database.
47 @itemx l
48 allows the listing of principals or policies in the database.
49 @itemx L
50 disallows the listing of principals or policies in the database.
51 @itemx s
52 allows the explicit setting of the key for a principal
53 @itemx S
54 disallows the explicit setting of the key for a principal
55 @itemx *
56 All privileges (admcil).
57 @itemx x
58 All privileges (admcil); identical to ``*''.
59 @end table
60
61 The restrictions are a string of flags.  Allowed restrictions are:
62
63 @table @b
64 @itemx [+ -]@i{flagname}
65 flag is forced to indicated value.  The permissible flags are the same
66 as the @code{+} and @code{-} flags for the @code{kadmin addprinc} and
67 @code{modprinc} commands.
68 @itemx -clearpolicy
69 policy is forced to clear
70 @itemx -policy @i{pol}
71 policy is forced to be @i{pol}
72 @itemx expire @i{time}
73 @itemx pwexpire @i{time}
74 @itemx maxlife @i{time}
75 @itemx maxrenewlife @i{time}
76 associated value will be forced to MIN(@i{time}, requested value)
77 @end table
78
79 The above flags act as restrictions on any add or modify operation
80 which is allowed due to that ACL line.
81
82 Here is an example of a @code{kadm5.acl} file.  Note that order is
83 important; permissions are determined by the first matching entry.
84
85 @smallexample
86 @group
87 */admin@@@value{PRIMARYREALM}  *
88 @value{ADMINUSER}@@@value{PRIMARYREALM}  ADMCIL
89 @value{ADMINUSER}/*@@@value{PRIMARYREALM} il */root@@@value{PRIMARYREALM}
90 *@@@value{PRIMARYREALM} cil *1/admin@@@value{PRIMARYREALM}
91 */*@@@value{PRIMARYREALM}  i
92 */admin@@@value{SECONDREALM} * -maxlife 9h -postdateable
93 @end group
94 @end smallexample
95
96 @noindent In the above file, any principal in the
97 @value{PRIMARYREALM} realm with an @code{admin} instance has all
98 administrative privileges.  The user @code{@value{ADMINUSER}}
99 has all permissions with his @code{admin} instance,
100 @code{@value{ADMINUSER}/admin@@@value{PRIMARYREALM}} (matches the first
101 line).  He has no permissions at all with his @code{null} instance,
102 @code{@value{ADMINUSER}@@@value{PRIMARYREALM}} (matches the second line).
103 His root instance has @i{inquire} and @i{list} permissions with any
104 other principal that has the instance @code{root}.  Any principal
105 in @value{PRIMARYREALM} can inquire, list, or change the password of
106 their @code{admin} instance, but not any other @code{admin} instance.
107 Any principal in the realm @code{@value{PRIMARYREALM}} (except for
108 @code{@value{ADMINUSER}@@@value{PRIMARYREALM}}, as mentioned above) has
109 @i{inquire} privileges.  Finally, any principal with an admin instance
110 in @value{SECONDREALM} has all permissions, but any principal that they
111 create or modify will not be able to get postdateable tickets or tickets
112 with a life of longer than 9 hours.
113