2 .\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RPCSEC_GSS 3NSL "Jun 29, 2001"
8 rpcsec_gss \- security flavor incorporating GSS-API protections
12 cc [ \fIflag\fR... ] \fIfile\fR... -lnsl [ \fIlibrary\fR... ]
13 #include <rpc/rpcsec_gss.h>
19 \fBRPCSEC_GSS\fR is a security flavor which sits "on top" of the \fBGSS-API\fR
20 (Generic Security Service API) for network transmissions. Applications using
21 \fBRPCSEC_GSS\fR can take advantage of \fBGSS-API\fR security features;
22 moreover, they can use any security mechanism (such as RSA public key or
23 Kerberos) that works with the \fBGSS-API.\fR
26 The \fBGSS-API\fR offers two security services beyond the traditional
27 authentication services \fB(AUTH_DH,\fR \fBAUTH_SYS,\fR and \fBAUTH_KERB):\fR
28 integrity and privacy. With integrity, the system uses cryptographic
29 checksumming to ensure the authenticity of a message (authenticity of
30 originator, recipient, and data); privacy provides additional security by
31 encrypting data. Applications using \fBRPCSEC_GSS\fR specify which service
32 they wish to use. Type of security service is mechanism-independent.
35 Before exchanging data with a peer, an application must establish a context for
36 the exchange. \fBRPCSEC_GSS\fR provides a single function for this purpose,
37 \fBrpc_gss_seccreate()\fR, which allows the application to specify the security
38 mechanism, Quality of Protection (QOP), and type of service at context
39 creation. (The QOP parameter sets the cryptographic algorithms to be used with
40 integrity or privacy, and is mechanism-dependent.) Once a context is
41 established, applications can reset the QOP and type of service for each data
42 unit exchanged, if desired.
45 Valid mechanisms and QOPs may be obtained from configuration files or from the
46 name service. Each mechanism has a default QOP.
49 Contexts are destroyed with the usual RPC \fBauth_destroy()\fR call.
53 Some of the data structures used by the \fBRPCSEC_GSS\fR package are shown
55 .SS "\fBrpc_gss_service_t\fR"
58 This enum defines the types of security services the context may have.
59 \fBrpc_gss_seccreate()\fR takes this as one argument when setting the service
65 rpc_gss_svc_default = 0,
67 rpc_gss_svc_integrity = 2,
68 rpc_gss_svc_privacy = 3
73 .SS "\fBrpc_gss_options_req_t\fR"
76 Structure containing options passed directly through to the \fBGSS-API.\fR
77 \fBrpc_gss_seccreate()\fR takes this as an argument when creating a context.
82 int req_flags; /*GSS request bits */
83 int time_req; /*requested credential lifetime */
84 gss_cred_id_t my_cred; /*GSS credential struct*/
85 gss_channel_bindings_t;
86 input_channel_bindings;
87 } rpc_gss_options_req_t ;
91 .SS "\fBrpc_gss_OID\fR"
94 This data type is used by in-kernel RPC routines, and thus is mentioned here
95 for informational purposes only.
106 .SS "\fBrpc_gss_options_ret_t\fR"
109 Structure containing \fBGSS-API\fR options returned to the calling function,
110 \fBrpc_gss_seccreate()\fR. \fBMAX_GSS_MECH\fR is defined as 128.
117 u_int rpcsec_version /*vers. of RPCSEC_GSS */
120 gss_ctx_id_t gss_context;
121 char actual_mechanism[MAX_GSS_MECH]; /*mechanism used*/
122 } rpc_gss_options_ret_t;
126 .SS "\fBrpc_gss_principal_t\fR"
129 The (mechanism-dependent, opaque) client principal type. Used as an argument
130 to the \fBrpc_gss_get_principal_name()\fR function, and in the \fBgsscred\fR
131 table. Also referenced by the \fBrpc_gss_rawcred_t\fR structure for raw
132 credentials (see below).
139 } *rpc_gss_principal_t;
143 .SS "\fBrpc_gss_rawcred_t\fR"
146 Structure for raw credentials. Used by \fBrpc_gss_getcred()\fR and
147 \fBrpc_gss_set_callback()\fR.
152 u_int version; /*RPC version # */
153 char *mechanism; /*security mechanism*/
154 char *qop; /*Quality of Protection*/
155 rpc_gss_principal_t client_principal; /*client name*/
156 char *svc_principal; /*server name*/
157 rpc_gss_service_t service; /*service (integrity, etc.)*/
162 .SS "\fBrpc_gss_ucred_t\fR"
165 Structure for UNIX credentials. Used by \fBrpc_gss_getcred()\fR as an
166 alternative to \fBrpc_gss_rawcred_t\fR.
171 uid_t uid; /*user ID*/
172 gid_t gid; /*group ID*/
174 git_t *gidlist; /*list of groups*/
179 .SS "\fBrpc_gss_callback_t\fR"
182 Callback structure used by \fBrpc_gss_set_callback()\fR.
187 u_int program; /*RPC program #*/
188 u_int version; /*RPC version #*/
189 bool_t (*callback)(); /*user-defined callback routine*/
190 } rpc_gss_callback_t;
194 .SS "\fBrpc_gss_lock_t\fR"
197 Structure used by a callback routine to enforce a particular QOP and service
198 for a session. The \fBlocked\fR field is normally set to \fBFALSE;\fR the
199 server sets it to \fBTRUE\fR in order to lock the session. (A locked context
200 will reject all requests having different QOP and service values than those
201 found in the \fBraw_cred\fR structure.) For more information, see the
202 \fBrpc_gss_set_callback\fR(3NSL) man page.
208 rpc_gss_rawcred_t *raw_cred;
213 .SS "\fBrpc_gss_error_t\fR"
216 Structure used by \fBrpc_gss_get_error()\fR to fetch an error code when a
217 \fBRPCSEC_GSS\fR routine fails.
223 int system_error; /*same as errno*/
228 .SS "Index to Routines"
231 The following lists \fBRPCSEC_GSS\fR routines and the manual reference pages
232 on which they are described. An (S) indicates it is a server-side function:
236 \fB\fBRoutine\fR (Manual Page) \fR
246 \fB\fBrpc_gss_seccreate\fR(3NSL) \fR
250 Create a secure \fBRPCSEC_GSS\fR context
256 \fB\fBrpc_gss_set_defaults\fR(3NSL) \fR
260 Switch service, QOP for a session
266 \fB\fBrpc_gss_max_data_length\fR(3NSL) \fR
270 Get maximum data length allowed by transport
276 \fB\fBrpc_gss_set_svc_name\fR(3NSL) \fR
280 Set server's principal name (S)
286 \fB\fBrpc_gss_getcred\fR(3NSL) \fR
290 Get credentials of caller (S)
296 \fB\fBrpc_gss_set_callback\fR(3NSL) \fR
300 Specify callback to see context use (S)
306 \fB\fBrpc_gss_get_principal_name\fR(3NSL) \fR
310 Get client principal name (S)
316 \fB\fBrpc_gss_svc_max_data_length\fR(3NSL) \fR
320 Get maximum data length allowed by transport (S)
326 \fB\fBrpc_gss_get_error\fR(3NSL) \fR
336 \fB\fBrpc_gss_get_mechanisms\fR(3NSL) \fR
340 Get valid mechanism strings
346 \fB\fBrpc_gss_get_mech_info\fR(3NSL) \fR
350 Get valid QOP strings, current service
356 \fB\fBrpc_gss_get_versions\fR(3NSL) \fR
360 Get supported \fBRPCSEC_GSS\fR versions
366 \fB\fBrpc_gss_is_installed\fR(3NSL) \fR
370 Checks if a mechanism is installed
376 \fB\fBrpc_gss_mech_to_oid\fR(3NSL) \fR
380 Maps ASCII mechanism to OID representation
386 \fB\fBrpc_gss_qop_to_num\fR(3NSL) \fR
390 Maps ASCII QOP, mechansim to u_int number
396 The \fBgsscred\fR utility manages the \fBgsscred\fR table, which contains
397 mappings of principal names between network and local credentials. See
403 \fB\fB/etc/gss/mech\fR \fR
406 List of installed mechanisms
412 \fB\fB/etc/gss/qop\fR \fR
421 See \fBattributes\fR(5) for descriptions of the following attributes:
429 ATTRIBUTE TYPE ATTRIBUTE VALUE
437 \fBgsscred\fR(1M), \fBrpc\fR(3NSL), \fBrpc_clnt_auth\fR(3NSL), \fBxdr\fR(3NSL), \fBattributes\fR(5), \fBenviron\fR(5)
440 \fIONC+ Developer\&'s Guide\fR