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