]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libgssapi/gssapi.3
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libgssapi / gssapi.3
1 .\" -*- nroff -*-
2 .\"
3 .\" Copyright (c) 2005 Doug Rabson
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\"     $FreeBSD$
28 .\"
29 .Dd January 26, 2010
30 .Dt GSSAPI 3
31 .Os
32 .Sh NAME
33 .Nm gssapi
34 .Nd "Generic Security Services API"
35 .Sh LIBRARY
36 GSS-API Library (libgssapi, -lgssapi)
37 .Sh SYNOPSIS
38 .In gssapi/gssapi.h
39 .Sh DESCRIPTION
40 The Generic Security Service Application Programming Interface
41 provides security services to its callers,
42 and is intended for implementation atop a variety of underlying
43 cryptographic mechanisms.
44 Typically, GSS-API callers will be application protocols into which
45 security enhancements are integrated through invocation of services
46 provided by the GSS-API.
47 The GSS-API allows a caller application to authenticate a principal
48 identity associated with a peer application, to delegate rights to a
49 peer,
50 and to apply security services such as confidentiality and integrity
51 on a per-message basis.
52 .Pp
53 There are four stages to using the GSS-API:
54 .Pp
55 .Bl -tag -width "a)"
56 .It a)
57 The application acquires a set of credentials with which it may prove
58 its identity to other processes.
59 The application's credentials vouch for its global identity,
60 which may or may not be related to any local username under which it
61 may be running.
62 .It b)
63 A pair of communicating applications establish a joint security
64 context using their credentials.
65 The security context is a pair of GSS-API data structures that contain
66 shared state information, which is required in order that per-message
67 security services may be provided.
68 Examples of state that might be shared between applications as part of
69 a security context are cryptographic keys,
70 and message sequence numbers.
71 As part of the establishment of a security context,
72 the context initiator is authenticated to the responder,
73 and may require that the responder is authenticated in turn.
74 The initiator may optionally give the responder the right to initiate
75 further security contexts,
76 acting as an agent or delegate of the initiator.
77 This transfer of rights is termed delegation,
78 and is achieved by creating a set of credentials,
79 similar to those used by the initiating application,
80 but which may be used by the responder.
81 .Pp
82 To establish and maintain the shared information that makes up the
83 security context,
84 certain GSS-API calls will return a token data structure,
85 which is an opaque data type that may contain cryptographically
86 protected data.
87 The caller of such a GSS-API routine is responsible for transferring
88 the token to the peer application,
89 encapsulated if necessary in an application protocol.
90 On receipt of such a token, the peer application should pass it to a
91 corresponding GSS-API routine which will decode the token and extract
92 the information,
93 updating the security context state information accordingly.
94 .It c)
95 Per-message services are invoked to apply either:
96 .Pp
97 integrity and data origin authentication, or confidentiality,
98 integrity and data origin authentication to application data,
99 which are treated by GSS-API as arbitrary octet-strings.
100 An application transmitting a message that it wishes to protect will
101 call the appropriate GSS-API routine (gss_get_mic or gss_wrap) to
102 apply protection,
103 specifying the appropriate security context,
104 and send the resulting token to the receiving application.
105 The receiver will pass the received token (and, in the case of data
106 protected by gss_get_mic, the accompanying message-data) to the
107 corresponding decoding routine (gss_verify_mic or gss_unwrap) to
108 remove the protection and validate the data.
109 .It d)
110 At the completion of a communications session (which may extend across
111 several transport connections),
112 each application calls a GSS-API routine to delete the security
113 context.
114 Multiple contexts may also be used (either successively or
115 simultaneously) within a single communications association, at the
116 option of the applications.
117 .El
118 .Sh GSS-API ROUTINES
119 This section lists the routines that make up the GSS-API,
120 and offers a brief description of the purpose of each routine.
121 .Pp
122 GSS-API Credential-management Routines:
123 .Bl -tag -width "gss_inquire_cred_by_mech"
124 .It gss_acquire_cred
125 Assume a global identity; Obtain a GSS-API credential handle for
126 pre-existing credentials.
127 .It gss_add_cred
128 Construct credentials incrementally
129 .It gss_inquire_cred
130 Obtain information about a credential
131 .It gss_inquire_cred_by_mech
132 Obtain per-mechanism information about a credential.
133 .It gss_release_cred
134 Discard a credential handle.
135 .El
136 .Pp
137 GSS-API Context-Level Routines:
138 .Bl -tag -width "gss_inquire_cred_by_mech"
139 .It gss_init_sec_context
140 Initiate a security context with a peer application
141 .It gss_accept_sec_context
142  Accept a security context initiated by a peer application
143 .It gss_delete_sec_context
144 Discard a security context
145 .It gss_process_context_token
146 Process a token on a security context from a peer application
147 .It gss_context_time
148 Determine for how long a context will remain valid
149 .It gss_inquire_context
150 Obtain information about a security context
151 .It gss_wrap_size_limit
152 Determine token-size limit for
153 .Xr gss_wrap 3
154 on a context
155 .It gss_export_sec_context
156 Transfer a security context to another process
157 .It gss_import_sec_context
158 Import a transferred context
159 .El
160 .Pp
161 GSS-API Per-message Routines:
162 .Bl -tag -width "gss_inquire_cred_by_mech"
163 .It gss_get_mic
164 Calculate a cryptographic message integrity code (MIC) for a message;
165 integrity service
166 .It gss_verify_mic
167 Check a MIC against a message;
168 verify integrity of a received message
169 .It gss_wrap
170 Attach a MIC to a message, and optionally encrypt the message content;
171 confidentiality service
172 .It gss_unwrap
173 Verify a message with attached MIC, and decrypt message content if
174 necessary.
175 .El
176 .Pp
177 GSS-API Name manipulation Routines:
178 .Bl -tag -width "gss_inquire_cred_by_mech"
179 .It gss_import_name
180 Convert a contiguous string name to internal-form
181 .It gss_display_name
182 Convert internal-form name to text
183 .It gss_compare_name
184 Compare two internal-form names
185 .It gss_release_name
186 Discard an internal-form name
187 .It gss_inquire_names_for_mech
188 List the name-types supported by the specified mechanism
189 .It gss_inquire_mechs_for_name
190 List mechanisms that support the specified name-type
191 .It gss_canonicalize_name
192 Convert an internal name to an MN
193 .It gss_export_name
194 Convert an MN to export form
195 .It gss_duplicate_name
196 Create a copy of an internal name
197 .El
198 .Pp
199 GSS-API Miscellaneous Routines
200 .Bl -tag -width "gss_inquire_cred_by_mech"
201 .It gss_add_oid_set_member
202 Add an object identifier to a set
203 .It gss_display_status
204 Convert a GSS-API status code to text
205 .It gss_indicate_mechs
206 Determine available underlying authentication mechanisms
207 .It gss_release_buffer
208 Discard a buffer
209 .It gss_release_oid_set
210 Discard a set of object identifiers
211 .It gss_create_empty_oid_set
212 Create a set containing no object identifiers
213 .It gss_test_oid_set_member
214 Determines whether an object identifier is a member of a set.
215 .El
216 .Pp
217 Individual GSS-API implementations may augment these routines by
218 providing additional mechanism-specific routines if required
219 functionality is not available from the generic forms.
220 Applications are encouraged to use the generic routines wherever
221 possible on portability grounds.
222 .Sh STANDARDS
223 .Bl -tag
224 .It RFC 2743
225 Generic Security Service Application Program Interface Version 2, Update 1
226 .It RFC 2744
227 Generic Security Service API Version 2 : C-bindings
228 .El
229 .Sh HISTORY
230 The
231 .Nm
232 library first appeared in
233 .Fx 7.0 .
234 .Sh AUTHORS
235 John Wray, Iris Associates
236 .Sh COPYRIGHT
237 Copyright (C) The Internet Society (2000).  All Rights Reserved.
238 .Pp
239 This document and translations of it may be copied and furnished to
240 others, and derivative works that comment on or otherwise explain it
241 or assist in its implementation may be prepared, copied, published
242 and distributed, in whole or in part, without restriction of any
243 kind, provided that the above copyright notice and this paragraph are
244 included on all such copies and derivative works.  However, this
245 document itself may not be modified in any way, such as by removing
246 the copyright notice or references to the Internet Society or other
247 Internet organizations, except as needed for the purpose of
248 developing Internet standards in which case the procedures for
249 copyrights defined in the Internet Standards process must be
250 followed, or as required to translate it into languages other than
251 English.
252 .Pp
253 The limited permissions granted above are perpetual and will not be
254 revoked by the Internet Society or its successors or assigns.
255 .Pp
256 This document and the information contained herein is provided on an
257 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
258 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
259 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
260 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
261 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.