Debian Codegraph @

extra/tirpc/libtirpc-1.3.5/man/rpcsec_gss.3t

raw
1 .\" Copyright (c) 2008 Isilon Inc http://www.isilon.com/
2 .\" Authors: Doug Rabson <[email protected]>
3 .\" Developed with Red Inc: Alfred Perlstein <[email protected]>
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .Dd January 26, 2010
28 .Dt RPC_GSS_SECCREATE 3
29 .Os
30 .Sh NAME
31 .Nm RPCSEC_GSS
32 .Nd "GSS-API based authentication for RPC"
33 .Sh SYNOPSIS
34 .In rpc/rpcsec_gss.h
35 .Sh DESCRIPTION
36 .Nm
37 is a security mechanism for the RPC protocol.
38 It uses the Generic Security Service API (GSS-API) to establish a
39 security context between a client and a server and to ensure that all
40 subsequent communication between client and server are properly
41 authenticated.
42 Optionally, extra protection can be applied to the connection.
43 The integrity service uses checksums to ensure that all data sent by
44 a peer is received without modification.
45 The privacy service uses encryption to ensure that no third party can
46 access the data for a connection.
47 .Pp
48 To use this system, an application must first use
49 .Fn rpc_gss_seccreate
50 to establish a security context.
51 .Sh DATA STRUCTURES
52 Data structures used by
53 .Nm
54 appear below.
55 .Bl -tag -width "MMMM"
56 .It Vt rpc_gss_service_t
57 This type defines the types of security service required for
58 .Fn rpc_gss_seccreate .
59 .Bd -literal
60 typedef enum {
61 rpc_gss_svc_default = 0,
62 rpc_gss_svc_none = 1,
63 rpc_gss_svc_integrity = 2,
64 rpc_gss_svc_privacy = 3
65 } rpc_gss_service_t;
66 .Ed
67 .It Vt rpc_gss_options_ret_t
68 This structure contains various optional values which are used while
69 creating a security context.
70 .Bd -literal
71 typedef struct {
72 int req_flags; /* GSS request bits */
73 int time_req; /* requested lifetime */
74 gss_cred_id_t my_cred; /* GSS credential */
75 gss_channel_bindings_t input_channel_bindings;
76 } rpc_gss_options_req_t;
77 .Ed
78 .It Vt rpc_gss_options_ret_t
79 Various details of the created security context are returned using
80 this structure.
81 .Bd -literal
82 typedef struct {
83 int major_status;
84 int minor_status;
85 u_int rpcsec_version;
86 int ret_flags;
87 int time_req;
88 gss_ctx_id_t gss_context;
89 char actual_mechanism[MAX_GSS_MECH];
90 } rpc_gss_options_ret_t;
91 .Ed
92 .It Vt rpc_gss_principal_t
93 This type is used to refer to an client principal which is represented
94 in GSS-API exported name form
95 (see
96 .Xr gss_export_name 3
97 for more details).
98 Names in this format may be stored in access control lists or compared
99 with other names in exported name form.
100 This structure is returned by
101 .Fn rpc_gss_get_principal_name
102 and is also referenced by the
103 .Vt rpc_gss_rawcred_t
104 structure.
105 .Bd -literal
106 typedef struct {
107 int len;
108 char name[1];
109 } *rpc_gss_principal_t;
110 .Ed
111 .It Vt rpc_gss_rawcred_t
112 This structure is used to access the raw credentials associated with a
113 security context.
114 .Bd -literal
115 typedef struct {
116 u_int version; /* RPC version number */
117 const char *mechanism; /* security mechanism */
118 const char *qop; /* quality of protection */
119 rpc_gss_principal_t client_principal; /* client name */
120 const char *svc_principal; /* server name */
121 rpc_gss_service_t service; /* service type */
122 } rpc_gss_rawcred_t;
123 .Ed
124 .It Vt rpc_gss_ucred_t
125 Unix credentials which are derived form the raw credentials,
126 accessed via
127 .Fn rpc_gss_getcred .
128 .Bd -literal
129 typedef struct {
130 uid_t uid; /* user ID */
131 gid_t gid; /* group ID */
132 short gidlen;
133 gid_t *gidlist; /* list of groups */
134 } rpc_gss_ucred_t;
135 .Ed
136 .It Vt rpc_gss_lock_t
137 Structure used to enforce a particular QOP and service.
138 .Bd -literal
139 typedef struct {
140 bool_t locked;
141 rpc_gss_rawcred_t *raw_cred;
142 } rpc_gss_lock_t;
143 .Ed
144 .It Vt rpc_gss_callback_t
145 Callback structure used by
146 .Fn rpc_gss_set_callback .
147 .Bd -literal
148 typedef struct {
149 u_int program; /* RPC program number */
150 u_int version; /* RPC version number */
151 /* user defined callback */
152 bool_t (*callback)(struct svc_req *req,
153 gss_cred_id_t deleg,
154 gss_ctx_id_t gss_context,
155 rpc_gss_lock_t *lock,
156 void **cookie);
157 } rpc_gss_callback_t;
158 .Ed
159 .It Vt rpc_gss_error_t
160 Structure used to return error information by
161 .Fn rpc_gss_get_error .
162 .Bd -literal
163 typedef struct {
164 int rpc_gss_error;
165 int system_error; /* same as errno */
166 } rpc_gss_error_t;
167
168 /*
169 * Values for rpc_gss_error
170 */
171 #define RPC_GSS_ER_SUCCESS 0 /* no error */
172 #define RPC_GSS_ER_SYSTEMERROR 1 /* system error */
173 .Ed
174 .El
175 .Sh INDEX
176 .Bl -tag -width "MMMM"
177 .It Xr rpc_gss_seccreate 3
178 Create a new security context
179 .It Xr rpc_gss_set_defaults 3
180 Set service and quality of protection for a context
181 .It Xr rpc_gss_max_data_length 3
182 Calculate maximum client message sizes.
183 .It Xr rpc_gss_get_error 3
184 Get details of the last error
185 .It Xr rpc_gss_mech_to_oid 3
186 Convert a mechanism name to the corresponding GSS-API oid.
187 .It Xr rpc_gss_oid_to_mech 3
188 Convert a GSS-API oid to a mechanism name
189 .It Xr rpc_gss_qop_to_num 3
190 Convert a quality of protection name to the corresponding number
191 .It Xr rpc_gss_get_mechanisms 3
192 Get a list of security mechanisms.
193 .It Xr rpc_gss_get_mech_info 3
194 Return extra information about a security mechanism
195 .It Xr rpc_gss_get_versions 3
196 Return the maximum and minimum supported versions of the
197 .Nm
198 protocol
199 .It Xr rpc_gss_is_installed 3
200 Query for the presence of a particular security mechanism
201 .It Xr rpc_gss_set_svc_name 3
202 Set the name of a service principal which matches a given RPC program
203 plus version pair
204 .It Xr rpc_gss_getcred 3
205 Get credential details for the security context of an RPC request
206 .It Xr rpc_gss_set_callback 3
207 Install a callback routine which is called on the server when new
208 security contexts are created
209 .It Xr rpc_gss_get_principal_name 3
210 Create a client principal name from various strings
211 .It Xr rpc_gss_svc_max_data_length 3
212 Calculate maximum server message sizes.
213 .El
214 .Sh AVAILABILITY
215 These functions are part of libtirpc.
216 .Sh SEE ALSO
217 .Xr rpc 3 ,
218 .Xr gssapi 3
219 .Sh AUTHORS
220 This
221 manual page was written by
222 .An Doug Rabson Aq [email protected] .