idnits 2.17.1 draft-ietf-cat-rfc2078bis-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-26) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 95 longer pages, the longest (page 60) being 64 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 96 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The abstract seems to contain references ([APPLICATION0], [RFC-2203], [ISO-7498-2], [RFC-1507], [ISOIEC-8824], [RFC-1964], [RFC-1508], [ISOIEC-8825], [RFC-1509], [RFC-2025], [RFC-2078]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 1250 has weird spacing: '...t_token pro...' == Line 1288 has weird spacing: '...or_mech indi...' == Line 1290 has weird spacing: '...or_name indi...' == Line 3853 has weird spacing: '... ... zz expor...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (19 February 1998) is 9563 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? 'RFC-2078' on line 4196 looks like a reference -- Missing reference section? 'ISO-7498-2' on line 4172 looks like a reference -- Missing reference section? 'RFC-1964' on line 4190 looks like a reference -- Missing reference section? 'RFC-2025' on line 4193 looks like a reference -- Missing reference section? 'RFC-2203' on line 4199 looks like a reference -- Missing reference section? 'ISOIEC-8825' on line 4178 looks like a reference -- Missing reference section? 'ISOIEC-8824' on line 4175 looks like a reference -- Missing reference section? 'RFC-1507' on line 4181 looks like a reference -- Missing reference section? 'APPLICATION 0' on line 3777 looks like a reference -- Missing reference section? 'RFC-1509' on line 4187 looks like a reference -- Missing reference section? 'RFC-1508' on line 4222 looks like a reference Summary: 11 errors (**), 0 flaws (~~), 7 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet-Draft J. Linn 3 IETF Common Authentication Technology WG RSA Laboratories 4 19 February 1998 6 Generic Security Service Application Program Interface 7 Version 2, Update 1 9 STATUS OF THIS MEMO 11 This document is an Internet-Draft. Internet-Drafts are working 12 documents of the Internet Engineering Task Force (IETF), its areas, 13 and its working groups. Note that other groups may also distribute 14 working documents as Internet-Drafts. 16 Internet-Drafts are draft documents valid for a maximum of six months 17 and may be updated, replaced, or obsoleted by other documents at any 18 time. It is inappropriate to use Internet- Drafts as reference 19 material or to cite them other than as ``work in progress.'' 21 To learn the current status of any Internet-Draft, please check the 22 ``1id-abstracts.txt'' listing contained in the Internet- Drafts 23 Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net 24 (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific 25 Rim). 27 Comments on this document should be sent to "cat-ietf@mit.edu", the 28 IETF Common Authentication Technology WG discussion list. 30 ABSTRACT 32 The Generic Security Service Application Program Interface (GSS-API), 33 Version 2, as defined in [RFC-2078], provides security services to 34 callers in a generic fashion, supportable with a range of underlying 35 mechanisms and technologies and hence allowing source-level 36 portability of applications to different environments. This 37 specification defines GSS-API services and primitives at a level 38 independent of underlying mechanism and programming language 39 environment, and is to be complemented by other, related 40 specifications: 42 documents defining specific parameter bindings for particular 43 language environments 45 documents defining token formats, protocols, and procedures to be 46 implemented in order to realize GSS-API services atop particular 47 security mechanisms 49 This Internet-Draft revises [RFC-2078], making specific, incremental 50 changes in response to implementation experience and liaison 51 requests. It is intended, therefore, that this draft or a successor 52 version thereto will become the basis for subsequent progression of 53 the GSS-API specification on the standards track. 55 1: GSS-API Characteristics and Concepts 57 GSS-API operates in the following paradigm. A typical GSS-API caller 58 is itself a communications protocol, calling on GSS-API in order to 59 protect its communications with authentication, integrity, and/or 60 confidentiality security services. A GSS-API caller accepts tokens 61 provided to it by its local GSS-API implementation and transfers the 62 tokens to a peer on a remote system; that peer passes the received 63 tokens to its local GSS-API implementation for processing. The 64 security services available through GSS-API in this fashion are 65 implementable (and have been implemented) over a range of underlying 66 mechanisms based on secret-key and public-key cryptographic 67 technologies. 69 The GSS-API separates the operations of initializing a security 70 context between peers, achieving peer entity authentication 71 (GSS_Init_sec_context() and GSS_Accept_sec_context() calls), from the 72 operations of providing per-message data origin authentication and 73 data integrity protection (GSS_GetMIC() and GSS_VerifyMIC() calls) 74 for messages subsequently transferred in conjunction with that 75 context. (The definition for the peer entity authentication service, 76 and other definitions used in this document, corresponds to that 77 provided in [ISO-7498-2].) When establishing a security context, the 78 GSS-API enables a context initiator to optionally permit its 79 credentials to be delegated, meaning that the context acceptor may 80 initiate further security contexts on behalf of the initiating 81 caller. Per-message GSS_Wrap() and GSS_Unwrap() calls provide the 82 data origin authentication and data integrity services which 83 GSS_GetMIC() and GSS_VerifyMIC() offer, and also support selection of 84 confidentiality services as a caller option. Additional calls provide 85 supportive functions to the GSS-API's users. 87 The following paragraphs provide an example illustrating the 88 dataflows involved in use of the GSS-API by a client and server in a 89 mechanism-independent fashion, establishing a security context and 90 transferring a protected message. The example assumes that credential 91 acquisition has already been completed. The example also assumes 92 that the underlying authentication technology is capable of 93 authenticating a client to a server using elements carried within a 94 single token, and of authenticating the server to the client (mutual 95 authentication) with a single returned token; this assumption holds 96 for some presently-documented CAT mechanisms but is not necessarily 97 true for other cryptographic technologies and associated protocols. 99 The client calls GSS_Init_sec_context() to establish a security 100 context to the server identified by targ_name, and elects to set the 101 mutual_req_flag so that mutual authentication is performed in the 102 course of context establishment. GSS_Init_sec_context() returns an 103 output_token to be passed to the server, and indicates 104 GSS_S_CONTINUE_NEEDED status pending completion of the mutual 105 authentication sequence. Had mutual_req_flag not been set, the 106 initial call to GSS_Init_sec_context() would have returned 107 GSS_S_COMPLETE status. The client sends the output_token to the 108 server. 110 The server passes the received token as the input_token parameter to 111 GSS_Accept_sec_context(). GSS_Accept_sec_context indicates 112 GSS_S_COMPLETE status, provides the client's authenticated identity 113 in the src_name result, and provides an output_token to be passed to 114 the client. The server sends the output_token to the client. 116 The client passes the received token as the input_token parameter to 117 a successor call to GSS_Init_sec_context(), which processes data 118 included in the token in order to achieve mutual authentication from 119 the client's viewpoint. This call to GSS_Init_sec_context() returns 120 GSS_S_COMPLETE status, indicating successful mutual authentication 121 and the completion of context establishment for this example. 123 The client generates a data message and passes it to GSS_Wrap(). 124 GSS_Wrap() performs data origin authentication, data integrity, and 125 (optionally) confidentiality processing on the message and 126 encapsulates the result into output_message, indicating 127 GSS_S_COMPLETE status. The client sends the output_message to the 128 server. 130 The server passes the received message to GSS_Unwrap(). GSS_Unwrap() 131 inverts the encapsulation performed by GSS_Wrap(), deciphers the 132 message if the optional confidentiality feature was applied, and 133 validates the data origin authentication and data integrity checking 134 quantities. GSS_Unwrap() indicates successful validation by returning 135 GSS_S_COMPLETE status along with the resultant output_message. 137 For purposes of this example, we assume that the server knows by 138 out-of-band means that this context will have no further use after 139 one protected message is transferred from client to server. Given 140 this premise, the server now calls GSS_Delete_sec_context() to flush 141 context-level information. Optionally, the server-side application 142 may provide a token buffer to GSS_Delete_sec_context(), to receive a 143 context_token to be transferred to the client in order to request 144 that client-side context-level information be deleted. 146 If a context_token is transferred, the client passes the 147 context_token to GSS_Process_context_token(), which returns 148 GSS_S_COMPLETE status after deleting context-level information at the 149 client system. 151 The GSS-API design assumes and addresses several basic goals, 152 including: 154 Mechanism independence: The GSS-API defines an interface to 155 cryptographically implemented strong authentication and other 156 security services at a generic level which is independent of 157 particular underlying mechanisms. For example, GSS-API-provided 158 services have been implemented using secret-key technologies 159 (e.g., Kerberos, per [RFC-1964]) and with public-key approaches 160 (e.g., SPKM, per [RFC-2025]). 162 Protocol environment independence: The GSS-API is independent of 163 the communications protocol suites with which it is employed, 164 permitting use in a broad range of protocol environments. In 165 appropriate environments, an intermediate implementation "veneer" 166 which is oriented to a particular communication protocol may be 167 interposed between applications which call that protocol and the 168 GSS-API (e.g., as defined in [RFC-2203] for Open Network Computing 169 Remote Procedure Call (RPC)), thereby invoking GSS-API facilities 170 in conjunction with that protocol's communications invocations. 172 Protocol association independence: The GSS-API's security context 173 construct is independent of communications protocol association 174 constructs. This characteristic allows a single GSS-API 175 implementation to be utilized by a variety of invoking protocol 176 modules on behalf of those modules' calling applications. GSS-API 177 services can also be invoked directly by applications, wholly 178 independent of protocol associations. 180 Suitability to a range of implementation placements: GSS-API 181 clients are not constrained to reside within any Trusted Computing 182 Base (TCB) perimeter defined on a system where the GSS-API is 183 implemented; security services are specified in a manner suitable 184 to both intra-TCB and extra-TCB callers. 186 1.1: GSS-API Constructs 188 This section describes the basic elements comprising the GSS-API. 190 1.1.1: Credentials 192 1.1.1.1: Credential Constructs and Concepts 194 Credentials provide the prerequisites which permit GSS-API peers to 195 establish security contexts with each other. A caller may designate 196 that the credential elements which are to be applied for context 197 initiation or acceptance be selected by default. Alternately, those 198 GSS-API callers which need to make explicit selection of particular 199 credentials structures may make references to those credentials 200 through GSS-API-provided credential handles ("cred_handles"). In all 201 cases, callers' credential references are indirect, mediated by GSS- 202 API implementations and not requiring callers to access the selected 203 credential elements. 205 A single credential structure may be used to initiate outbound 206 contexts and to accept inbound contexts. Callers needing to operate 207 in only one of these modes may designate this fact when credentials 208 are acquired for use, allowing underlying mechanisms to optimize 209 their processing and storage requirements. The credential elements 210 defined by a particular mechanism may contain multiple cryptographic 211 keys, e.g., to enable authentication and message encryption to be 212 performed with different algorithms. 214 A GSS-API credential structure may contain multiple credential 215 elements, each containing mechanism-specific information for a 216 particular underlying mechanism (mech_type), but the set of elements 217 within a given credential structure represent a common entity. A 218 credential structure's contents will vary depending on the set of 219 mech_types supported by a particular GSS-API implementation. Each 220 credential element identifies the data needed by its mechanism in 221 order to establish contexts on behalf of a particular principal, and 222 may contain separate credential references for use in context 223 initiation and context acceptance. Multiple credential elements 224 within a given credential having overlapping combinations of 225 mechanism, usage mode, and validity period are not permitted. 227 Commonly, a single mech_type will be used for all security contexts 228 established by a particular initiator to a particular target. A major 229 motivation for supporting credential sets representing multiple 230 mech_types is to allow initiators on systems which are equipped to 231 handle multiple types to initiate contexts to targets on other 232 systems which can accommodate only a subset of the set supported at 233 the initiator's system. 235 1.1.1.2: Credential Management 237 It is the responsibility of underlying system-specific mechanisms and 238 OS functions below the GSS-API to ensure that the ability to acquire 239 and use credentials associated with a given identity is constrained 240 to appropriate processes within a system. This responsibility should 241 be taken seriously by implementors, as the ability for an entity to 242 utilize a principal's credentials is equivalent to the entity's 243 ability to successfully assert that principal's identity. 245 Once a set of GSS-API credentials is established, the transferability 246 of that credentials set to other processes or analogous constructs 247 within a system is a local matter, not defined by the GSS-API. An 248 example local policy would be one in which any credentials received 249 as a result of login to a given user account, or of delegation of 250 rights to that account, are accessible by, or transferable to, 251 processes running under that account. 253 The credential establishment process (particularly when performed on 254 behalf of users rather than server processes) is likely to require 255 access to passwords or other quantities which should be protected 256 locally and exposed for the shortest time possible. As a result, it 257 will often be appropriate for preliminary credential establishment to 258 be performed through local means at user login time, with the 259 result(s) cached for subsequent reference. These preliminary 260 credentials would be set aside (in a system-specific fashion) for 261 subsequent use, either: 263 to be accessed by an invocation of the GSS-API GSS_Acquire_cred() 264 call, returning an explicit handle to reference that credential 266 to comprise default credential elements to be installed, and to be 267 used when default credential behavior is requested on behalf of a 268 process 270 1.1.1.3: Default Credential Resolution 272 The GSS_Init_sec_context() and GSS_Accept_sec_context() routines 273 allow the value GSS_C_NO_CREDENTIAL to be specified as their 274 credential handle parameter. This special credential-handle 275 indicates a desire by the application to act as a default principal. 276 In support of application portability, support for the default 277 resolution behavior described below for initiator credentials 278 (GSS_Init_sec_context() usage) is mandated; support for the default 279 resolution behavior described below for acceptor credentials 280 (GSS_Accept_sec_context() usage) is recommended. If default 281 credential resolution fails, GSS_S_NO_CRED status is to be returned. 283 GSS_Init_sec_context: 285 (i) If there is only a single principal capable of initiating 286 security contexts that the application is authorized to act on 287 behalf of, then that principal shall be used, otherwise 289 (ii) If the platform maintains a concept of a default network- 290 identity, and if the application is authorized to act on behalf 291 of that identity for the purpose of initiating security 292 contexts, then the principal corresponding to that identity 293 shall be used, otherwise 295 (iii) If the platform maintains a concept of a default local 296 identity, and provides a means to map local identities into 297 network-identities, and if the application is authorized to act 298 on behalf of the network-identity image of the default local 299 identity for the purpose of initiating security contexts, then 300 the principal corresponding to that identity shall be used, 301 otherwise 303 (iv) A user-configurable default identity should be used. 305 GSS_Accept_sec_context: 307 (i) If there is only a single authorized principal identity 308 capable of accepting security contexts, then that principal 309 shall be used, otherwise 311 (ii) If the mechanism can determine the identity of the target 312 principal by examining the context-establishment token, and if 313 the accepting application is authorized to act as that 314 principal for the purpose of accepting security contexts, then 315 that principal identity shall be used, otherwise 317 (iii) If the mechanism supports context acceptance by any 318 principal, and mutual authentication was not requested, any 319 principal that the application is authorized to accept security 320 contexts under may be used, otherwise 322 (iv) A user-configurable default identity shall be used. 324 The purpose of the above rules is to allow security contexts to be 325 established by both initiator and acceptor using the default behavior 326 wherever possible. Applications requesting default behavior are 327 likely to be more portable across mechanisms and platforms than those 328 that use GSS_Acquire_cred() to request a specific identity. 330 1.1.2: Tokens 332 Tokens are data elements transferred between GSS-API callers, and are 333 divided into two classes. Context-level tokens are exchanged in order 334 to establish and manage a security context between peers. Per-message 335 tokens relate to an established context and are exchanged to provide 336 protective security services (i.e., data origin authentication, 337 integrity, and optional confidentiality) for corresponding data 338 messages. 340 The first context-level token obtained from GSS_Init_sec_context() is 341 required to indicate at its very beginning a globally-interpretable 342 mechanism identifier, i.e., an Object Identifier (OID) of the 343 security mechanism. The remaining part of this token as well as the 344 whole content of all other tokens are specific to the particular 345 underlying mechanism used to support the GSS-API. Section 3.1 of this 346 document provides, for designers of GSS-API mechanisms, the 347 description of the header of the first context-level token which is 348 then followed by mechanism-specific information. 350 Tokens' contents are opaque from the viewpoint of GSS-API callers. 351 They are generated within the GSS-API implementation at an end 352 system, provided to a GSS-API caller to be transferred to the peer 353 GSS-API caller at a remote end system, and processed by the GSS-API 354 implementation at that remote end system. Tokens may be output by 355 GSS-API calls (and should be transferred to GSS-API peers) whether or 356 not the calls' status indicators indicate successful completion. 357 Zero-length tokens are never returned by GSS routines for transfer to 358 a peer. Token transfer may take place in an in-band manner, 359 integrated into the same protocol stream used by the GSS-API callers 360 for other data transfers, or in an out-of-band manner across a 361 logically separate channel. 363 Different GSS-API tokens are used for different purposes (e.g., 364 context initiation, context acceptance, protected message data on an 365 established context), and it is the responsibility of a GSS-API 366 caller receiving tokens to distinguish their types, associate them 367 with corresponding security contexts, and pass them to appropriate 368 GSS-API processing routines. Depending on the caller protocol 369 environment, this distinction may be accomplished in several ways. 371 The following examples illustrate means through which tokens' types 372 may be distinguished: 374 - implicit tagging based on state information (e.g., all tokens on 375 a new association are considered to be context establishment 376 tokens until context establishment is completed, at which point 377 all tokens are considered to be wrapped data objects for that 378 context), 380 - explicit tagging at the caller protocol level, 382 - a hybrid of these approaches. 384 Commonly, the encapsulated data within a token includes internal 385 mechanism-specific tagging information, enabling mechanism-level 386 processing modules to distinguish tokens used within the mechanism 387 for different purposes. Such internal mechanism-level tagging is 388 recommended to mechanism designers, and enables mechanisms to 389 determine whether a caller has passed a particular token for 390 processing by an inappropriate GSS-API routine. 392 Development of GSS-API mechanisms based on a particular underlying 393 cryptographic technique and protocol (i.e., conformant to a specific 394 GSS-API mechanism definition) does not necessarily imply that GSS-API 395 callers using that GSS-API mechanism will be able to interoperate 396 with peers invoking the same technique and protocol outside the GSS- 397 API paradigm, or with peers implementing a different GSS-API 398 mechanism based on the same underlying technology. The format of 399 GSS-API tokens defined in conjunction with a particular mechanism, 400 and the techniques used to integrate those tokens into callers' 401 protocols, may not be interoperable with the tokens used by non-GSS- 402 API callers of the same underlying technique. 404 1.1.3: Security Contexts 406 Security contexts are established between peers, using credentials 407 established locally in conjunction with each peer or received by 408 peers via delegation. Multiple contexts may exist simultaneously 409 between a pair of peers, using the same or different sets of 410 credentials. Coexistence of multiple contexts using different 411 credentials allows graceful rollover when credentials expire. 412 Distinction among multiple contexts based on the same credentials 413 serves applications by distinguishing different message streams in a 414 security sense. 416 The GSS-API is independent of underlying protocols and addressing 417 structure, and depends on its callers to transport GSS-API-provided 418 data elements. As a result of these factors, it is a caller 419 responsibility to parse communicated messages, separating GSS-API- 420 related data elements from caller-provided data. The GSS-API is 421 independent of connection vs. connectionless orientation of the 422 underlying communications service. 424 No correlation between security context and communications protocol 425 association is dictated. (The optional channel binding facility, 426 discussed in Section 1.1.6 of this document, represents an 427 intentional exception to this rule, supporting additional protection 428 features within GSS-API supporting mechanisms.) This separation 429 allows the GSS-API to be used in a wide range of communications 430 environments, and also simplifies the calling sequences of the 431 individual calls. In many cases (depending on underlying security 432 protocol, associated mechanism, and availability of cached 433 information), the state information required for context setup can be 434 sent concurrently with initial signed user data, without interposing 435 additional message exchanges. 437 GSS-API implementations are expected to retain inquirable context 438 data on a context until the context is released by a caller, even 439 after the context has expired, although underlying cryptographic data 440 elements may be deleted after expiration in order to limit their 441 exposure. 443 1.1.4: Mechanism Types 445 In order to successfully establish a security context with a target 446 peer, it is necessary to identify an appropriate underlying mechanism 447 type (mech_type) which both initiator and target peers support. The 448 definition of a mechanism embodies not only the use of a particular 449 cryptographic technology (or a hybrid or choice among alternative 450 cryptographic technologies), but also definition of the syntax and 451 semantics of data element exchanges which that mechanism will employ 452 in order to support security services. 454 It is recommended that callers initiating contexts specify the 455 "default" mech_type value, allowing system-specific functions within 456 or invoked by the GSS-API implementation to select the appropriate 457 mech_type, but callers may direct that a particular mech_type be 458 employed when necessary. 460 For GSS-API purposes, the phrase "negotiating mechanism" refers to a 461 mechanism which itself performs negotiation in order to select a 462 concrete mechanism which is shared between peers and is then used for 463 context establishment. Only those mechanisms which are defined in 464 their specifications as negotiating mechanisms are to yield selected 465 mechanisms with different identifier values than the value which is 466 input by a GSS-API caller, except for the case of a caller requesting 467 the "default" mech_type. 469 The means for identifying a shared mech_type to establish a security 470 context with a peer will vary in different environments and 471 circumstances; examples include (but are not limited to): 473 use of a fixed mech_type, defined by configuration, within an 474 environment 476 syntactic convention on a target-specific basis, through 477 examination of a target's name 479 lookup of a target's name in a naming service or other database in 480 order to identify mech_types supported by that target 482 explicit negotiation between GSS-API callers in advance of 483 security context setup 484 use of a negotiating mechanism 486 When transferred between GSS-API peers, mech_type specifiers (per 487 Section 3 of this document, represented as Object Identifiers (OIDs)) 488 serve to qualify the interpretation of associated tokens. (The 489 structure and encoding of Object Identifiers is defined in [ISOIEC- 490 8824] and [ISOIEC-8825].) Use of hierarchically structured OIDs 491 serves to preclude ambiguous interpretation of mech_type specifiers. 492 The OID representing the DASS ([RFC-1507]) MechType, for example, is 493 1.3.12.2.1011.7.5, and that of the Kerberos V5 mechanism ([RFC- 494 1964]), having been advanced to the level of Proposed Standard, is 495 1.2.840.113554.1.2.2. 497 1.1.5: Naming 499 The GSS-API avoids prescribing naming structures, treating the names 500 which are transferred across the interface in order to initiate and 501 accept security contexts as opaque objects. This approach supports 502 the GSS-API's goal of implementability atop a range of underlying 503 security mechanisms, recognizing the fact that different mechanisms 504 process and authenticate names which are presented in different 505 forms. Generalized services offering translation functions among 506 arbitrary sets of naming environments are outside the scope of the 507 GSS-API; availability and use of local conversion functions to 508 translate among the naming formats supported within a given end 509 system is anticipated. 511 Different classes of name representations are used in conjunction 512 with different GSS-API parameters: 514 - Internal form (denoted in this document by INTERNAL NAME), 515 opaque to callers and defined by individual GSS-API 516 implementations. GSS-API implementations supporting multiple 517 namespace types must maintain internal tags to disambiguate the 518 interpretation of particular names. A Mechanism Name (MN) is a 519 special case of INTERNAL NAME, guaranteed to contain elements 520 corresponding to one and only one mechanism; calls which are 521 guaranteed to emit MNs or which require MNs as input are so 522 identified within this specification. 524 - Contiguous string ("flat") form (denoted in this document by 525 OCTET STRING); accompanied by OID tags identifying the namespace 526 to which they correspond. Depending on tag value, flat names may 527 or may not be printable strings for direct acceptance from and 528 presentation to users. Tagging of flat names allows GSS-API 529 callers and underlying GSS-API mechanisms to disambiguate name 530 types and to determine whether an associated name's type is one 531 which they are capable of processing, avoiding aliasing problems 532 which could result from misinterpreting a name of one type as a 533 name of another type. 535 - The GSS-API Exported Name Object, a special case of flat name 536 designated by a reserved OID value, carries a canonicalized form 537 of a name suitable for binary comparisons. 539 In addition to providing means for names to be tagged with types, 540 this specification defines primitives to support a level of naming 541 environment independence for certain calling applications. To provide 542 basic services oriented towards the requirements of callers which 543 need not themselves interpret the internal syntax and semantics of 544 names, GSS-API calls for name comparison (GSS_Compare_name()), 545 human-readable display (GSS_Display_name()), input conversion 546 (GSS_Import_name()), internal name deallocation (GSS_Release_name()), 547 and internal name duplication (GSS_Duplicate_name()) functions are 548 defined. (It is anticipated that these proposed GSS-API calls will be 549 implemented in many end systems based on system-specific name 550 manipulation primitives already extant within those end systems; 551 inclusion within the GSS-API is intended to offer GSS-API callers a 552 portable means to perform specific operations, supportive of 553 authorization and audit requirements, on authenticated names.) 555 GSS_Import_name() implementations can, where appropriate, support 556 more than one printable syntax corresponding to a given namespace 557 (e.g., alternative printable representations for X.500 Distinguished 558 Names), allowing flexibility for their callers to select among 559 alternative representations. GSS_Display_name() implementations 560 output a printable syntax selected as appropriate to their 561 operational environments; this selection is a local matter. Callers 562 desiring portability across alternative printable syntaxes should 563 refrain from implementing comparisons based on printable name forms 564 and should instead use the GSS_Compare_name() call to determine 565 whether or not one internal-format name matches another. 567 When used in large access control lists, the overhead of invoking 568 GSS_Import_name() and GSS_Compare_name() on each name from the ACL 569 may be prohibitive. As an alternative way of supporting this case, 570 GSS-API defines a special form of the contiguous string name which 571 may be compared directly (e.g., with memcmp()). Contiguous names 572 suitable for comparison are generated by the GSS_Export_name() 573 routine, which requires an MN as input. Exported names may be re- 574 imported by the GSS_Import_name() routine, and the resulting internal 575 name will also be an MN. The symbolic constant GSS_C_NT_EXPORT_NAME 576 identifies the "export name" type. Structurally, an exported name 577 object consists of a header containing an OID identifying the 578 mechanism that authenticated the name, and a trailer containing the 579 name itself, where the syntax of the trailer is defined by the 580 individual mechanism specification. The precise format of an 581 exported name is defined in Section 3.2 of this specification. 583 Note that the results obtained by using GSS_Compare_name() will in 584 general be different from those obtained by invoking 585 GSS_Canonicalize_name() and GSS_Export_name(), and then comparing the 586 exported names. The first series of operation determines whether two 587 (unauthenticated) names identify the same principal; the second 588 whether a particular mechanism would authenticate them as the same 589 principal. These two operations will in general give the same 590 results only for MNs. 592 The following diagram illustrates the intended dataflow among name- 593 related GSS-API processing routines. 595 GSS-API library defaults 596 | 597 | 598 V text, for 599 text --------------> internal_name (IN) -----------> display only 600 import_name() / display_name() 601 / 602 / 603 / 604 accept_sec_context() / 605 | / 606 | / 607 | / canonicalize_name() 608 | / 609 | / 610 | / 611 | / 612 | / 613 | | 614 V V <--------------------- 615 single mechanism import_name() exported name: flat 616 internal_name (MN) binary "blob" usable 617 ----------------------> for access control 618 export_name() 620 1.1.6: Channel Bindings 622 The GSS-API accommodates the concept of caller-provided channel 623 binding ("chan_binding") information. Channel bindings are used to 624 strengthen the quality with which peer entity authentication is 625 provided during context establishment, by limiting the scope within 626 which an intercepted context establishment token can be reused by an 627 attacker. Specifically, they enable GSS-API callers to bind the 628 establishment of a security context to relevant characteristics 629 (e.g., addresses, transformed representations of encryption keys) of 630 the underlying communications channel, of protection mechanisms 631 applied to that communications channel, and to application-specific 632 data. 634 The caller initiating a security context must determine the 635 appropriate channel binding values to provide as input to the 636 GSS_Init_sec_context() call, and consistent values must be provided 637 to GSS_Accept_sec_context() by the context's target, in order for 638 both peers' GSS-API mechanisms to validate that received tokens 639 possess correct channel-related characteristics. Use or non-use of 640 the GSS-API channel binding facility is a caller option. GSS-API 641 mechanisms can operate in an environment where NULL channel bindings 642 are presented; mechanism implementors are encouraged, but not 643 required, to make use of caller-provided channel binding data within 644 their mechanisms. Callers should not assume that underlying 645 mechanisms provide confidentiality protection for channel binding 646 information. 648 When non-NULL channel bindings are provided by callers, certain 649 mechanisms can offer enhanced security value by interpreting the 650 bindings' content (rather than simply representing those bindings, or 651 integrity check values computed on them, within tokens) and will 652 therefore depend on presentation of specific data in a defined 653 format. To this end, agreements among mechanism implementors are 654 defining conventional interpretations for the contents of channel 655 binding arguments, including address specifiers (with content 656 dependent on communications protocol environment) for context 657 initiators and acceptors. (These conventions are being incorporated 658 in GSS-API mechanism specifications and into the GSS-API C language 659 bindings specification.) In order for GSS-API callers to be portable 660 across multiple mechanisms and achieve the full security 661 functionality which each mechanism can provide, it is strongly 662 recommended that GSS-API callers provide channel bindings consistent 663 with these conventions and those of the networking environment in 664 which they operate. 666 1.2: GSS-API Features and Issues 668 This section describes aspects of GSS-API operations, of the security 669 services which the GSS-API provides, and provides commentary on 670 design issues. 672 1.2.1: Status Reporting and Optional Service Support 674 1.2.1.1: Status Reporting 676 Each GSS-API call provides two status return values. Major_status 677 values provide a mechanism-independent indication of call status 678 (e.g., GSS_S_COMPLETE, GSS_S_FAILURE, GSS_S_CONTINUE_NEEDED), 679 sufficient to drive normal control flow within the caller in a 680 generic fashion. Table 1 summarizes the defined major_status return 681 codes in tabular fashion. 683 Sequencing-related informatory major_status codes 684 (GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, and 685 GSS_S_GAP_TOKEN) can be indicated in conjunction with either 686 GSS_S_COMPLETE or GSS_S_FAILURE status for GSS-API per-message calls. 687 For context establishment calls, these sequencing-related codes will 688 be indicated only in conjunction with GSS_S_FAILURE status (never in 689 conjunction with GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and, 690 therefore, always correspond to fatal failures if encountered during 691 the context establishment phase. 693 Table 1: GSS-API Major Status Codes 695 FATAL ERROR CODES 697 GSS_S_BAD_BINDINGS channel binding mismatch 698 GSS_S_BAD_MECH unsupported mechanism requested 699 GSS_S_BAD_NAME invalid name provided 700 GSS_S_BAD_NAMETYPE name of unsupported type provided 701 GSS_S_BAD_STATUS invalid input status selector 702 GSS_S_BAD_SIG token had invalid integrity check 703 GSS_S_BAD_MIC preferred alias for GSS_S_BAD_SIG 704 GSS_S_CONTEXT_EXPIRED specified security context expired 705 GSS_S_CREDENTIALS_EXPIRED expired credentials detected 706 GSS_S_DEFECTIVE_CREDENTIAL defective credential detected 707 GSS_S_DEFECTIVE_TOKEN defective token detected 708 GSS_S_FAILURE failure, unspecified at GSS-API 709 level 710 GSS_S_NO_CONTEXT no valid security context specified 711 GSS_S_NO_CRED no valid credentials provided 712 GSS_S_BAD_QOP unsupported QOP value 713 GSS_S_UNAUTHORIZED operation unauthorized 714 GSS_S_UNAVAILABLE operation unavailable 715 GSS_S_DUPLICATE_ELEMENT duplicate credential element requested 716 GSS_S_NAME_NOT_MN name contains multi-mechanism elements 718 INFORMATORY STATUS CODES 720 GSS_S_COMPLETE normal completion 721 GSS_S_CONTINUE_NEEDED continuation call to routine 722 required 723 GSS_S_DUPLICATE_TOKEN duplicate per-message token 724 detected 725 GSS_S_OLD_TOKEN timed-out per-message token 726 detected 727 GSS_S_UNSEQ_TOKEN reordered (early) per-message token 728 detected 729 GSS_S_GAP_TOKEN skipped predecessor token(s) 730 detected 732 Minor_status provides more detailed status information which may 733 include status codes specific to the underlying security mechanism. 734 Minor_status values are not specified in this document. 736 GSS_S_CONTINUE_NEEDED major_status returns, and optional message 737 outputs, are provided in GSS_Init_sec_context() and 738 GSS_Accept_sec_context() calls so that different mechanisms' 739 employment of different numbers of messages within their 740 authentication sequences need not be reflected in separate code paths 741 within calling applications. Instead, such cases are accommodated 742 with sequences of continuation calls to GSS_Init_sec_context() and 743 GSS_Accept_sec_context(). The same facility is used to encapsulate 744 mutual authentication within the GSS-API's context initiation calls. 746 For mech_types which require interactions with third-party servers in 747 order to establish a security context, GSS-API context establishment 748 calls may block pending completion of such third-party interactions. 749 On the other hand, no GSS-API calls pend on serialized interactions 750 with GSS-API peer entities. As a result, local GSS-API status 751 returns cannot reflect unpredictable or asynchronous exceptions 752 occurring at remote peers, and reflection of such status information 753 is a caller responsibility outside the GSS-API. 755 1.2.1.2: Optional Service Support 757 A context initiator may request various optional services at context 758 establishment time. Each of these services is requested by setting a 759 flag in the req_flags input parameter to GSS_Init_sec_context(). 761 The optional services currently defined are: 763 - Delegation - The (usually temporary) transfer of rights from 764 initiator to acceptor, enabling the acceptor to authenticate 765 itself as an agent of the initiator. 767 - Mutual Authentication - In addition to the initiator 768 authenticating its identity to the context acceptor, the context 769 acceptor should also authenticate itself to the initiator. 771 - Replay detection - In addition to providing message integrity 772 services, GSS_GetMIC() and GSS_Wrap() should include message 773 numbering information to enable GSS_VerifyMIC() and GSS_Unwrap() 774 to detect if a message has been duplicated. 776 - Out-of-sequence detection - In addition to providing message 777 integrity services, GSS_GetMIC() and GSS_Wrap() should include 778 message sequencing information to enable GSS_VerifyMIC() and 779 GSS_Unwrap() to detect if a message has been received out of 780 sequence. 782 - Anonymous authentication - The establishment of the security 783 context should not reveal the initiator's identity to the 784 context acceptor. 786 Any currently undefined bits within such flag arguments should be 787 ignored by GSS-API implementations when presented by an application, 788 and should be set to zero when returned to the application by the 789 GSS-API implementation. 791 Some mechanisms may not support all optional services, and some 792 mechanisms may only support some services in conjunction with others. 793 Both GSS_Init_sec_context() and GSS_Accept_sec_context() inform the 794 applications which services will be available from the context when 795 the establishment phase is complete, via the ret_flags output 796 parameter. In general, if the security mechanism is capable of 797 providing a requested service, it should do so, even if additional 798 services must be enabled in order to provide the requested service. 799 If the mechanism is incapable of providing a requested service, it 800 should proceed without the service, leaving the application to abort 801 the context establishment process if it considers the requested 802 service to be mandatory. 804 Some mechanisms may specify that support for some services is 805 optional, and that implementors of the mechanism need not provide it. 806 This is most commonly true of the confidentiality service, often 807 because of legal restrictions on the use of data-encryption, but may 808 apply to any of the services. Such mechanisms are required to send 809 at least one token from acceptor to initiator during context 810 establishment when the initiator indicates a desire to use such a 811 service, so that the initiating GSS-API can correctly indicate 812 whether the service is supported by the acceptor's GSS-API. 814 1.2.2: Per-Message Security Service Availability 816 When a context is established, two flags are returned to indicate the 817 set of per-message protection security services which will be 818 available on the context: 820 the integ_avail flag indicates whether per-message integrity and 821 data origin authentication services are available 823 the conf_avail flag indicates whether per-message confidentiality 824 services are available, and will never be returned TRUE unless the 825 integ_avail flag is also returned TRUE 827 GSS-API callers desiring per-message security services should 828 check the values of these flags at context establishment time, and 829 must be aware that a returned FALSE value for integ_avail means 830 that invocation of GSS_GetMIC() or GSS_Wrap() primitives on the 831 associated context will apply no cryptographic protection to user 832 data messages. 834 The GSS-API per-message integrity and data origin authentication 835 services provide assurance to a receiving caller that protection was 836 applied to a message by the caller's peer on the security context, 837 corresponding to the entity named at context initiation. The GSS-API 838 per-message confidentiality service provides assurance to a sending 839 caller that the message's content is protected from access by 840 entities other than the context's named peer. 842 The GSS-API per-message protection service primitives, as the 843 category name implies, are oriented to operation at the granularity 844 of protocol data units. They perform cryptographic operations on the 845 data units, transfer cryptographic control information in tokens, 846 and, in the case of GSS_Wrap(), encapsulate the protected data unit. 847 As such, these primitives are not oriented to efficient data 848 protection for stream-paradigm protocols (e.g., Telnet) if 849 cryptography must be applied on an octet-by-octet basis. 851 1.2.3: Per-Message Replay Detection and Sequencing 853 Certain underlying mech_types offer support for replay detection 854 and/or sequencing of messages transferred on the contexts they 855 support. These optionally-selectable protection features are distinct 856 from replay detection and sequencing features applied to the context 857 establishment operation itself; the presence or absence of context- 858 level replay or sequencing features is wholly a function of the 859 underlying mech_type's capabilities, and is not selected or omitted 860 as a caller option. 862 The caller initiating a context provides flags (replay_det_req_flag 863 and sequence_req_flag) to specify whether the use of per-message 864 replay detection and sequencing features is desired on the context 865 being established. The GSS-API implementation at the initiator system 866 can determine whether these features are supported (and whether they 867 are optionally selectable) as a function of the selected mechanism, 868 without need for bilateral negotiation with the target. When enabled, 869 these features provide recipients with indicators as a result of 870 GSS-API processing of incoming messages, identifying whether those 871 messages were detected as duplicates or out-of-sequence. Detection of 872 such events does not prevent a suspect message from being provided to 873 a recipient; the appropriate course of action on a suspect message is 874 a matter of caller policy. 876 The semantics of the replay detection and sequencing services applied 877 to received messages, as visible across the interface which the GSS- 878 API provides to its clients, are as follows: 880 When replay_det_state is TRUE, the possible major_status returns for 881 well-formed and correctly signed messages are as follows: 883 1. GSS_S_COMPLETE, without concurrent indication of 884 GSS_S_DUPLICATE_TOKEN or GSS_S_OLD_TOKEN, indicates that the 885 message was within the window (of time or sequence space) allowing 886 replay events to be detected, and that the message was not a 887 replay of a previously-processed message within that window. 889 2. GSS_S_DUPLICATE_TOKEN indicates that the cryptographic 890 checkvalue on the received message was correct, but that the 891 message was recognized as a duplicate of a previously-processed 892 message. In addition to identifying duplicated tokens originated 893 by a context's peer, this status may also be used to identify 894 reflected copies of locally-generated tokens; it is recommended 895 that mechanism designers include within their protocols facilities 896 to detect and report such tokens. 898 3. GSS_S_OLD_TOKEN indicates that the cryptographic checkvalue on 899 the received message was correct, but that the message is too old 900 to be checked for duplication. 902 When sequence_state is TRUE, the possible major_status returns for 903 well-formed and correctly signed messages are as follows: 905 1. GSS_S_COMPLETE, without concurrent indication of 906 GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, or 907 GSS_S_GAP_TOKEN, indicates that the message was within the window 908 (of time or sequence space) allowing replay events to be detected, 909 that the message was not a replay of a previously-processed 910 message within that window, and that no predecessor sequenced 911 messages are missing relative to the last received message (if 912 any) processed on the context with a correct cryptographic 913 checkvalue. 915 2. GSS_S_DUPLICATE_TOKEN indicates that the integrity check value 916 on the received message was correct, but that the message was 917 recognized as a duplicate of a previously-processed message. In 918 addition to identifying duplicated tokens originated by a 919 context's peer, this status may also be used to identify reflected 920 copies of locally-generated tokens; it is recommended that 921 mechanism designers include within their protocols facilities to 922 detect and report such tokens. 924 3. GSS_S_OLD_TOKEN indicates that the integrity check value on the 925 received message was correct, but that the token is too old to be 926 checked for duplication. 928 4. GSS_S_UNSEQ_TOKEN indicates that the cryptographic checkvalue 929 on the received message was correct, but that it is earlier in a 930 sequenced stream than a message already processed on the context. 931 [Note: Mechanisms can be architected to provide a stricter form of 932 sequencing service, delivering particular messages to recipients 933 only after all predecessor messages in an ordered stream have been 934 delivered. This type of support is incompatible with the GSS-API 935 paradigm in which recipients receive all messages, whether in 936 order or not, and provide them (one at a time, without intra-GSS- 937 API message buffering) to GSS-API routines for validation. GSS- 938 API facilities provide supportive functions, aiding clients to 939 achieve strict message stream integrity in an efficient manner in 940 conjunction with sequencing provisions in communications 941 protocols, but the GSS-API does not offer this level of message 942 stream integrity service by itself.] 944 5. GSS_S_GAP_TOKEN indicates that the cryptographic checkvalue on 945 the received message was correct, but that one or more predecessor 946 sequenced messages have not been successfully processed relative 947 to the last received message (if any) processed on the context 948 with a correct cryptographic checkvalue. 950 As the message stream integrity features (especially sequencing) may 951 interfere with certain applications' intended communications 952 paradigms, and since support for such features is likely to be 953 resource intensive, it is highly recommended that mech_types 954 supporting these features allow them to be activated selectively on 955 initiator request when a context is established. A context initiator 956 and target are provided with corresponding indicators 957 (replay_det_state and sequence_state), signifying whether these 958 features are active on a given context. 960 An example mech_type supporting per-message replay detection could 961 (when replay_det_state is TRUE) implement the feature as follows: The 962 underlying mechanism would insert timestamps in data elements output 963 by GSS_GetMIC() and GSS_Wrap(), and would maintain (within a time- 964 limited window) a cache (qualified by originator-recipient pair) 965 identifying received data elements processed by GSS_VerifyMIC() and 966 GSS_Unwrap(). When this feature is active, exception status returns 967 (GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN) will be provided when 968 GSS_VerifyMIC() or GSS_Unwrap() is presented with a message which is 969 either a detected duplicate of a prior message or which is too old to 970 validate against a cache of recently received messages. 972 1.2.4: Quality of Protection 974 Some mech_types provide their users with fine granularity control 975 over the means used to provide per-message protection, allowing 976 callers to trade off security processing overhead dynamically against 977 the protection requirements of particular messages. A per-message 978 quality-of-protection parameter (analogous to quality-of-service, or 979 QOS) selects among different QOP options supported by that mechanism. 980 On context establishment for a multi-QOP mech_type, context-level 981 data provides the prerequisite data for a range of protection 982 qualities. 984 It is expected that the majority of callers will not wish to exert 985 explicit mechanism-specific QOP control and will therefore request 986 selection of a default QOP. Definitions of, and choices among, non- 987 default QOP values are mechanism-specific, and no ordered sequences 988 of QOP values can be assumed equivalent across different mechanisms. 989 Meaningful use of non-default QOP values demands that callers be 990 familiar with the QOP definitions of an underlying mechanism or 991 mechanisms, and is therefore a non-portable construct. The 992 GSS_S_BAD_QOP major_status value is defined in order to indicate that 993 a provided QOP value is unsupported for a security context, most 994 likely because that value is unrecognized by the underlying 995 mechanism. 997 In the interests of interoperability, mechanisms which allow optional 998 support of particular QOP values shall satisfy one of the following 999 conditions. Either: 1001 (i) All implementations of the mechanism are required to be 1002 capable of processing messages protected using any QOP value, 1003 regardless of whether they can apply protection corresponding to 1004 that QOP, or 1006 (ii) The set of mutually-supported receiver QOP values must be 1007 determined during context establishment, and messages may be 1008 protected by either peer using only QOP values from this 1009 mutually-supported set. 1011 NOTE: (i) is just a special-case of (ii), where implementations are 1012 required to support all QOP values on receipt. 1014 1.2.5: Anonymity Support 1016 In certain situations or environments, an application may wish to 1017 authenticate a peer and/or protect communications using GSS-API per- 1018 message services without revealing its own identity. For example, 1019 consider an application which provides read access to a research 1020 database, and which permits queries by arbitrary requestors. A 1021 client of such a service might wish to authenticate the service, to 1022 establish trust in the information received from it, but might not 1023 wish to disclose its identity to the service for privacy reasons. 1025 In ordinary GSS-API usage, a context initiator's identity is made 1026 available to the context acceptor as part of the context 1027 establishment process. To provide for anonymity support, a facility 1028 (input anon_req_flag to GSS_Init_sec_context()) is provided through 1029 which context initiators may request that their identity not be 1030 provided to the context acceptor. Mechanisms are not required to 1031 honor this request, but a caller will be informed (via returned 1032 anon_state indicator from GSS_Init_sec_context()) whether or not the 1033 request is honored. Note that authentication as the anonymous 1034 principal does not necessarily imply that credentials are not 1035 required in order to establish a context. 1037 Section 4.5 of this document defines the Object Identifier value used 1038 to identify an anonymous principal. 1040 Four possible combinations of anon_state and mutual_state are 1041 possible, with the following results: 1043 anon_state == FALSE, mutual_state == FALSE: initiator 1044 authenticated to target. 1046 anon_state == FALSE, mutual_state == TRUE: initiator authenticated 1047 to target, target authenticated to initiator. 1049 anon_state == TRUE, mutual_state == FALSE: initiator authenticated 1050 as anonymous principal to target. 1052 anon_state == TRUE, mutual_state == TRUE: initiator authenticated 1053 as anonymous principal to target, target authenticated to 1054 initiator. 1056 1.2.6: Initialization 1058 No initialization calls (i.e., calls which must be invoked prior to 1059 invocation of other facilities in the interface) are defined in GSS- 1060 API. As an implication of this fact, GSS-API implementations must 1061 themselves be self-initializing. 1063 1.2.7: Per-Message Protection During Context Establishment 1065 A facility is defined in GSS-V2 to enable protection and buffering of 1066 data messages for later transfer while a security context's 1067 establishment is in GSS_S_CONTINUE_NEEDED status, to be used in cases 1068 where the caller side already possesses the necessary session key to 1069 enable this processing. Specifically, a new state Boolean, called 1070 prot_ready_state, is added to the set of information returned by 1071 GSS_Init_sec_context(), GSS_Accept_sec_context(), and 1072 GSS_Inquire_context(). 1074 For context establishment calls, this state Boolean is valid and 1075 interpretable when the associated major_status is either 1076 GSS_S_CONTINUE_NEEDED, or GSS_S_COMPLETE. Callers of GSS-API (both 1077 initiators and acceptors) can assume that per-message protection (via 1078 GSS_Wrap(), GSS_Unwrap(), GSS_GetMIC() and GSS_VerifyMIC()) is 1079 available and ready for use if either: prot_ready_state == TRUE, or 1080 major_status == GSS_S_COMPLETE, though mutual authentication (if 1081 requested) cannot be guaranteed until GSS_S_COMPLETE is returned. 1083 callers, who need not even know of the existence of prot_ready_state, 1084 and who will get the expected behavior from GSS_S_COMPLETE, but who 1085 will not be able to use per-message protection before GSS_S_COMPLETE 1086 is returned. 1088 prot_ready_state before completion of context establishment (indeed, 1089 some mechanisms will not evolve usable message protection keys, 1090 especially at the context acceptor, before context establishment is 1091 complete). It is expected but not required that GSS-V2 mechanisms 1092 will return TRUE prot_ready_state upon completion of context 1093 establishment if they support per-message protection at all (however 1094 GSS-V2 applications should not assume that TRUE prot_ready_state will 1095 always be returned together with the GSS_S_COMPLETE major_status, 1096 since GSS-V2 implementations may continue to support GSS-V1 mechanism 1097 code, which will never return TRUE prot_ready_state). 1099 When prot_ready_state is returned TRUE, mechanisms shall also set 1100 those context service indicator flags (deleg_state, mutual_state, 1101 replay_det_state, sequence_state, anon_state, trans_state, 1102 conf_avail, integ_avail) which represent facilities confirmed, at 1103 that time, to be available on the context being established. In 1104 situations where prot_ready_state is returned before GSS_S_COMPLETE, 1105 it is possible that additional facilities may be confirmed and 1106 subsequently indicated when GSS_S_COMPLETE is returned. 1108 1.2.8: Implementation Robustness 1110 This section recommends aspects of GSS-API implementation behavior in 1111 the interests of overall robustness. 1113 Invocation of GSS-API calls is to incur no undocumented side effects 1114 visible at the GSS-API level. 1116 If a token is presented for processing on a GSS-API security context 1117 and that token generates a fatal error in processing or is otherwise 1118 determined to be invalid for that context, the context's state should 1119 not be disrupted for purposes of processing subsequent valid tokens. 1121 Certain local conditions at a GSS-API implementation (e.g., 1122 unavailability of memory) may preclude, temporarily or permanently, 1123 the successful processing of tokens on a GSS-API security context, 1124 typically generating GSS_S_FAILURE major_status returns along with 1125 locally-significant minor_status. For robust operation under such 1126 conditions, the following recommendations are made: 1128 Failing calls should free any memory they allocate, so that callers 1129 may retry without causing further loss of resources. 1131 Failure of an individual call on an established context should not 1132 preclude subsequent calls from succeeding on the same context. 1134 Whenever possible, it should be possible for 1135 GSS_Delete_sec_context() calls to be successfully processed even if 1136 other calls cannot succeed, thereby enabling context-related 1137 resources to be released. 1139 A failure of GSS_GetMIC() or GSS_Wrap() due to an attempt to use an 1140 unsupported QOP will not interfere with context validity, nor shall 1141 such a failure impact the ability of the application to subsequently 1142 invoke GSS_GetMIC() or GSS_Wrap() using a supported QOP. Any state 1143 information concerning sequencing of outgoing messages shall be 1144 unchanged by an unsuccesful call of GSS_GetMIC() or GSS_Wrap(). 1146 1.2.9: Delegation 1148 The GSS-API allows delegation to be controlled by the initiating 1149 application via a Boolean parameter to GSS_Init_sec_context(), the 1150 routine that establishes a security context. Some mechanisms do not 1151 support delegation, and for such mechanisms attempts by an 1152 application to enable delegation are ignored. 1154 The acceptor of a security context for which the initiator enabled 1155 delegation will receive (via the delegated_cred_handle parameter of 1156 GSS_Accept_sec_context()) a credential handle that contains the 1157 delegated identity, and this credential handle may be used to 1158 initiate subsequent GSS-API security contexts as an agent or delegate 1159 of the initiator. If the original initiator's identity is "A" and 1160 the delegate's identity is "B", then, depending on the underlying 1161 mechanism, the identity embodied by the delegated credential may be 1162 either "A" or "B acting for A". 1164 For many mechanisms that support delegation, a simple Boolean does 1165 not provide enough control. Examples of additional aspects of 1166 delegation control that a mechanism might provide to an application 1167 are duration of delegation, network addresses from which delegation 1168 is valid, and constraints on the tasks that may be performed by a 1169 delegate. Such controls are presently outside the scope of the GSS- 1170 API. GSS-API implementations supporting mechanisms offering 1171 additional controls should provide extension routines that allow 1172 these controls to be exercised (perhaps by modifying the initiator's 1173 GSS-API credential prior to its use in establishing a context). 1174 However, the simple delegation control provided by GSS-API should 1175 always be able to over-ride other mechanism-specific delegation 1176 controls; if the application instructs GSS_Init_sec_context() that 1177 delegation is not desired, then the implementation must not permit 1178 delegation to occur. This is an exception to the general rule that a 1179 mechanism may enable services even if they are not requested; 1180 delegation may only be provided at the explicit request of the 1181 application. 1183 1.2.10: Interprocess Context Transfer 1185 GSS-API V2 provides routines (GSS_Export_sec_context() and 1186 GSS_Import_sec_context()) which allow a security context to be 1187 transferred between processes on a single machine. The most common 1188 use for such a feature is a client-server design where the server is 1189 implemented as a single process that accepts incoming security 1190 contexts, which then launches child processes to deal with the data 1191 on these contexts. In such a design, the child processes must have 1192 access to the security context data structure created within the 1193 parent by its call to GSS_Accept_sec_context() so that they can use 1194 per-message protection services and delete the security context when 1195 the communication session ends. 1197 Since the security context data structure is expected to contain 1198 sequencing information, it is impractical in general to share a 1199 context between processes. Thus GSS-API provides a call 1200 (GSS_Export_sec_context()) that the process which currently owns the 1201 context can call to declare that it has no intention to use the 1202 context subsequently, and to create an inter-process token containing 1203 information needed by the adopting process to successfully import the 1204 context. After successful completion of this call, the original 1205 security context is made inaccessible to the calling process by GSS- 1206 API, and any context handles referring to this context are no longer 1207 valid. The originating process transfers the inter-process token to 1208 the adopting process, which passes it to GSS_Import_sec_context(), 1209 and a fresh context handle is created such that it is functionally 1210 identical to the original context. 1212 The inter-process token may contain sensitive data from the original 1213 security context (including cryptographic keys). Applications using 1214 inter-process tokens to transfer security contexts must take 1215 appropriate steps to protect these tokens in transit. 1216 Implementations are not required to support the inter-process 1217 transfer of security contexts. The ability to transfer a security 1218 context is indicated when the context is created, by 1219 GSS_Init_sec_context() or GSS_Accept_sec_context() indicating a TRUE 1220 trans_state return value. 1222 2: Interface Descriptions 1224 This section describes the GSS-API's service interface, dividing the 1225 set of calls offered into four groups. Credential management calls 1226 are related to the acquisition and release of credentials by 1227 principals. Context-level calls are related to the management of 1228 security contexts between principals. Per-message calls are related 1229 to the protection of individual messages on established security 1230 contexts. Support calls provide ancillary functions useful to GSS-API 1231 callers. Table 2 groups and summarizes the calls in tabular fashion. 1233 Table 2: GSS-API Calls 1235 CREDENTIAL MANAGEMENT 1237 GSS_Acquire_cred acquire credentials for use 1238 GSS_Release_cred release credentials after use 1239 GSS_Inquire_cred display information about 1240 credentials 1241 GSS_Add_cred construct credentials incrementally 1242 GSS_Inquire_cred_by_mech display per-mechanism credential 1243 information 1245 CONTEXT-LEVEL CALLS 1247 GSS_Init_sec_context initiate outbound security context 1248 GSS_Accept_sec_context accept inbound security context 1249 GSS_Delete_sec_context flush context when no longer needed 1250 GSS_Process_context_token process received control token on 1251 context 1252 GSS_Context_time indicate validity time remaining on 1253 context 1254 GSS_Inquire_context display information about context 1255 GSS_Wrap_size_limit determine GSS_Wrap token size limit 1256 GSS_Export_sec_context transfer context to other process 1257 GSS_Import_sec_context import transferred context 1259 PER-MESSAGE CALLS 1261 GSS_GetMIC apply integrity check, receive as 1262 token separate from message 1263 GSS_VerifyMIC validate integrity check token 1264 along with message 1265 GSS_Wrap sign, optionally encrypt, 1266 encapsulate 1267 GSS_Unwrap decapsulate, decrypt if needed, 1268 validate integrity check 1270 SUPPORT CALLS 1272 GSS_Display_status translate status codes to printable 1273 form 1274 GSS_Indicate_mechs indicate mech_types supported on 1275 local system 1276 GSS_Compare_name compare two names for equality 1277 GSS_Display_name translate name to printable form 1278 GSS_Import_name convert printable name to 1279 normalized form 1280 GSS_Release_name free storage of normalized-form 1281 name 1282 GSS_Release_buffer free storage of general GSS-allocated 1283 object 1284 GSS_Release_OID_set free storage of OID set object 1285 GSS_Create_empty_OID_set create empty OID set 1286 GSS_Add_OID_set_member add member to OID set 1287 GSS_Test_OID_set_member test if OID is member of OID set 1288 GSS_Inquire_names_for_mech indicate name types supported by 1289 mechanism 1290 GSS_Inquire_mechs_for_name indicates mechanisms supporting name 1291 type 1292 GSS_Canonicalize_name translate name to per-mechanism form 1293 GSS_Export_name externalize per-mechanism name 1294 GSS_Duplicate_name duplicate name object 1296 2.1: Credential management calls 1298 These GSS-API calls provide functions related to the management of 1299 credentials. Their characterization with regard to whether or not 1300 they may block pending exchanges with other network entities (e.g., 1301 directories or authentication servers) depends in part on OS-specific 1302 (extra-GSS-API) issues, so is not specified in this document. 1304 The GSS_Acquire_cred() call is defined within the GSS-API in support 1305 of application portability, with a particular orientation towards 1306 support of portable server applications. It is recognized that (for 1307 certain systems and mechanisms) credentials for interactive users may 1308 be managed differently from credentials for server processes; in such 1309 environments, it is the GSS-API implementation's responsibility to 1310 distinguish these cases and the procedures for making this 1311 distinction are a local matter. The GSS_Release_cred() call provides 1312 a means for callers to indicate to the GSS-API that use of a 1313 credentials structure is no longer required. The GSS_Inquire_cred() 1314 call allows callers to determine information about a credentials 1315 structure. The GSS_Add_cred() call enables callers to append 1316 elements to an existing credential structure, allowing iterative 1317 construction of a multi-mechanism credential. The 1318 GSS_Inquire_cred_by_mech() call enables callers to extract per- 1319 mechanism information describing a credentials structure. 1321 2.1.1: GSS_Acquire_cred call 1323 Inputs: 1325 o desired_name INTERNAL NAME, -- NULL requests locally-determined 1326 -- default 1328 o lifetime_req INTEGER, -- in seconds; 0 requests default 1330 o desired_mechs SET OF OBJECT IDENTIFIER, -- empty set requests 1331 -- system-selected default 1333 o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1334 -- 2=ACCEPT-ONLY 1336 Outputs: 1338 o major_status INTEGER, 1340 o minor_status INTEGER, 1342 o output_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL, 1343 -- caller must release with GSS_Release_cred() 1345 o actual_mechs SET OF OBJECT IDENTIFIER, -- if returned non-NULL, 1346 -- caller must release with GSS_Release_oid_set() 1348 o lifetime_rec INTEGER -- in seconds, or reserved value for 1349 -- INDEFINITE 1351 Return major_status codes: 1353 o GSS_S_COMPLETE indicates that requested credentials were 1354 successfully established, for the duration indicated in 1355 lifetime_rec, suitable for the usage requested in cred_usage, 1356 for the set of mech_types indicated in actual_mechs, and that 1357 those credentials can be referenced for subsequent use with 1358 the handle returned in output_cred_handle. 1360 o GSS_S_BAD_MECH indicates that a mech_type unsupported by the 1361 GSS-API implementation type was requested, causing the 1362 credential establishment operation to fail. 1364 o GSS_S_BAD_NAMETYPE indicates that the provided desired_name is 1365 uninterpretable or of a type unsupported by the applicable 1366 underlying GSS-API mechanism(s), so no credentials could be 1367 established for the accompanying desired_name. 1369 o GSS_S_BAD_NAME indicates that the provided desired_name is 1370 inconsistent in terms of internally-incorporated type specifier 1371 information, so no credentials could be established for the 1372 accompanying desired_name. 1374 o GSS_S_CREDENTIALS_EXPIRED indicates that underlying credential 1375 elements corresponding to the requested desired_name have 1376 expired, so requested credentials could not be established. 1378 o GSS_S_NO_CRED indicates that no credential elements corresponding 1379 to the requested desired_name and usage could be accessed, so 1380 requested credentials could not be established. In particular, 1381 this status should be returned upon temporary user-fixable 1382 conditions preventing successful credential establishment and 1383 upon lack of authorization to establish and use credentials 1384 associated with the identity named in the input desired_name 1385 argument. 1387 o GSS_S_FAILURE indicates that credential establishment failed 1388 for reasons unspecified at the GSS-API level. 1390 GSS_Acquire_cred() is used to acquire credentials so that a principal 1391 can (as a function of the input cred_usage parameter) initiate and/or 1392 accept security contexts under the identity represented by the 1393 desired_name input argument. On successful completion, the returned 1394 output_cred_handle result provides a handle for subsequent references 1395 to the acquired credentials. Typically, single-user client processes 1396 requesting that default credential behavior be applied for context 1397 establishment purposes will have no need to invoke this call. 1399 A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name, 1400 which will be interpreted as a request for a credential handle that 1401 will invoke default behavior when passed to GSS_Init_sec_context(), 1402 if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or 1403 GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or 1404 GSS_C_BOTH. It is possible that multiple pre-established credentials 1405 may exist for the same principal identity (for example, as a result 1406 of multiple user login sessions) when GSS_Acquire_cred() is called; 1407 the means used in such cases to select a specific credential are 1408 local matters. The input lifetime_req argument to GSS_Acquire_cred() 1409 may provide useful information for local GSS-API implementations to 1410 employ in making this disambiguation in a manner which will best 1411 satisfy a caller's intent. 1413 This routine is expected to be used primarily by context acceptors, 1414 since implementations are likely to provide mechanism-specific ways 1415 of obtaining GSS-API initiator credentials from the system login 1416 process. Some implementations may therefore not support the 1417 acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via 1418 GSS_Acquire_cred() for any name other than GSS_C_NO_NAME, or a name 1419 resulting from applying GSS_Inquire_context() to an active context, 1420 or a name resulting from applying GSS_Inquire_cred() against a 1421 credential handle corresponding to default behavior. It is important 1422 to recognize that the explicit name which is yielded by resolving a 1423 default reference may change over time, e.g., as a result of local 1424 credential element management operations outside GSS-API; once 1425 resolved, however, the value of such an explicit name will remain 1426 constant. 1428 The lifetime_rec result indicates the length of time for which the 1429 acquired credentials will be valid, as an offset from the present. A 1430 mechanism may return a reserved value indicating INDEFINITE if no 1431 constraints on credential lifetime are imposed. A caller of 1432 GSS_Acquire_cred() can request a length of time for which acquired 1433 credentials are to be valid (lifetime_req argument), beginning at the 1434 present, or can request credentials with a default validity interval. 1435 (Requests for postdated credentials are not supported within the 1436 GSS-API.) Certain mechanisms and implementations may bind in 1437 credential validity period specifiers at a point preliminary to 1438 invocation of the GSS_Acquire_cred() call (e.g., in conjunction with 1439 user login procedures). As a result, callers requesting non-default 1440 values for lifetime_req must recognize that such requests cannot 1441 always be honored and must be prepared to accommodate the use of 1442 returned credentials with different lifetimes as indicated in 1443 lifetime_rec. 1445 The caller of GSS_Acquire_cred() can explicitly specify a set of 1446 mech_types which are to be accommodated in the returned credentials 1447 (desired_mechs argument), or can request credentials for a system- 1448 defined default set of mech_types. Selection of the system-specified 1449 default set is recommended in the interests of application 1450 portability. The actual_mechs return value may be interrogated by the 1451 caller to determine the set of mechanisms with which the returned 1452 credentials may be used. 1454 2.1.2: GSS_Release_cred call 1456 Input: 1458 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1459 -- is specified, the call will complete successfully, but 1460 -- will have no effect; no credential elements will be 1461 -- released. 1463 Outputs: 1465 o major_status INTEGER, 1467 o minor_status INTEGER 1469 Return major_status codes: 1471 o GSS_S_COMPLETE indicates that the credentials referenced by the 1472 input cred_handle were released for purposes of subsequent 1473 access by the caller. The effect on other processes which may 1474 be authorized shared access to such credentials is a local 1475 matter. 1477 o GSS_S_NO_CRED indicates that no release operation was 1478 performed, either because the input cred_handle was invalid or 1479 because the caller lacks authorization to access the 1480 referenced credentials. 1482 o GSS_S_FAILURE indicates that the release operation failed for 1483 reasons unspecified at the GSS-API level. 1485 Provides a means for a caller to explicitly request that credentials 1486 be released when their use is no longer required. Note that system- 1487 specific credential management functions are also likely to exist, 1488 for example to assure that credentials shared among processes are 1489 properly deleted when all affected processes terminate, even if no 1490 explicit release requests are issued by those processes. Given the 1491 fact that multiple callers are not precluded from gaining authorized 1492 access to the same credentials, invocation of GSS_Release_cred() 1493 cannot be assumed to delete a particular set of credentials on a 1494 system-wide basis. 1496 2.1.3: GSS_Inquire_cred call 1498 Input: 1500 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1501 -- specified, default initiator credentials are queried 1503 Outputs: 1505 o major_status INTEGER, 1506 o minor_status INTEGER, 1508 o cred_name INTERNAL NAME, -- caller must release with 1509 -- GSS_Release_name() 1511 o lifetime_rec INTEGER -- in seconds, or reserved value for 1512 -- INDEFINITE 1514 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1515 -- 2=ACCEPT-ONLY 1517 o mech_set SET OF OBJECT IDENTIFIER -- caller must release 1518 -- with GSS_Release_oid_set() 1520 Return major_status codes: 1522 o GSS_S_COMPLETE indicates that the credentials referenced by the 1523 input cred_handle argument were valid, and that the output 1524 cred_name, lifetime_rec, and cred_usage values represent, 1525 respectively, the credentials' associated principal name, 1526 remaining lifetime, suitable usage modes, and supported 1527 mechanism types. 1529 o GSS_S_NO_CRED indicates that no information could be returned 1530 about the referenced credentials, either because the input 1531 cred_handle was invalid or because the caller lacks 1532 authorization to access the referenced credentials. 1534 o GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced 1535 credentials are invalid. 1537 o GSS_S_CREDENTIALS_EXPIRED indicates that the referenced 1538 credentials have expired. 1540 o GSS_S_FAILURE indicates that the operation failed for 1541 reasons unspecified at the GSS-API level. 1543 The GSS_Inquire_cred() call is defined primarily for the use of those 1544 callers which request use of default credential behavior rather than 1545 acquiring credentials explicitly with GSS_Acquire_cred(). It enables 1546 callers to determine a credential structure's associated principal 1547 name, remaining validity period, usability for security context 1548 initiation and/or acceptance, and supported mechanisms. 1550 For a multi-mechanism credential, the returned "lifetime" specifier 1551 indicates the shortest lifetime of any of the mechanisms' elements in 1552 the credential (for either context initiation or acceptance 1553 purposes). 1555 GSS_Inquire_cred() should indicate INITIATE-AND-ACCEPT for 1556 "cred_usage" if both of the following conditions hold: 1558 (1) there exists in the credential an element which allows 1559 context initiation using some mechanism 1561 (2) there exists in the credential an element which allows 1562 context acceptance using some mechanism (allowably, but not 1563 necessarily, one of the same mechanism(s) qualifying for (1)). 1565 If condition (1) holds but not condition (2), GSS_Inquire_cred() 1566 should indicate INITIATE-ONLY for "cred_usage". If condition (2) 1567 holds but not condition (1), GSS_Inquire_cred() should indicate 1568 ACCEPT-ONLY for "cred_usage". 1570 Callers requiring finer disambiguation among available combinations 1571 of lifetimes, usage modes, and mechanisms should call the 1572 GSS_Inquire_cred_by_mech() routine, passing that routine one of the 1573 mech OIDs returned by GSS_Inquire_cred(). 1575 2.1.4: GSS_Add_cred call 1577 Inputs: 1579 o input_cred_handle CREDENTIAL HANDLE -- handle to credential 1580 -- structure created with prior GSS_Acquire_cred() or 1581 -- GSS_Add_cred() call; see text for definition of behavior 1582 -- when GSS_C_NO_CREDENTIAL provided. 1584 o desired_name INTERNAL NAME 1586 o initiator_time_req INTEGER -- in seconds; 0 requests default 1588 o acceptor_time_req INTEGER -- in seconds; 0 requests default 1590 o desired_mech OBJECT IDENTIFIER 1592 o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1593 -- 2=ACCEPT-ONLY 1595 Outputs: 1597 o major_status INTEGER, 1599 o minor_status INTEGER, 1601 o output_cred_handle CREDENTIAL HANDLE, -- NULL to request that 1602 -- credential elements be added "in place" to the credential 1603 -- structure identified by input_cred_handle, 1604 -- non-NULL pointer to request that 1605 -- a new credential structure and handle be created. 1606 -- if credential handle returned, caller must release with 1607 -- GSS_Release_cred() 1609 o actual_mechs SET OF OBJECT IDENTIFIER, -- if returned, caller must 1610 -- release with GSS_Release_oid_set() 1612 o initiator_time_rec INTEGER -- in seconds, or reserved value for 1613 -- INDEFINITE 1615 o acceptor_time_rec INTEGER -- in seconds, or reserved value for 1616 -- INDEFINITE 1618 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1619 -- 2=ACCEPT-ONLY 1621 o mech_set SET OF OBJECT IDENTIFIER -- full set of mechanisms 1622 -- supported by resulting credential. 1624 Return major_status codes: 1626 o GSS_S_COMPLETE indicates that the credentials referenced by 1627 the input_cred_handle argument were valid, and that the 1628 resulting credential from GSS_Add_cred() is valid for the 1629 durations indicated in initiator_time_rec and acceptor_time_rec, 1630 suitable for the usage requested in cred_usage, and for the 1631 mechanisms indicated in actual_mechs. 1633 o GSS_S_DUPLICATE_ELEMENT indicates that the input desired_mech 1634 specified a mechanism for which the referenced credential 1635 already contained a credential element with overlapping cred_usage 1636 and validity time specifiers. 1638 o GSS_S_BAD_MECH indicates that the input desired_mech specified 1639 a mechanism unsupported by the GSS-API implementation, causing 1640 the GSS_Add_cred() operation to fail. 1642 o GSS_S_BAD_NAMETYPE indicates that the provided desired_name 1643 is uninterpretable or of a type unsupported by the applicable 1644 underlying GSS-API mechanism(s), so the GSS_Add_cred() operation 1645 could not be performed for that name. 1647 o GSS_S_BAD_NAME indicates that the provided desired_name is 1648 inconsistent in terms of internally-incorporated type specifier 1649 information, so the GSS_Add_cred() operation could not be 1650 performed for that name. 1652 o GSS_S_NO_CRED indicates that the input_cred_handle referenced 1653 invalid or inaccessible credentials. In particular, 1654 this status should be returned upon temporary user-fixable 1655 conditions preventing successful credential establishment or 1656 upon lack of authorization to establish or use credentials 1657 representing the requested identity. 1659 o GSS_S_CREDENTIALS_EXPIRED indicates that referenced credential 1660 elements have expired, so the GSS_Add_cred() operation could 1661 not be performed. 1663 o GSS_S_FAILURE indicates that the operation failed for 1664 reasons unspecified at the GSS-API level. 1666 GSS_Add_cred() enables callers to construct credentials iteratively 1667 by adding credential elements in successive operations, corresponding 1668 to different mechanisms. This offers particular value in multi- 1669 mechanism environments, as the major_status and minor_status values 1670 returned on each iteration are individually visible and can therefore 1671 be interpreted unambiguously on a per-mechanism basis. A credential 1672 element is identified by the name of the principal to which it 1673 refers. GSS-API implementations must impose a local access control 1674 policy on callers of this routine to prevent unauthorized callers 1675 from acquiring credential elements to which they are not entitled. 1676 This routine is not intended to provide a ``login to the network'' 1677 function, as such a function would involve the creation of new 1678 mechanism-specific authentication data, rather than merely acquiring 1679 a GSS-API handle to existing data. Such functions, if required, 1680 should be defined in implementation-specific extension routines. 1682 If credential acquisition is time-consuming for a mechanism, the 1683 mechanism may choose to delay the actual acquisition until the 1684 credential is required (e.g. by GSS_Init_sec_context() or 1685 GSS_Accept_sec_context()). Such mechanism-specific implementation 1686 decisions should be invisible to the calling application; thus a call 1687 of GSS_Inquire_cred() immediately following the call of 1688 GSS_Acquire_cred() must return valid credential data, and may 1689 therefore incur the overhead of a deferred credential acquisition. 1691 If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL 1692 output_cred_handle must be supplied. For the case of 1693 GSS_C_NO_CREDENTIAL as input_cred_handle, GSS_Add_cred() will create 1694 the credential referenced by its output_cred_handle based on default 1695 behavior. That is, the call will have the same effect as if the 1696 caller had previously called GSS_Acquire_cred(), specifying the same 1697 usage and passing GSS_C_NO_NAME as the desired_name parameter 1698 (thereby obtaining an explicit credential handle corresponding to 1699 default behavior), had passed that credential handle to 1700 GSS_Add_cred(), and had finally called GSS_Release_cred() on the 1701 credential handle received from GSS_Acquire_cred(). 1703 This routine is expected to be used primarily by context acceptors, 1704 since implementations are likely to provide mechanism-specific ways 1705 of obtaining GSS-API initiator credentials from the system login 1706 process. Some implementations may therefore not support the 1707 acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via 1708 GSS_Acquire_cred() for any name other than GSS_C_NO_NAME, or a name 1709 resulting from applying GSS_Inquire_context() to an active context, 1710 or a name resulting from applying GSS_Inquire_cred() against a 1711 credential handle corresponding to default behavior. It is important 1712 to recognize that the explicit name which is yielded by resolving a 1713 default reference may change over time, e.g., as a result of local 1714 credential element management operations outside GSS-API; once 1715 resolved, however, the value of such an explicit name will remain 1716 constant. 1718 A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name, 1719 which will be interpreted as a request for a credential handle that 1720 will invoke default behavior when passed to GSS_Init_sec_context(), 1721 if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or 1722 GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or 1723 GSS_C_BOTH. 1725 The same input desired_name, or default reference, should be used on 1726 all GSS_Acquire_cred() and GSS_Add_cred() calls corresponding to a 1727 particular credential. 1729 2.1.5: GSS_Inquire_cred_by_mech call 1731 Inputs: 1733 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1734 -- specified, default initiator credentials are queried 1736 o mech_type OBJECT IDENTIFIER -- specific mechanism for 1737 -- which credentials are being queried 1739 Outputs: 1741 o major_status INTEGER, 1743 o minor_status INTEGER, 1745 o cred_name INTERNAL NAME, -- guaranteed to be MN; caller must 1746 -- release with GSS_Release_name() 1747 o lifetime_rec_initiate INTEGER -- in seconds, or reserved value for 1748 -- INDEFINITE 1750 o lifetime_rec_accept INTEGER -- in seconds, or reserved value for 1751 -- INDEFINITE 1753 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1754 -- 2=ACCEPT-ONLY 1756 Return major_status codes: 1758 o GSS_S_COMPLETE indicates that the credentials referenced by the 1759 input cred_handle argument were valid, that the mechanism 1760 indicated by the input mech_type was represented with elements 1761 within those credentials, and that the output cred_name, 1762 lifetime_rec_initiate, lifetime_rec_accept, and cred_usage values 1763 represent, respectively, the credentials' associated principal 1764 name, remaining lifetimes, and suitable usage modes. 1766 o GSS_S_NO_CRED indicates that no information could be returned 1767 about the referenced credentials, either because the input 1768 cred_handle was invalid or because the caller lacks 1769 authorization to access the referenced credentials. 1771 o GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced 1772 credentials are invalid. 1774 o GSS_S_CREDENTIALS_EXPIRED indicates that the referenced 1775 credentials have expired. 1777 o GSS_S_BAD_MECH indicates that the referenced credentials do not 1778 contain elements for the requested mechanism. 1780 o GSS_S_FAILURE indicates that the operation failed for reasons 1781 unspecified at the GSS-API level. 1783 The GSS_Inquire_cred_by_mech() call enables callers in multi- 1784 mechanism environments to acquire specific data about available 1785 combinations of lifetimes, usage modes, and mechanisms within a 1786 credential structure. The lifetime_rec_initiate result indicates the 1787 available lifetime for context initiation purposes; the 1788 lifetime_rec_accept result indicates the available lifetime for 1789 context acceptance purposes. 1791 2.2: Context-level calls 1793 This group of calls is devoted to the establishment and management of 1794 security contexts between peers. A context's initiator calls 1795 GSS_Init_sec_context(), resulting in generation of a token which the 1796 caller passes to the target. At the target, that token is passed to 1797 GSS_Accept_sec_context(). Depending on the underlying mech_type and 1798 specified options, additional token exchanges may be performed in the 1799 course of context establishment; such exchanges are accommodated by 1800 GSS_S_CONTINUE_NEEDED status returns from GSS_Init_sec_context() and 1801 GSS_Accept_sec_context(). 1803 Either party to an established context may invoke 1804 GSS_Delete_sec_context() to flush context information when a context 1805 is no longer required. GSS_Process_context_token() is used to process 1806 received tokens carrying context-level control information. 1807 GSS_Context_time() allows a caller to determine the length of time 1808 for which an established context will remain valid. 1809 GSS_Inquire_context() returns status information describing context 1810 characteristics. GSS_Wrap_size_limit() allows a caller to determine 1811 the size of a token which will be generated by a GSS_Wrap() 1812 operation. GSS_Export_sec_context() and GSS_Import_sec_context() 1813 enable transfer of active contexts between processes on an end 1814 system. 1816 2.2.1: GSS_Init_sec_context call 1818 Inputs: 1820 o claimant_cred_handle CREDENTIAL HANDLE, -- NULL specifies "use 1821 -- default" 1823 o input_context_handle CONTEXT HANDLE, -- 0 specifies "none assigned 1824 -- yet" 1826 o targ_name INTERNAL NAME, 1828 o mech_type OBJECT IDENTIFIER, -- NULL parameter specifies "use 1829 -- default" 1831 o deleg_req_flag BOOLEAN, 1833 o mutual_req_flag BOOLEAN, 1835 o replay_det_req_flag BOOLEAN, 1837 o sequence_req_flag BOOLEAN, 1839 o anon_req_flag BOOLEAN, 1841 o conf_req_flag BOOLEAN, 1842 o integ_req_flag BOOLEAN, 1844 o lifetime_req INTEGER, -- 0 specifies default lifetime 1846 o chan_bindings OCTET STRING, 1848 o input_token OCTET STRING -- NULL or token received from target 1850 Outputs: 1852 o major_status INTEGER, 1854 o minor_status INTEGER, 1856 o output_context_handle CONTEXT HANDLE, -- once returned non-NULL, 1857 -- caller must release with GSS_Delete_sec_context() 1859 o mech_type OBJECT IDENTIFIER, -- actual mechanism always 1860 -- indicated, never NULL; caller should treat as read-only 1861 -- and should not attempt to release 1863 o output_token OCTET STRING, -- NULL or token to pass to context 1864 -- target; caller must release with GSS_Release_buffer() 1866 o deleg_state BOOLEAN, 1868 o mutual_state BOOLEAN, 1870 o replay_det_state BOOLEAN, 1872 o sequence_state BOOLEAN, 1874 o anon_state BOOLEAN, 1876 o trans_state BOOLEAN, 1878 o prot_ready_state BOOLEAN, -- see Section 1.2.7 1880 o conf_avail BOOLEAN, 1882 o integ_avail BOOLEAN, 1884 o lifetime_rec INTEGER -- in seconds, or reserved value for 1885 -- INDEFINITE 1887 This call may block pending network interactions for those mech_types 1888 in which an authentication server or other network entity must be 1889 consulted on behalf of a context initiator in order to generate an 1890 output_token suitable for presentation to a specified target. 1892 Return major_status codes: 1894 o GSS_S_COMPLETE indicates that context-level information was 1895 successfully initialized, and that the returned output_token 1896 will provide sufficient information for the target to perform 1897 per-message processing on the newly-established context. 1899 o GSS_S_CONTINUE_NEEDED indicates that control information in the 1900 returned output_token must be sent to the target, and that a 1901 reply must be received and passed as the input_token argument 1902 to a continuation call to GSS_Init_sec_context(), before 1903 per-message processing can be performed in conjunction with 1904 this context. 1906 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks 1907 performed on the input_token failed, preventing further 1908 processing from being performed based on that token. 1910 o GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks 1911 performed on the credential structure referenced by 1912 claimant_cred_handle failed, preventing further processing from 1913 being performed using that credential structure. 1915 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 1916 input_token contains an incorrect integrity check, so 1917 context setup cannot be accomplished. 1919 o GSS_S_NO_CRED indicates that no context was established, 1920 either because the input cred_handle was invalid, because the 1921 referenced credentials are valid for context acceptor use 1922 only, because the caller lacks authorization to access the 1923 referenced credentials, or because the resolution of default 1924 credentials failed. 1926 o GSS_S_CREDENTIALS_EXPIRED indicates that the credentials 1927 provided through the input claimant_cred_handle argument are no 1928 longer valid, so context establishment cannot be completed. 1930 o GSS_S_BAD_BINDINGS indicates that a mismatch between the 1931 caller-provided chan_bindings and those extracted from the 1932 input_token was detected, signifying a security-relevant 1933 event and preventing context establishment. (This result will 1934 be returned by GSS_Init_sec_context() only for contexts where 1935 mutual_state is TRUE.) 1937 o GSS_S_OLD_TOKEN indicates that the input_token is too old to 1938 be checked for integrity. This is a fatal error during context 1939 establishment. 1941 o GSS_S_DUPLICATE_TOKEN indicates that the input token has a 1942 correct integrity check, but is a duplicate of a token already 1943 processed. This is a fatal error during context establishment. 1945 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 1946 for the input context_handle provided; this major status will 1947 be returned only for successor calls following GSS_S_CONTINUE_ 1948 NEEDED status returns. 1950 o GSS_S_BAD_NAMETYPE indicates that the provided targ_name is 1951 of a type uninterpretable or unsupported by the applicable 1952 underlying GSS-API mechanism(s), so context establishment 1953 cannot be completed. 1955 o GSS_S_BAD_NAME indicates that the provided targ_name is 1956 inconsistent in terms of internally-incorporated type specifier 1957 information, so context establishment cannot be accomplished. 1959 o GSS_S_BAD_MECH indicates receipt of a context establishment token 1960 or of a caller request specifying a mechanism unsupported by 1961 the local system or with the caller's active credentials 1963 o GSS_S_FAILURE indicates that context setup could not be 1964 accomplished for reasons unspecified at the GSS-API level, and 1965 that no interface-defined recovery action is available. 1967 This routine is used by a context initiator, and ordinarily emits one 1968 (or, for the case of a multi-step exchange, more than one) 1969 output_token suitable for use by the target within the selected 1970 mech_type's protocol. Using information in the credentials structure 1971 referenced by claimant_cred_handle, GSS_Init_sec_context() 1972 initializes the data structures required to establish a security 1973 context with target targ_name. 1975 The targ_name may be any valid INTERNAL NAME; it need not be an MN. 1976 In addition to support for other name types, it is recommended (newly 1977 as of GSS-V2, Update 1) that mechanisms be able to accept 1978 GSS_C_NO_NAME as an input type for targ_name. While recommended, 1979 such support is not required, and it is recognized that not all 1980 mechanisms can construct tokens without explicitly naming the context 1981 target, even when mutual authentication of the target is not 1982 obtained. Callers wishing to make use of this facility and concerned 1983 with portability should be aware that support for GSS_C_NO_NAME as 1984 input targ_name type is unlikely to be provided within mechanism 1985 definitions specified prior to GSS-V2, Update 1. 1987 The claimant_cred_handle must correspond to the same valid 1988 credentials structure on the initial call to GSS_Init_sec_context() 1989 and on any successor calls resulting from GSS_S_CONTINUE_NEEDED 1990 status returns; different protocol sequences modeled by the 1991 GSS_S_CONTINUE_NEEDED facility will require access to credentials at 1992 different points in the context establishment sequence. 1994 The input_context_handle argument is 0, specifying "not yet 1995 assigned", on the first GSS_Init_sec_context() call relating to a 1996 given context. If successful (i.e., if accompanied by major_status 1997 GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the 1998 initial GSS_Init_sec_context() call returns a non-zero 1999 output_context_handle for use in future references to this context. 2000 Once a non-zero output_context_handle has been returned, GSS-API 2001 callers should call GSS_Delete_sec_context() to release context- 2002 related resources if errors occur in later phases of context 2003 establishment, or when an established context is no longer required. 2004 If GSS_Init_sec_context() is passed the handle of a context which is 2005 already fully established, GSS_S_FAILURE status is returned. 2007 When continuation attempts to GSS_Init_sec_context() are needed to 2008 perform context establishment, the previously-returned non-zero 2009 handle value is entered into the input_context_handle argument and 2010 will be echoed in the returned output_context_handle argument. On 2011 such continuation attempts (and only on continuation attempts) the 2012 input_token value is used, to provide the token returned from the 2013 context's target. 2015 The chan_bindings argument is used by the caller to provide 2016 information binding the security context to security-related 2017 characteristics (e.g., addresses, cryptographic keys) of the 2018 underlying communications channel. See Section 1.1.6 of this document 2019 for more discussion of this argument's usage. 2021 The input_token argument contains a message received from the target, 2022 and is significant only on a call to GSS_Init_sec_context() which 2023 follows a previous return indicating GSS_S_CONTINUE_NEEDED 2024 major_status. 2026 It is the caller's responsibility to establish a communications path 2027 to the target, and to transmit any returned output_token (independent 2028 of the accompanying returned major_status value) to the target over 2029 that path. The output_token can, however, be transmitted along with 2030 the first application-provided input message to be processed by 2031 GSS_GetMIC() or GSS_Wrap() in conjunction with a successfully- 2032 established context. 2034 The initiator may request various context-level functions through 2035 input flags: the deleg_req_flag requests delegation of access rights, 2036 the mutual_req_flag requests mutual authentication, the 2037 replay_det_req_flag requests that replay detection features be 2038 applied to messages transferred on the established context, and the 2039 sequence_req_flag requests that sequencing be enforced. (See Section 2040 1.2.3 for more information on replay detection and sequencing 2041 features.) The anon_req_flag requests that the initiator's identity 2042 not be transferred within tokens to be sent to the acceptor. The 2043 conf_req_flag and integ_req_flag provide informatory inputs to the 2044 GSS-API implementation as to whether, respectively, per-message 2045 confidentiality and per-message integrity services will be required 2046 on the context. 2048 Not all of the optionally-requestable features will be available in 2049 all underlying mech_types. The corresponding return state values 2050 deleg_state, mutual_state, replay_det_state, and sequence_state 2051 indicate, as a function of mech_type processing capabilities and 2052 initiator-provided input flags, the set of features which will be 2053 active on the context. The returned trans_state value indicates 2054 whether the context is transferable to other processes through use of 2055 GSS_Export_sec_context(). These state indicators' values are 2056 undefined unless either the routine's major_status indicates 2057 GSS_S_COMPLETE, or TRUE prot_ready_state is returned along with 2058 GSS_S_CONTINUE_NEEDED major_status; for the latter case, it is 2059 possible that additional features, not confirmed or indicated along 2060 with TRUE prot_ready_state, will be confirmed and indicated when 2061 GSS_S_COMPLETE is subsequently returned. 2063 The returned anon_state and prot_ready_state values are significant 2064 for both GSS_S_COMPLETE and GSS_S_CONTINUE_NEEDED major_status 2065 returns from GSS_Init_sec_context(). When anon_state is returned 2066 TRUE, this indicates that neither the current token nor its 2067 predecessors delivers or has delivered the initiator's identity. 2068 Callers wishing to perform context establishment only if anonymity 2069 support is provided should transfer a returned token from 2070 GSS_Init_sec_context() to the peer only if it is accompanied by a 2071 TRUE anon_state indicator. When prot_ready_state is returned TRUE in 2072 conjunction with GSS_S_CONTINUE_NEEDED major_status, this indicates 2073 that per-message protection operations may be applied on the context: 2074 see Section 1.2.7 for further discussion of this facility. 2076 Failure to provide the precise set of features requested by the 2077 caller does not cause context establishment to fail; it is the 2078 caller's prerogative to delete the context if the feature set 2079 provided is unsuitable for the caller's use. 2081 The returned mech_type value indicates the specific mechanism 2082 employed on the context; it will never indicate the value for 2083 "default". A valid mech_type result must be returned along with a 2084 GSS_S_COMPLETE status return; GSS-API implementations may (but are 2085 not required to) also return mech_type along with predecessor calls 2086 indicating GSS_S_CONTINUE_NEEDED status. For the case of mechanisms 2087 which themselves perform negotiation, the returned mech_type result 2088 may indicate selection of a mechanism identified by an OID different 2089 than that passed in the input mech_type argument, and the returned 2090 value may change between successive calls returning 2091 GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE. 2093 The conf_avail return value indicates whether the context supports 2094 per-message confidentiality services, and so informs the caller 2095 whether or not a request for encryption through the conf_req_flag 2096 input to GSS_Wrap() can be honored. In similar fashion, the 2097 integ_avail return value indicates whether per-message integrity 2098 services are available (through either GSS_GetMIC() or GSS_Wrap()) on 2099 the established context. These state indicators' values are undefined 2100 unless either the routine's major_status indicates GSS_S_COMPLETE, or 2101 TRUE prot_ready_state is returned along with GSS_S_CONTINUE_NEEDED 2102 major_status. 2104 The lifetime_req input specifies a desired upper bound for the 2105 lifetime of the context to be established, with a value of 0 used to 2106 request a default lifetime. The lifetime_rec return value indicates 2107 the length of time for which the context will be valid, expressed as 2108 an offset from the present; depending on mechanism capabilities, 2109 credential lifetimes, and local policy, it may not correspond to the 2110 value requested in lifetime_req. If no constraints on context 2111 lifetime are imposed, this may be indicated by returning a reserved 2112 value representing INDEFINITE lifetime_req. The value of lifetime_rec 2113 is undefined unless the routine's major_status indicates 2114 GSS_S_COMPLETE. 2116 If the mutual_state is TRUE, this fact will be reflected within the 2117 output_token. A call to GSS_Accept_sec_context() at the target in 2118 conjunction with such a context will return a token, to be processed 2119 by a continuation call to GSS_Init_sec_context(), in order to achieve 2120 mutual authentication. 2122 2.2.2: GSS_Accept_sec_context call 2124 Inputs: 2126 o acceptor_cred_handle CREDENTIAL HANDLE, -- NULL specifies 2127 -- "use default" 2129 o input_context_handle CONTEXT HANDLE, -- 0 specifies 2130 -- "not yet assigned" 2131 o chan_bindings OCTET STRING, 2133 o input_token OCTET STRING 2135 Outputs: 2137 o major_status INTEGER, 2139 o minor_status INTEGER, 2141 o src_name INTERNAL NAME, -- guaranteed to be MN 2142 -- once returned, caller must release with GSS_Release_name() 2144 o mech_type OBJECT IDENTIFIER, -- caller should treat as 2145 -- read-only; does not need to be released 2147 o output_context_handle CONTEXT HANDLE, -- once returned 2148 -- non-NULL in context establishment sequence, caller 2149 -- must release with GSS_Delete_sec_context() 2151 o deleg_state BOOLEAN, 2153 o mutual_state BOOLEAN, 2155 o replay_det_state BOOLEAN, 2157 o sequence_state BOOLEAN, 2159 o anon_state BOOLEAN, 2161 o trans_state BOOLEAN, 2163 o prot_ready_state BOOLEAN, -- see Section 1.2.7 for discussion 2165 o conf_avail BOOLEAN, 2167 o integ_avail BOOLEAN, 2169 o lifetime_rec INTEGER, -- in seconds, or reserved value for 2170 -- INDEFINITE 2172 o delegated_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL, 2173 -- caller must release with GSS_Release_cred() 2175 o output_token OCTET STRING -- NULL or token to pass to context 2176 -- initiator; if returned non-NULL, caller must release with 2177 -- GSS_Release_buffer() 2178 This call may block pending network interactions for those mech_types 2179 in which a directory service or other network entity must be 2180 consulted on behalf of a context acceptor in order to validate a 2181 received input_token. 2183 Return major_status codes: 2185 o GSS_S_COMPLETE indicates that context-level data structures 2186 were successfully initialized, and that per-message processing 2187 can now be performed in conjunction with this context. 2189 o GSS_S_CONTINUE_NEEDED indicates that control information in the 2190 returned output_token must be sent to the initiator, and that 2191 a response must be received and passed as the input_token 2192 argument to a continuation call to GSS_Accept_sec_context(), 2193 before per-message processing can be performed in conjunction 2194 with this context. 2196 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 2197 on the input_token failed, preventing further processing from 2198 being performed based on that token. 2200 o GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks 2201 performed on the credential structure referenced by 2202 acceptor_cred_handle failed, preventing further processing from 2203 being performed using that credential structure. 2205 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 2206 input_token contains an incorrect integrity check, so context 2207 setup cannot be accomplished. 2209 o GSS_S_DUPLICATE_TOKEN indicates that the integrity check on the 2210 received input_token was correct, but that the input_token 2211 was recognized as a duplicate of an input_token already 2212 processed. No new context is established. 2214 o GSS_S_OLD_TOKEN indicates that the integrity check on the received 2215 input_token was correct, but that the input_token is too old 2216 to be checked for duplication against previously-processed 2217 input_tokens. No new context is established. 2219 o GSS_S_NO_CRED indicates that no context was established, either 2220 because the input cred_handle was invalid, because the 2221 referenced credentials are valid for context initiator use 2222 only, because the caller lacks authorization to access the 2223 referenced credentials, or because the procedure for default 2224 credential resolution failed. 2226 o GSS_S_CREDENTIALS_EXPIRED indicates that the credentials provided 2227 through the input acceptor_cred_handle argument are no 2228 longer valid, so context establishment cannot be completed. 2230 o GSS_S_BAD_BINDINGS indicates that a mismatch between the 2231 caller-provided chan_bindings and those extracted from the 2232 input_token was detected, signifying a security-relevant 2233 event and preventing context establishment. 2235 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2236 for the input context_handle provided; this major status will 2237 be returned only for successor calls following GSS_S_CONTINUE_ 2238 NEEDED status returns. 2240 o GSS_S_BAD_MECH indicates receipt of a context establishment token 2241 specifying a mechanism unsupported by the local system or with 2242 the caller's active credentials. 2244 o GSS_S_FAILURE indicates that context setup could not be 2245 accomplished for reasons unspecified at the GSS-API level, and 2246 that no interface-defined recovery action is available. 2248 The GSS_Accept_sec_context() routine is used by a context target. 2249 Using information in the credentials structure referenced by the 2250 input acceptor_cred_handle, it verifies the incoming input_token and 2251 (following the successful completion of a context establishment 2252 sequence) returns the authenticated src_name and the mech_type used. 2253 The returned src_name is guaranteed to be an MN, processed by the 2254 mechanism under which the context was established. The 2255 acceptor_cred_handle must correspond to the same valid credentials 2256 structure on the initial call to GSS_Accept_sec_context() and on any 2257 successor calls resulting from GSS_S_CONTINUE_NEEDED status returns; 2258 different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED 2259 mechanism will require access to credentials at different points in 2260 the context establishment sequence. 2262 The input_context_handle argument is 0, specifying "not yet 2263 assigned", on the first GSS_Accept_sec_context() call relating to a 2264 given context. If successful (i.e., if accompanied by major_status 2265 GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the 2266 initial GSS_Accept_sec_context() call returns a non-zero 2267 output_context_handle for use in future references to this context. 2268 Once a non-zero output_context_handle has been returned, GSS-API 2269 callers should call GSS_Delete_sec_context() to release context- 2270 related resources if errors occur in later phases of context 2271 establishment, or when an established context is no longer required. 2272 If GSS_Accept_sec_context() is passed the handle of a context which 2273 is already fully established, GSS_S_FAILURE status is returned. 2275 The chan_bindings argument is used by the caller to provide 2276 information binding the security context to security-related 2277 characteristics (e.g., addresses, cryptographic keys) of the 2278 underlying communications channel. See Section 1.1.6 of this document 2279 for more discussion of this argument's usage. 2281 The returned state results (deleg_state, mutual_state, 2282 replay_det_state, sequence_state, anon_state, trans_state, and 2283 prot_ready_state) reflect the same information as described for 2284 GSS_Init_sec_context(), and their values are significant under the 2285 same return state conditions. 2287 The conf_avail return value indicates whether the context supports 2288 per-message confidentiality services, and so informs the caller 2289 whether or not a request for encryption through the conf_req_flag 2290 input to GSS_Wrap() can be honored. In similar fashion, the 2291 integ_avail return value indicates whether per-message integrity 2292 services are available (through either GSS_GetMIC() or GSS_Wrap()) 2293 on the established context. These values are significant under the 2294 same return state conditions as described under 2295 GSS_Init_sec_context(). 2297 The lifetime_rec return value is significant only in conjunction with 2298 GSS_S_COMPLETE major_status, and indicates the length of time for 2299 which the context will be valid, expressed as an offset from the 2300 present. 2302 The returned mech_type value indicates the specific mechanism 2303 employed on the context; it will never indicate the value for 2304 "default". A valid mech_type result must be returned whenever 2305 GSS_S_COMPLETE status is indicated; GSS-API implementations may (but 2306 are not required to) also return mech_type along with predecessor 2307 calls indicating GSS_S_CONTINUE_NEEDED status. For the case of 2308 mechanisms which themselves perform negotiation, the returned 2309 mech_type result may indicate selection of a mechanism identified by 2310 an OID different than that passed in the input mech_type argument, 2311 and the returned value may change between successive calls returning 2312 GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE. 2314 The delegated_cred_handle result is significant only when deleg_state 2315 is TRUE, and provides a means for the target to reference the 2316 delegated credentials. The output_token result, when non-NULL, 2317 provides a context-level token to be returned to the context 2318 initiator to continue a multi-step context establishment sequence. As 2319 noted with GSS_Init_sec_context(), any returned token should be 2320 transferred to the context's peer (in this case, the context 2321 initiator), independent of the value of the accompanying returned 2322 major_status. 2324 Note: A target must be able to distinguish a context-level 2325 input_token, which is passed to GSS_Accept_sec_context(), from the 2326 per-message data elements passed to GSS_VerifyMIC() or GSS_Unwrap(). 2327 These data elements may arrive in a single application message, and 2328 GSS_Accept_sec_context() must be performed before per-message 2329 processing can be performed successfully. 2331 2.2.3: GSS_Delete_sec_context call 2333 Input: 2335 o context_handle CONTEXT HANDLE 2337 Outputs: 2339 o major_status INTEGER, 2341 o minor_status INTEGER, 2343 o output_context_token OCTET STRING 2345 Return major_status codes: 2347 o GSS_S_COMPLETE indicates that the context was recognized, and that 2348 relevant context-specific information was flushed. If the caller 2349 provides a non-null buffer to receive an output_context_token, and 2350 the mechanism returns a non-NULL token into that buffer, the 2351 returned output_context_token is ready for transfer to the 2352 context's peer. 2354 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2355 for the input context_handle provided, so no deletion was 2356 performed. 2358 o GSS_S_FAILURE indicates that the context is recognized, but 2359 that the GSS_Delete_sec_context() operation could not be 2360 performed for reasons unspecified at the GSS-API level. 2362 This call can be made by either peer in a security context, to flush 2363 context-specific information. Once a non-zero output_context_handle 2364 has been returned by context establishment calls, GSS-API callers 2365 should call GSS_Delete_sec_context() to release context-related 2366 resources if errors occur in later phases of context establishment, 2367 or when an established context is no longer required. This call may 2368 block pending network interactions for mech_types in which active 2369 notification must be made to a central server when a security context 2370 is to be deleted. 2372 If a non-null output_context_token parameter is provided by the 2373 caller, an output_context_token may be returned to the caller. If an 2374 output_context_token is provided to the caller, it can be passed to 2375 the context's peer to inform the peer's GSS-API implementation that 2376 the peer's corresponding context information can also be flushed. 2377 (Once a context is established, the peers involved are expected to 2378 retain cached credential and context-related information until the 2379 information's expiration time is reached or until a 2380 GSS_Delete_sec_context() call is made.) 2382 The facility for context_token usage to signal context deletion is 2383 retained for compatibility with GSS-API Version 1. For current 2384 usage, it is recommended that both peers to a context invoke 2385 GSS_Delete_sec_context() independently, passing a null 2386 output_context_token buffer to indicate that no context_token is 2387 required. Implementations of GSS_Delete_sec_context() should delete 2388 relevant locally-stored context information. 2390 Attempts to perform per-message processing on a deleted context will 2391 result in error returns. 2393 2.2.4: GSS_Process_context_token call 2395 Inputs: 2397 o context_handle CONTEXT HANDLE, 2399 o input_context_token OCTET STRING 2401 Outputs: 2403 o major_status INTEGER, 2405 o minor_status INTEGER, 2407 Return major_status codes: 2409 o GSS_S_COMPLETE indicates that the input_context_token was 2410 successfully processed in conjunction with the context 2411 referenced by context_handle. 2413 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks 2414 performed on the received context_token failed, preventing 2415 further processing from being performed with that token. 2417 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2418 for the input context_handle provided. 2420 o GSS_S_FAILURE indicates that the context is recognized, but 2421 that the GSS_Process_context_token() operation could not be 2422 performed for reasons unspecified at the GSS-API level. 2424 This call is used to process context_tokens received from a peer once 2425 a context has been established, with corresponding impact on 2426 context-level state information. One use for this facility is 2427 processing of the context_tokens generated by 2428 GSS_Delete_sec_context(); GSS_Process_context_token() will not block 2429 pending network interactions for that purpose. Another use is to 2430 process tokens indicating remote-peer context establishment failures 2431 after the point where the local GSS-API implementation has already 2432 indicated GSS_S_COMPLETE status. 2434 2.2.5: GSS_Context_time call 2436 Input: 2438 o context_handle CONTEXT HANDLE, 2440 Outputs: 2442 o major_status INTEGER, 2444 o minor_status INTEGER, 2446 o lifetime_rec INTEGER -- in seconds, or reserved value for 2447 -- INDEFINITE 2449 Return major_status codes: 2451 o GSS_S_COMPLETE indicates that the referenced context is valid, 2452 and will remain valid for the amount of time indicated in 2453 lifetime_rec. 2455 o GSS_S_CONTEXT_EXPIRED indicates that data items related to the 2456 referenced context have expired. 2458 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2459 for the input context_handle provided. 2461 o GSS_S_FAILURE indicates that the requested operation failed for 2462 reasons unspecified at the GSS-API level. 2464 This call is used to determine the amount of time for which a 2465 currently established context will remain valid. 2467 2.2.6: GSS_Inquire_context call 2468 Input: 2470 o context_handle CONTEXT HANDLE, 2472 Outputs: 2474 o major_status INTEGER, 2476 o minor_status INTEGER, 2478 o src_name INTERNAL NAME, -- name of context initiator, 2479 -- guaranteed to be MN; 2480 -- caller must release with GSS_Release_name() if returned 2482 o targ_name INTERNAL NAME, -- name of context target, 2483 -- guaranteed to be MN; 2484 -- caller must release with GSS_Release_name() if returned 2486 o lifetime_rec INTEGER -- in seconds, or reserved value for 2487 -- INDEFINITE or EXPIRED 2489 o mech_type OBJECT IDENTIFIER, -- the mechanism supporting this 2490 -- security context; caller should treat as read-only and not 2491 -- attempt to release 2493 o deleg_state BOOLEAN, 2495 o mutual_state BOOLEAN, 2497 o replay_det_state BOOLEAN, 2499 o sequence_state BOOLEAN, 2501 o anon_state BOOLEAN, 2503 o trans_state BOOLEAN, 2505 o prot_ready_state BOOLEAN, 2507 o conf_avail BOOLEAN, 2509 o integ_avail BOOLEAN, 2511 o locally_initiated BOOLEAN, -- TRUE if initiator, FALSE if acceptor 2513 o open BOOLEAN, -- TRUE if context fully established, FALSE 2514 -- if partly established (in CONTINUE_NEEDED state) 2515 Return major_status codes: 2517 o GSS_S_COMPLETE indicates that the referenced context is valid 2518 and that lifetime_rec, mech_type, 2519 deleg_state, mutual_state, replay_det_state, sequence_state, 2520 anon_state, trans_state, prot_ready_state, conf_avail, 2521 integ_avail, locally_initiated, and open return values describe the 2522 corresponding characteristics of the context. If open is TRUE, 2523 src_name and targ_name are valid in addition to the values 2524 listed above. 2526 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2527 for the input context_handle provided. Return values other than 2528 major_status and minor_status are undefined. 2530 o GSS_S_FAILURE indicates that the requested operation failed for 2531 reasons unspecified at the GSS-API level. Return values other than 2532 major_status and minor_status are undefined. 2534 This call is used to extract information describing characteristics 2535 of a security context. Note that GSS-API implementations are 2536 expected to retain inquirable context data on a context until the 2537 context is released by a caller, even after the context has expired, 2538 although underlying cryptographic data elements may be deleted after 2539 expiration in order to limit their exposure. 2541 2.2.7: GSS_Wrap_size_limit call 2543 Inputs: 2545 o context_handle CONTEXT HANDLE, 2547 o qop INTEGER, 2549 o output_size INTEGER 2551 Outputs: 2553 o major_status INTEGER, 2555 o minor_status INTEGER, 2557 o max_input_size INTEGER 2559 Return major_status codes: 2561 o GSS_S_COMPLETE indicates a successful token size determination: 2562 an input message with a length in octets equal to the 2563 returned max_input_size value will, when passed to GSS_Wrap() 2564 for processing on the context identified by the context_handle 2565 parameter and with the quality of protection specifier provided 2566 in the qop parameter, yield an output token no larger than the 2567 value of the provided output_size parameter. 2569 o GSS_S_CONTEXT_EXPIRED indicates that the provided input 2570 context_handle is recognized, but that the referenced context has 2571 expired. Return values other than major_status and minor_status 2572 are undefined. 2574 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2575 for the input context_handle provided. Return values other than 2576 major_status and minor_status are undefined. 2578 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2579 recognized or supported for the context. 2581 o GSS_S_FAILURE indicates that the requested operation failed for 2582 reasons unspecified at the GSS-API level. Return values other than 2583 major_status and minor_status are undefined. 2585 This call is used to determine the largest input datum which may be 2586 passed to GSS_Wrap() without yielding an output token larger than a 2587 caller-specified value. 2589 2.2.8: GSS_Export_sec_context call 2591 Inputs: 2593 o context_handle CONTEXT HANDLE 2595 Outputs: 2597 o major_status INTEGER, 2599 o minor_status INTEGER, 2601 o interprocess_token OCTET STRING -- caller must release 2602 -- with GSS_Release_buffer() 2604 Return major_status codes: 2606 o GSS_S_COMPLETE indicates that the referenced context has been 2607 successfully exported to a representation in the interprocess_token, 2608 and is no longer available for use by the caller. 2610 o GSS_S_UNAVAILABLE indicates that the context export facility 2611 is not available for use on the referenced context. (This status 2612 should occur only for contexts for which the trans_state value is 2613 FALSE.) Return values other than major_status and minor_status are 2614 undefined. 2616 o GSS_S_CONTEXT_EXPIRED indicates that the provided input 2617 context_handle is recognized, but that the referenced context has 2618 expired. Return values other than major_status and minor_status 2619 are undefined. 2621 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2622 for the input context_handle provided. Return values other than 2623 major_status and minor_status are undefined. 2625 o GSS_S_FAILURE indicates that the requested operation failed for 2626 reasons unspecified at the GSS-API level. Return values other than 2627 major_status and minor_status are undefined. 2629 This call generates an interprocess token for transfer to another 2630 process within an end system, in order to transfer control of a 2631 security context to that process. The recipient of the interprocess 2632 token will call GSS_Import_sec_context() to accept the transfer. The 2633 GSS_Export_sec_context() operation is defined for use only with 2634 security contexts which are fully and successfully established (i.e., 2635 those for which GSS_Init_sec_context() and GSS_Accept_sec_context() 2636 have returned GSS_S_COMPLETE major_status). 2638 A successful GSS_Export_sec_context() operation deactivates the 2639 security context for the calling process; for this case, the GSS-API 2640 implementation shall deallocate all process-wide resources associated 2641 with the security context and shall set the context_handle to 2642 GSS_C_NO_CONTEXT. In the event of an error that makes it impossible 2643 to complete export of the security context, the GSS-API 2644 implementation must not return an interprocess token and should 2645 strive to leave the security context referenced by the context_handle 2646 untouched. If this is impossible, it is permissible for the 2647 implementation to delete the security context, provided that it also 2648 sets te context_handle parameter to GSS_C_NO_CONTEXT. 2650 Portable callers must not assume that a given interprocess token can 2651 be imported by GSS_Import_sec_context() more than once, thereby 2652 creating multiple instantiations of a single context. GSS-API 2653 implementations may detect and reject attempted multiple imports, but 2654 are not required to do so. 2656 The internal representation contained within the interprocess token 2657 is an implementation-defined local matter. Interprocess tokens 2658 cannot be assumed to be transferable across different GSS-API 2659 implementations. 2661 It is recommended that GSS-API implementations adopt policies suited 2662 to their operational environments in order to define the set of 2663 processes eligible to import a context, but specific constraints in 2664 this area are local matters. Candidate examples include transfers 2665 between processes operating on behalf of the same user identity, or 2666 processes comprising a common job. However, it may be impossible to 2667 enforce such policies in some implementations. 2669 In support of the above goals, implementations may protect the 2670 transferred context data by using cryptography to protect data within 2671 the interprocess token, or by using interprocess tokens as a means to 2672 reference local interprocess communication facilities (protected by 2673 other means) rather than storing the context data directly within the 2674 tokens. 2676 Transfer of an open context may, for certain mechanisms and 2677 implementations, reveal data about the credential which was used to 2678 establish the context. Callers should, therefore, be cautious about 2679 the trustworthiness of processes to which they transfer contexts. 2680 Although the GSS-API implementation may provide its own set of 2681 protections over the exported context, the caller is responsible for 2682 protecting the interprocess token from disclosure, and for taking 2683 care that the context is transferred to an appropriate destination 2684 process. 2686 2.2.9: GSS_Import_sec_context call 2688 Inputs: 2690 o interprocess_token OCTET STRING 2692 Outputs: 2694 o major_status INTEGER, 2696 o minor_status INTEGER, 2698 o context_handle CONTEXT HANDLE -- if successfully returned, 2699 -- caller must release with GSS_Delete_sec_context() 2701 Return major_status codes: 2703 o GSS_S_COMPLETE indicates that the context represented by the 2704 input interprocess_token has been successfully transferred to 2705 the caller, and is available for future use via the output 2706 context_handle. 2708 o GSS_S_CONTEXT_EXPIRED indicates that the context represented by 2709 the input interprocess_token has expired. Return values other 2710 than major_status and minor_status are undefined. 2712 o GSS_S_NO_CONTEXT indicates that the context represented by the 2713 input interprocess_token was invalid. Return values other than 2714 major_status and minor_status are undefined. 2716 o GSS_S_DEFECTIVE_TOKEN indicates that the input interprocess_token 2717 was defective. Return values other than major_status and 2718 minor_status are undefined. 2720 o GSS_S_UNAVAILABLE indicates that the context import facility 2721 is not available for use on the referenced context. Return values 2722 other than major_status and minor_status are undefined. 2724 o GSS_S_UNAUTHORIZED indicates that the context represented by 2725 the input interprocess_token is unauthorized for transfer to the 2726 caller. Return values other than major_status and minor_status 2727 are undefined. 2729 o GSS_S_FAILURE indicates that the requested operation failed for 2730 reasons unspecified at the GSS-API level. Return values other than 2731 major_status and minor_status are undefined. 2733 This call processes an interprocess token generated by 2734 GSS_Export_sec_context(), making the transferred context available 2735 for use by the caller. After a successful GSS_Import_sec_context() 2736 operation, the imported context is available for use by the importing 2737 process. In particular, the imported context is usable for all per- 2738 message operations and may be deleted or exported by its importer. 2739 The inability to receive delegated credentials through 2740 gss_import_sec_context() precludes establishment of new contexts 2741 based on information delegated to the importer's end system within 2742 the context which is being imported, unless those delegated 2743 credentials are obtained through separate routines (e.g., XGSS-API 2744 calls) outside the GSS-V2 definition. 2746 For further discussion of the security and authorization issues 2747 regarding this call, please see the discussion in Section 2.2.8. 2749 2.3: Per-message calls 2751 This group of calls is used to perform per-message protection 2752 processing on an established security context. None of these calls 2753 block pending network interactions. These calls may be invoked by a 2754 context's initiator or by the context's target. The four members of 2755 this group should be considered as two pairs; the output from 2756 GSS_GetMIC() is properly input to GSS_VerifyMIC(), and the output 2757 from GSS_Wrap() is properly input to GSS_Unwrap(). 2759 GSS_GetMIC() and GSS_VerifyMIC() support data origin authentication 2760 and data integrity services. When GSS_GetMIC() is invoked on an input 2761 message, it yields a per-message token containing data items which 2762 allow underlying mechanisms to provide the specified security 2763 services. The original message, along with the generated per-message 2764 token, is passed to the remote peer; these two data elements are 2765 processed by GSS_VerifyMIC(), which validates the message in 2766 conjunction with the separate token. 2768 GSS_Wrap() and GSS_Unwrap() support caller-requested confidentiality 2769 in addition to the data origin authentication and data integrity 2770 services offered by GSS_GetMIC() and GSS_VerifyMIC(). GSS_Wrap() 2771 outputs a single data element, encapsulating optionally enciphered 2772 user data as well as associated token data items. The data element 2773 output from GSS_Wrap() is passed to the remote peer and processed by 2774 GSS_Unwrap() at that system. GSS_Unwrap() combines decipherment (as 2775 required) with validation of data items related to authentication and 2776 integrity. 2778 Although zero-length tokens are never returned by GSS calls for 2779 transfer to a context's peer, a zero-length object may be passed by a 2780 caller into GSS_Wrap(), in which case the corresponding peer calling 2781 GSS_Unwrap() on the transferred token will receive a zero-length 2782 object as output from GSS_Unwrap(). Similarly, GSS_GetMIC() can be 2783 called on an empty object, yielding a MIC which GSS_VerifyMIC() will 2784 successfully verify against the active security context in 2785 conjunction with a zero-length object. 2787 2.3.1: GSS_GetMIC call 2789 Note: This call is functionally equivalent to the GSS_Sign call as 2790 defined in previous versions of this specification. In the interests 2791 of backward compatibility, it is recommended that implementations 2792 support this function under both names for the present; future 2793 references to this function as GSS_Sign are deprecated. 2795 Inputs: 2797 o context_handle CONTEXT HANDLE, 2799 o qop_req INTEGER, -- 0 specifies default QOP 2801 o message OCTET STRING 2803 Internet-Draft 19 February 2804 1998 2806 Outputs: 2808 o major_status INTEGER, 2810 o minor_status INTEGER, 2812 o per_msg_token OCTET STRING -- caller must release 2813 -- with GSS_Release_buffer() 2815 Return major_status codes: 2817 o GSS_S_COMPLETE indicates that an integrity check, suitable for an 2818 established security context, was successfully applied and 2819 that the message and corresponding per_msg_token are ready 2820 for transmission. 2822 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2823 items have expired, so that the requested operation cannot be 2824 performed. 2826 o GSS_S_NO_CONTEXT indicates that no context was recognized 2827 for the input context_handle provided. 2829 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2830 recognized or supported for the context. 2832 o GSS_S_FAILURE indicates that the context is recognized, but 2833 that the requested operation could not be performed for 2834 reasons unspecified at the GSS-API level. 2836 Using the security context referenced by context_handle, apply an 2837 integrity check to the input message (along with timestamps and/or 2838 other data included in support of mech_type-specific mechanisms) and 2839 return the result in per_msg_token. The qop_req parameter, 2840 interpretation of which is discussed in Section 1.2.4, allows 2841 quality-of-protection control. The caller passes the message and the 2842 per_msg_token to the target. 2844 The GSS_GetMIC() function completes before the message and 2845 per_msg_token is sent to the peer; successful application of 2846 GSS_GetMIC() does not guarantee that a corresponding GSS_VerifyMIC() 2847 has been (or can necessarily be) performed successfully when the 2848 message arrives at the destination. 2850 Mechanisms which do not support per-message protection services 2851 should return GSS_S_FAILURE if this routine is called. 2853 2.3.2: GSS_VerifyMIC call 2854 Note: This call is functionally equivalent to the GSS_Verify call as 2855 defined in previous versions of this specification. In the interests 2856 of backward compatibility, it is recommended that implementations 2857 support this function under both names for the present; future 2858 references to this function as GSS_Verify are deprecated. 2860 Inputs: 2862 o context_handle CONTEXT HANDLE, 2864 o message OCTET STRING, 2866 o per_msg_token OCTET STRING 2868 Outputs: 2870 o qop_state INTEGER, 2872 o major_status INTEGER, 2874 o minor_status INTEGER, 2876 Return major_status codes: 2878 o GSS_S_COMPLETE indicates that the message was successfully 2879 verified. 2881 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 2882 on the received per_msg_token failed, preventing 2883 further processing from being performed with that token. 2885 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 2886 per_msg_token contains an incorrect integrity check for the 2887 message. 2889 o GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, 2890 and GSS_S_GAP_TOKEN values appear in conjunction with the 2891 optional per-message replay detection features described 2892 in Section 1.2.3; their semantics are described in that section. 2894 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2895 items have expired, so that the requested operation cannot be 2896 performed. 2898 o GSS_S_NO_CONTEXT indicates that no context was recognized 2899 for the input context_handle provided. 2901 o GSS_S_FAILURE indicates that the context is recognized, but 2902 that the GSS_VerifyMIC() operation could not be performed for 2903 reasons unspecified at the GSS-API level. 2905 Using the security context referenced by context_handle, verify that 2906 the input per_msg_token contains an appropriate integrity check for 2907 the input message, and apply any active replay detection or 2908 sequencing features. Returns an indication of the quality-of- 2909 protection applied to the processed message in the qop_state result. 2911 Mechanisms which do not support per-message protection services 2912 should return GSS_S_FAILURE if this routine is called. 2914 2.3.3: GSS_Wrap call 2916 Note: This call is functionally equivalent to the GSS_Seal call as 2917 defined in previous versions of this specification. In the interests 2918 of backward compatibility, it is recommended that implementations 2919 support this function under both names for the present; future 2920 references to this function as GSS_Seal are deprecated. 2922 Inputs: 2924 o context_handle CONTEXT HANDLE, 2926 o conf_req_flag BOOLEAN, 2928 o qop_req INTEGER, -- 0 specifies default QOP 2930 o input_message OCTET STRING 2932 Outputs: 2934 o major_status INTEGER, 2936 o minor_status INTEGER, 2938 o conf_state BOOLEAN, 2940 o output_message OCTET STRING -- caller must release with 2941 -- GSS_Release_buffer() 2943 Return major_status codes: 2945 o GSS_S_COMPLETE indicates that the input_message was successfully 2946 processed and that the output_message is ready for 2947 transmission. 2949 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2950 items have expired, so that the requested operation cannot be 2951 performed. 2953 o GSS_S_NO_CONTEXT indicates that no context was recognized 2954 for the input context_handle provided. 2956 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2957 recognized or supported for the context. 2959 o GSS_S_FAILURE indicates that the context is recognized, but 2960 that the GSS_Wrap() operation could not be performed for 2961 reasons unspecified at the GSS-API level. 2963 Performs the data origin authentication and data integrity functions 2964 of GSS_GetMIC(). If the input conf_req_flag is TRUE, requests that 2965 confidentiality be applied to the input_message. Confidentiality may 2966 not be supported in all mech_types or by all implementations; the 2967 returned conf_state flag indicates whether confidentiality was 2968 provided for the input_message. The qop_req parameter, interpretation 2969 of which is discussed in Section 1.2.4, allows quality-of-protection 2970 control. 2972 In all cases, the GSS_Wrap() call yields a single output_message data 2973 element containing (optionally enciphered) user data as well as 2974 control information. 2976 Mechanisms which do not support per-message protection services 2977 should return GSS_S_FAILURE if this routine is called. 2979 2.3.4: GSS_Unwrap call 2981 Note: This call is functionally equivalent to the GSS_Unseal call as 2982 defined in previous versions of this specification. In the interests 2983 of backward compatibility, it is recommended that implementations 2984 support this function under both names for the present; future 2985 references to this function as GSS_Unseal are deprecated. 2987 Inputs: 2989 o context_handle CONTEXT HANDLE, 2991 o input_message OCTET STRING 2993 Outputs: 2995 o conf_state BOOLEAN, 2997 o qop_state INTEGER, 2998 o major_status INTEGER, 3000 o minor_status INTEGER, 3002 o output_message OCTET STRING -- caller must release with 3003 -- GSS_Release_buffer() 3005 Return major_status codes: 3007 o GSS_S_COMPLETE indicates that the input_message was 3008 successfully processed and that the resulting output_message is 3009 available. 3011 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 3012 on the per_msg_token extracted from the input_message 3013 failed, preventing further processing from being performed. 3015 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that an incorrect 3016 integrity check was detected for the message. 3018 o GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, 3019 and GSS_S_GAP_TOKEN values appear in conjunction with the 3020 optional per-message replay detection features described 3021 in Section 1.2.3; their semantics are described in that section. 3023 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 3024 items have expired, so that the requested operation cannot be 3025 performed. 3027 o GSS_S_NO_CONTEXT indicates that no context was recognized 3028 for the input context_handle provided. 3030 o GSS_S_FAILURE indicates that the context is recognized, but 3031 that the GSS_Unwrap() operation could not be performed for 3032 reasons unspecified at the GSS-API level. 3034 Processes a data element generated (and optionally enciphered) by 3035 GSS_Wrap(), provided as input_message. The returned conf_state value 3036 indicates whether confidentiality was applied to the input_message. 3037 If conf_state is TRUE, GSS_Unwrap() has deciphered the input_message. 3038 Returns an indication of the quality-of-protection applied to the 3039 processed message in the qop_state result. GSS_Unwrap() performs the 3040 data integrity and data origin authentication checking functions of 3041 GSS_VerifyMIC() on the plaintext data. Plaintext data is returned in 3042 output_message. 3044 Mechanisms which do not support per-message protection services 3045 should return GSS_S_FAILURE if this routine is called. 3047 2.4: Support calls 3049 This group of calls provides support functions useful to GSS-API 3050 callers, independent of the state of established contexts. Their 3051 characterization with regard to blocking or non-blocking status in 3052 terms of network interactions is unspecified. 3054 2.4.1: GSS_Display_status call 3056 Inputs: 3058 o status_value INTEGER, -- GSS-API major_status or minor_status 3059 -- return value 3061 o status_type INTEGER, -- 1 if major_status, 2 if minor_status 3063 o mech_type OBJECT IDENTIFIER -- mech_type to be used for 3064 -- minor_status translation 3066 Outputs: 3068 o major_status INTEGER, 3070 o minor_status INTEGER, 3072 o status_string_set SET OF OCTET STRING -- required calls for 3073 -- release by caller are specific to language bindings 3075 Return major_status codes: 3077 o GSS_S_COMPLETE indicates that a valid printable status 3078 representation (possibly representing more than one status event 3079 encoded within the status_value) is available in the returned 3080 status_string_set. 3082 o GSS_S_BAD_MECH indicates that translation in accordance with an 3083 unsupported mech_type was requested, so translation could not 3084 be performed. 3086 o GSS_S_BAD_STATUS indicates that the input status_value was 3087 invalid, or that the input status_type carried a value other 3088 than 1 or 2, so translation could not be performed. 3090 o GSS_S_FAILURE indicates that the requested operation could not 3091 be performed for reasons unspecified at the GSS-API level. 3093 Provides a means for callers to translate GSS-API-returned major and 3094 minor status codes into printable string representations. Note: some 3095 language bindings may employ an iterative approach in order to emit 3096 successive status components; this approach is acceptable but not 3097 required for conformance with the current specification. 3099 Although not contemplated in [RFC-2078], it has been observed that 3100 some existing GSS-API implementations return GSS_S_CONTINUE_NEEDED 3101 status when iterating through successive messages returned from 3102 GSS_Display_status(). This behavior is deprecated; 3103 GSS_S_CONTINUE_NEEDED should be returned only by 3104 GSS_Init_sec_context() and GSS_Accept_sec_context(). For maximal 3105 portability, however, it is recommended that defensive callers be 3106 able to accept and ignore GSS_S_CONTINUE_NEEDED status if indicated 3107 by GSS_Display_status() or any other call other than 3108 GSS_Init_sec_context() or GSS_Accept_sec_context(). 3110 2.4.2: GSS_Indicate_mechs call 3112 Input: 3114 o (none) 3116 Outputs: 3118 o major_status INTEGER, 3120 o minor_status INTEGER, 3122 o mech_set SET OF OBJECT IDENTIFIER -- caller must release 3123 -- with GSS_Release_oid_set() 3125 Return major_status codes: 3127 o GSS_S_COMPLETE indicates that a set of available mechanisms has 3128 been returned in mech_set. 3130 o GSS_S_FAILURE indicates that the requested operation could not 3131 be performed for reasons unspecified at the GSS-API level. 3133 Allows callers to determine the set of mechanism types available on 3134 the local system. This call is intended for support of specialized 3135 callers who need to request non-default mech_type sets from GSS-API 3136 calls which accept input mechanism type specifiers. 3138 2.4.3: GSS_Compare_name call 3140 Inputs: 3142 o name1 INTERNAL NAME, 3143 o name2 INTERNAL NAME 3145 Outputs: 3147 o major_status INTEGER, 3149 o minor_status INTEGER, 3151 o name_equal BOOLEAN 3153 Return major_status codes: 3155 o GSS_S_COMPLETE indicates that name1 and name2 were comparable, 3156 and that the name_equal result indicates whether name1 and 3157 name2 represent the same entity. 3159 o GSS_S_BAD_NAMETYPE indicates that 3160 the two input names' types are different and incomparable, so that 3161 the comparison operation could not be completed. 3163 o GSS_S_BAD_NAME indicates that one or both of the input names 3164 was ill-formed in terms of its internal type specifier, so 3165 the comparison operation could not be completed. 3167 o GSS_S_FAILURE indicates that the call's operation could not 3168 be performed for reasons unspecified at the GSS-API level. 3170 Allows callers to compare two internal name representations to 3171 determine whether they refer to the same entity. If either name 3172 presented to GSS_Compare_name() denotes an anonymous principal, 3173 GSS_Compare_name() shall indicate FALSE. It is not required that 3174 either or both inputs name1 and name2 be MNs; for some 3175 implementations and cases, GSS_S_BAD_NAMETYPE may be returned, 3176 indicating name incomparability, for the case where neither input 3177 name is an MN. 3179 2.4.4: GSS_Display_name call 3181 Inputs: 3183 o name INTERNAL NAME 3185 Outputs: 3187 o major_status INTEGER, 3189 o minor_status INTEGER, 3190 o name_string OCTET STRING, -- caller must release 3191 -- with GSS_Release_buffer() 3193 o name_type OBJECT IDENTIFIER -- caller should treat 3194 -- as read-only; does not need to be released 3196 Return major_status codes: 3198 o GSS_S_COMPLETE indicates that a valid printable name 3199 representation is available in the returned name_string. 3201 o GSS_S_BAD_NAME indicates that the contents of the provided name 3202 were inconsistent with the internally-indicated name type, so 3203 no printable representation could be generated. 3205 o GSS_S_FAILURE indicates that the requested operation could not 3206 be performed for reasons unspecified at the GSS-API level. 3208 Allows callers to translate an internal name representation into a 3209 printable form with associated namespace type descriptor. The syntax 3210 of the printable form is a local matter. 3212 If the input name represents an anonymous identity, a reserved value 3213 (GSS_C_NT_ANONYMOUS) shall be returned for name_type. 3215 The GSS_C_NO_OID name type is to be returned only when the 3216 corresponding internal name was created through import with 3217 GSS_C_NO_OID. It is acceptable for mechanisms to normalize names 3218 imported with GSS_C_NO_OID into other supported types and, therefore, 3219 to display them with types other than GSS_C_NO_OID. 3221 2.4.5: GSS_Import_name call 3223 Inputs: 3225 o input_name_string OCTET STRING, 3227 o input_name_type OBJECT IDENTIFIER 3229 Outputs: 3231 o major_status INTEGER, 3233 o minor_status INTEGER, 3235 o output_name INTERNAL NAME -- caller must release with 3236 -- GSS_Release_name() 3237 Return major_status codes: 3239 o GSS_S_COMPLETE indicates that a valid name representation is 3240 output in output_name and described by the type value in 3241 output_name_type. 3243 o GSS_S_BAD_NAMETYPE indicates that the input_name_type is 3244 unsupported by the applicable underlying GSS-API mechanism(s), 3245 so the import operation could not be completed. 3247 o GSS_S_BAD_NAME indicates that the provided input_name_string 3248 is ill-formed in terms of the input_name_type, so the import 3249 operation could not be completed. 3251 o GSS_S_BAD_MECH indicates that the input presented for import was 3252 an exported name object and that its enclosed mechanism type was not 3253 recognized or was unsupported by the GSS-API implementation. 3255 o GSS_S_FAILURE indicates that the requested operation could not 3256 be performed for reasons unspecified at the GSS-API level. 3258 Allows callers to provide a name representation as a contiguous octet 3259 string, designate the type of namespace in conjunction with which it 3260 should be parsed, and convert that representation to an internal form 3261 suitable for input to other GSS-API routines. The syntax of the 3262 input_name_string is defined in conjunction with its associated name 3263 type; depending on the input_name_type, the associated 3264 input_name_string may or may not be a printable string. If the 3265 input_name_type's value is GSS_C_NO_OID, a mechanism-specific default 3266 printable syntax (which shall be specified in the corresponding GSS- 3267 V2 mechanism specification) is assumed for the input_name_string; 3268 other input_name_type values as registered by GSS-API implementations 3269 can be used to indicate specific non-default name syntaxes. Note: The 3270 input_name_type argument serves to describe and qualify the 3271 interpretation of the associated input_name_string; it does not 3272 specify the data type of the returned output_name. 3274 If a mechanism claims support for a particular name type, its 3275 GSS_Import_name() operation shall be able to accept all possible 3276 values conformant to the external name syntax as defined for that 3277 name type. These imported values may correspond to: 3279 (1) locally registered entities (for which credentials may be 3280 acquired), 3282 (2) non-local entities (for which local credentials cannot be 3283 acquired, but which may be referenced as targets of initiated 3284 security contexts or initiators of accepted security contexts), 3285 or to 3287 (3) neither of the above. 3289 Determination of whether a particular name belongs to class (1), (2), 3290 or (3) as described above is not guaranteed to be performed by the 3291 GSS_Import_name() function. 3293 The internal name generated by a GSS_Import_name() operation may be a 3294 single-mechanism MN, and is likely to be an MN within a single- 3295 mechanism implementation, but portable callers must not depend on 3296 this property (and must not, therefore, assume that the output from 3297 GSS_Import_name() can be passed directly to GSS_Export_name() without 3298 first being processed through GSS_Canonicalize_name()). 3300 2.4.6: GSS_Release_name call 3302 Inputs: 3304 o name INTERNAL NAME 3306 Outputs: 3308 o major_status INTEGER, 3310 o minor_status INTEGER 3312 Return major_status codes: 3314 o GSS_S_COMPLETE indicates that the storage associated with the 3315 input name was successfully released. 3317 o GSS_S_BAD_NAME indicates that the input name argument did not 3318 contain a valid name. 3320 o GSS_S_FAILURE indicates that the requested operation could not 3321 be performed for reasons unspecified at the GSS-API level. 3323 Allows callers to release the storage associated with an internal 3324 name representation. This call's specific behavior depends on the 3325 language and programming environment within which a GSS-API 3326 implementation operates, and is therefore detailed within applicable 3327 bindings specifications; in particular, implementation and invocation 3328 of this call may be superfluous (and may be omitted) within bindings 3329 where memory management is automatic. 3331 2.4.7: GSS_Release_buffer call 3332 Inputs: 3334 o buffer OCTET STRING 3336 Outputs: 3338 o major_status INTEGER, 3340 o minor_status INTEGER 3342 Return major_status codes: 3344 o GSS_S_COMPLETE indicates that the storage associated with the 3345 input buffer was successfully released. 3347 o GSS_S_FAILURE indicates that the requested operation could not 3348 be performed for reasons unspecified at the GSS-API level. 3350 Allows callers to release the storage associated with an OCTET STRING 3351 buffer allocated by another GSS-API call. This call's specific 3352 behavior depends on the language and programming environment within 3353 which a GSS-API implementation operates, and is therefore detailed 3354 within applicable bindings specifications; in particular, 3355 implementation and invocation of this call may be superfluous (and 3356 may be omitted) within bindings where memory management is automatic. 3358 2.4.8: GSS_Release_OID_set call 3360 Inputs: 3362 o buffer SET OF OBJECT IDENTIFIER 3364 Outputs: 3366 o major_status INTEGER, 3368 o minor_status INTEGER 3370 Return major_status codes: 3372 o GSS_S_COMPLETE indicates that the storage associated with the 3373 input object identifier set was successfully released. 3375 o GSS_S_FAILURE indicates that the requested operation could not 3376 be performed for reasons unspecified at the GSS-API level. 3378 Allows callers to release the storage associated with an object 3379 identifier set object allocated by another GSS-API call. This call's 3380 specific behavior depends on the language and programming environment 3381 within which a GSS-API implementation operates, and is therefore 3382 detailed within applicable bindings specifications; in particular, 3383 implementation and invocation of this call may be superfluous (and 3384 may be omitted) within bindings where memory management is automatic. 3386 2.4.9: GSS_Create_empty_OID_set call 3388 Inputs: 3390 o (none) 3392 Outputs: 3394 o major_status INTEGER, 3396 o minor_status INTEGER, 3398 o oid_set SET OF OBJECT IDENTIFIER -- caller must release 3399 -- with GSS_Release_oid_set() 3401 Return major_status codes: 3403 o GSS_S_COMPLETE indicates successful completion 3405 o GSS_S_FAILURE indicates that the operation failed 3407 Creates an object identifier set containing no object identifiers, to 3408 which members may be subsequently added using the 3409 GSS_Add_OID_set_member() routine. These routines are intended to be 3410 used to construct sets of mechanism object identifiers, for input to 3411 GSS_Acquire_cred(). 3413 2.4.10: GSS_Add_OID_set_member call 3415 Inputs: 3417 o member_oid OBJECT IDENTIFIER, 3419 o oid_set SET OF OBJECT IDENTIFIER 3421 Outputs: 3423 o major_status INTEGER, 3425 o minor_status INTEGER, 3426 Return major_status codes: 3428 o GSS_S_COMPLETE indicates successful completion 3430 o GSS_S_FAILURE indicates that the operation failed 3432 Adds an Object Identifier to an Object Identifier set. This routine 3433 is intended for use in conjunction with GSS_Create_empty_OID_set() 3434 when constructing a set of mechanism OIDs for input to 3435 GSS_Acquire_cred(). 3437 2.4.11: GSS_Test_OID_set_member call 3439 Inputs: 3441 o member OBJECT IDENTIFIER, 3443 o set SET OF OBJECT IDENTIFIER 3445 Outputs: 3447 o major_status INTEGER, 3449 o minor_status INTEGER, 3451 o present BOOLEAN 3453 Return major_status codes: 3455 o GSS_S_COMPLETE indicates successful completion 3457 o GSS_S_FAILURE indicates that the operation failed 3459 Interrogates an Object Identifier set to determine whether a 3460 specified Object Identifier is a member. This routine is intended to 3461 be used with OID sets returned by GSS_Indicate_mechs(), 3462 GSS_Acquire_cred(), and GSS_Inquire_cred(). 3464 2.4.12: GSS_Inquire_names_for_mech call 3466 Input: 3468 o input_mech_type OBJECT IDENTIFIER, -- mechanism type 3470 Outputs: 3472 o major_status INTEGER, 3474 o minor_status INTEGER, 3476 o name_type_set SET OF OBJECT IDENTIFIER -- caller must release 3477 -- with GSS_Release_oid_set() 3479 Return major_status codes: 3481 o GSS_S_COMPLETE indicates that the output name_type_set contains 3482 a list of name types which are supported by the locally available 3483 mechanism identified by input_mech_type. 3485 o GSS_S_BAD_MECH indicates that the mechanism identified by 3486 input_mech_type was unsupported within the local implementation, 3487 causing the query to fail. 3489 o GSS_S_FAILURE indicates that the requested operation could not 3490 be performed for reasons unspecified at the GSS-API level. 3492 Allows callers to determine the set of name types which are 3493 supportable by a specific locally-available mechanism. 3495 2.4.13: GSS_Inquire_mechs_for_name call 3497 Inputs: 3499 o input_name INTERNAL NAME, 3501 Outputs: 3503 o major_status INTEGER, 3505 o minor_status INTEGER, 3507 o mech_types SET OF OBJECT IDENTIFIER -- caller must release 3508 -- with GSS_Release_oid_set() 3510 Return major_status codes: 3512 o GSS_S_COMPLETE indicates that a set of object identifiers, 3513 corresponding to the set of mechanisms suitable for processing 3514 the input_name, is available in mech_types. 3516 o GSS_S_BAD_NAME indicates that the input_name was ill-formed 3517 and could not be processed. 3519 o GSS_S_BAD_NAMETYPE indicates that the input_name parameter 3520 contained an invalid name type or a name type unsupported 3521 by the GSS-API implementation. 3523 o GSS_S_FAILURE indicates that the requested operation could not 3524 be performed for reasons unspecified at the GSS-API level. 3526 This routine returns the mechanism set with which the input_name may 3527 be processed. 3529 Each mechanism returned will recognize at least one element within 3530 the name. It is permissible for this routine to be implemented within 3531 a mechanism-independent GSS-API layer, using the type information 3532 contained within the presented name, and based on registration 3533 information provided by individual mechanism implementations. This 3534 means that the returned mech_types result may indicate that a 3535 particular mechanism will understand a particular name when in fact 3536 it would refuse to accept that name as input to 3537 GSS_Canonicalize_name(), GSS_Init_sec_context(), GSS_Acquire_cred(), 3538 or GSS_Add_cred(), due to some property of the particular name rather 3539 than a property of the name type. Thus, this routine should be used 3540 only as a pre-filter for a call to a subsequent mechanism-specific 3541 routine. 3543 2.4.14: GSS_Canonicalize_name call 3545 Inputs: 3547 o input_name INTERNAL NAME, 3549 o mech_type OBJECT IDENTIFIER -- must be explicit mechanism, 3550 -- not "default" specifier or identifier of negotiating mechanism 3552 Outputs: 3554 o major_status INTEGER, 3556 o minor_status INTEGER, 3558 o output_name INTERNAL NAME -- caller must release with 3559 -- GSS_Release_name() 3561 Return major_status codes: 3563 o GSS_S_COMPLETE indicates that a mechanism-specific reduction of 3564 the input_name, as processed by the mechanism identified by 3565 mech_type, is available in output_name. 3567 o GSS_S_BAD_MECH indicates that the identified mechanism is 3568 unsupported for this operation; this may correspond either to 3569 a mechanism wholly unsupported by the local GSS-API implementation 3570 or to a negotiating mechanism with which the canonicalization 3571 operation cannot be performed. 3573 o GSS_S_BAD_NAMETYPE indicates that the input name does not 3574 contain an element with suitable type for processing by the 3575 identified mechanism. 3577 o GSS_S_BAD_NAME indicates that the input name contains an 3578 element with suitable type for processing by the identified 3579 mechanism, but that this element could not be processed 3580 successfully. 3582 o GSS_S_FAILURE indicates that the requested operation could not 3583 be performed for reasons unspecified at the GSS-API level. 3585 This routine reduces a GSS-API internal name input_name, which may in 3586 general contain elements corresponding to multiple mechanisms, to a 3587 mechanism-specific Mechanism Name (MN) output_name by applying the 3588 translations corresponding to the mechanism identified by mech_type. 3589 The contents of input_name are unaffected by the 3590 GSS_Canonicalize_name() operation. References to output_name will 3591 remain valid until output_name is released, independent of whether or 3592 not input_name is subsequently released. 3594 2.4.15: GSS_Export_name call 3596 Inputs: 3598 o input_name INTERNAL NAME, -- required to be MN 3600 Outputs: 3602 o major_status INTEGER, 3604 o minor_status INTEGER, 3606 o output_name OCTET STRING -- caller must release 3607 -- with GSS_Release_buffer() 3609 Return major_status codes: 3611 o GSS_S_COMPLETE indicates that a flat representation of the 3612 input name is available in output_name. 3614 o GSS_S_NAME_NOT_MN indicates that the input name contained 3615 elements corresponding to multiple mechanisms, so cannot 3616 be exported into a single-mechanism flat form. 3618 o GSS_S_BAD_NAME indicates that the input name was an MN, 3619 but could not be processed. 3621 o GSS_S_BAD_NAMETYPE indicates that the input name was an MN, 3622 but that its type is unsupported by the GSS-API implementation. 3624 o GSS_S_FAILURE indicates that the requested operation could not 3625 be performed for reasons unspecified at the GSS-API level. 3627 This routine creates a flat name representation, suitable for 3628 bytewise comparison or for input to GSS_Import_name() in conjunction 3629 with the reserved GSS-API Exported Name Object OID, from a internal- 3630 form Mechanism Name (MN) as emitted, e.g., by GSS_Canonicalize_name() 3631 or GSS_Accept_sec_context(). 3633 The emitted GSS-API Exported Name Object is self-describing; no 3634 associated parameter-level OID need be emitted by this call. This 3635 flat representation consists of a mechanism-independent wrapper 3636 layer, defined in Section 3.2 of this document, enclosing a 3637 mechanism-defined name representation. 3639 In all cases, the flat name output by GSS_Export_name() to correspond 3640 to a particular input MN must be invariant over time within a 3641 particular installation. 3643 The GSS_S_NAME_NOT_MN status code is provided to enable 3644 implementations to reject input names which are not MNs. It is not, 3645 however, required for purposes of conformance to this specification 3646 that all non-MN input names must necessarily be rejected. 3648 2.4.16: GSS_Duplicate_name call 3650 Inputs: 3652 o src_name INTERNAL NAME 3654 Outputs: 3656 o major_status INTEGER, 3658 o minor_status INTEGER, 3660 o dest_name INTERNAL NAME -- caller must release 3661 -- with GSS_Release_name() 3662 Return major_status codes: 3664 o GSS_S_COMPLETE indicates that dest_name references an internal 3665 name object containing the same name as passed to src_name. 3667 o GSS_S_BAD_NAME indicates that the input name was invalid. 3669 o GSS_S_FAILURE indicates that the requested operation could not 3670 be performed for reasons unspecified at the GSS-API level. 3672 This routine takes input internal name src_name, and returns another 3673 reference (dest_name) to that name which can be used even if src_name 3674 is later freed. (Note: This may be implemented by copying or through 3675 use of reference counts.) 3677 3: Data Structure Definitions for GSS-V2 Usage 3679 Subsections of this section define, for interoperability and 3680 portability purposes, certain data structures for use with GSS-V2. 3682 3.1: Mechanism-Independent Token Format 3684 This section specifies a mechanism-independent level of encapsulating 3685 representation for the initial token of a GSS-API context 3686 establishment sequence, incorporating an identifier of the mechanism 3687 type to be used on that context and enabling tokens to be interpreted 3688 unambiguously at GSS-API peers. Use of this format is required for 3689 initial context establishment tokens of Internet standards-track 3690 GSS-API mechanisms; use in non-initial tokens is optional. 3692 The encoding format for the token tag is derived from ASN.1 and DER 3693 (per illustrative ASN.1 syntax included later within this 3694 subsection), but its concrete representation is defined directly in 3695 terms of octets rather than at the ASN.1 level in order to facilitate 3696 interoperable implementation without use of general ASN.1 processing 3697 code. The token tag consists of the following elements, in order: 3699 1. 0x60 -- Tag for [APPLICATION 0] SEQUENCE; indicates that 3700 -- constructed form, definite length encoding follows. 3702 2. Token length octets, specifying length of subsequent data 3703 (i.e., the summed lengths of elements 3-5 in this list, and of 3704 the mechanism-defined token object following the tag). 3705 This element comprises a variable number of octets: 3707 2a. If the indicated value is less than 128, it shall be 3708 represented in a single octet with bit 8 (high order) 3709 set to "0" and the remaining bits representing the value. 3711 2b. If the indicated value is 128 or more, it shall be 3712 represented in two or more octets, with bit 8 of the first 3713 octet set to "1" and the remaining bits of the first octet 3714 specifying the number of additional octets. The subsequent 3715 octets carry the value, 8 bits per octet, most significant 3716 digit first. The minimum number of octets shall be used to 3717 encode the length (i.e., no octets representing leading zeros 3718 shall be included within the length encoding). 3720 3. 0x06 -- Tag for OBJECT IDENTIFIER 3722 4. Object identifier length -- length (number of octets) of 3723 -- the encoded object identifier contained in element 5, 3724 -- encoded per rules as described in 2a. and 2b. above. 3726 5. Object identifier octets -- variable number of octets, 3727 -- encoded per ASN.1 BER rules: 3729 5a. The first octet contains the sum of two values: (1) the 3730 top-level object identifier component, multiplied by 40 3731 (decimal), and (2) the second-level object identifier 3732 component. This special case is the only point within an 3733 object identifier encoding where a single octet represents 3734 contents of more than one component. 3736 5b. Subsequent octets, if required, encode successively-lower 3737 components in the represented object identifier. A component's 3738 encoding may span multiple octets, encoding 7 bits per octet 3739 (most significant bits first) and with bit 8 set to "1" on 3740 all but the final octet in the component's encoding. The 3741 minimum number of octets shall be used to encode each component 3742 (i.e., no octets representing leading zeros shall be included 3743 within a component's encoding). 3745 (Note: In many implementations, elements 3-5 may be stored and 3746 referenced as a contiguous string constant.) 3748 The token tag is immediately followed by a mechanism-defined token 3749 object. Note that no independent size specifier intervenes following 3750 the object identifier value to indicate the size of the mechanism- 3751 defined token object. While ASN.1 usage within mechanism-defined 3752 tokens is permitted, there is no requirement that the mechanism- 3753 specific innerContextToken, innerMsgToken, and sealedUserData data 3754 elements must employ ASN.1 BER/DER encoding conventions. 3756 The following ASN.1 syntax is included for descriptive purposes only, 3757 to illustrate structural relationships among token and tag objects. 3758 For interoperability purposes, token and tag encoding shall be 3759 performed using the concrete encoding procedures described earlier in 3760 this subsection. 3762 GSS-API DEFINITIONS ::= 3764 BEGIN 3766 MechType ::= OBJECT IDENTIFIER 3767 -- data structure definitions 3769 -- callers must be able to distinguish among 3770 -- InitialContextToken, SubsequentContextToken, 3771 -- PerMsgToken, and SealedMessage data elements 3772 -- based on the usage in which they occur 3774 InitialContextToken ::= 3775 -- option indication (delegation, etc.) indicated within 3776 -- mechanism-specific token 3777 [APPLICATION 0] IMPLICIT SEQUENCE { 3778 thisMech MechType, 3779 innerContextToken ANY DEFINED BY thisMech 3780 -- contents mechanism-specific 3781 -- ASN.1 structure not required 3782 } 3784 SubsequentContextToken ::= innerContextToken ANY 3785 -- interpretation based on predecessor InitialContextToken 3786 -- ASN.1 structure not required 3788 PerMsgToken ::= 3789 -- as emitted by GSS_GetMIC and processed by GSS_VerifyMIC 3790 -- ASN.1 structure not required 3791 innerMsgToken ANY 3793 SealedMessage ::= 3794 -- as emitted by GSS_Wrap and processed by GSS_Unwrap 3795 -- includes internal, mechanism-defined indicator 3796 -- of whether or not encrypted 3797 -- ASN.1 structure not required 3798 sealedUserData ANY 3800 END 3802 3.2: Mechanism-Independent Exported Name Object Format 3804 This section specifies a mechanism-independent level of encapsulating 3805 representation for names exported via the GSS_Export_name() call, 3806 including an object identifier representing the exporting mechanism. 3807 The format of names encapsulated via this representation shall be 3808 defined within individual mechanism drafts. The Object Identifier 3809 value to indicate names of this type is defined in Section 4.7 of 3810 this document. 3812 No name type OID is included in this mechanism-independent level of 3813 format definition, since (depending on individual mechanism 3814 specifications) the enclosed name may be implicitly typed or may be 3815 explicitly typed using a means other than OID encoding. 3817 The bytes within MECH_OID_LEN and NAME_LEN elements are represented 3818 most significant byte first (equivalently, in IP network byte order). 3820 Length Name Description 3822 2 TOK_ID Token Identifier 3823 For exported name objects, this 3824 must be hex 04 01. 3825 2 MECH_OID_LEN Length of the Mechanism OID 3826 MECH_OID_LEN MECH_OID Mechanism OID, in DER 3827 4 NAME_LEN Length of name 3828 NAME_LEN NAME Exported name; format defined in 3829 applicable mechanism draft. 3831 A concrete example of the contents of an exported name object, 3832 derived from the Kerberos Version 5 mechanism, is as follows: 3834 04 01 00 0B 06 09 2A 86 48 86 F7 12 01 02 02 hx xx xx xl pp qq ... zz 3836 04 01 mandatory token identifier 3838 00 0B 2-byte length of the immediately following DER-encoded 3839 ASN.1 value of type OID, most significant octet first 3841 06 09 2A 86 48 86 F7 12 01 02 02 DER-encoded ASN.1 value 3842 of type OID; Kerberos V5 3843 mechanism OID indicates 3844 Kerberos V5 exported name 3846 in Detail: 06 Identifier octet (6=OID) 3847 09 Length octet(s) 3848 2A 86 48 86 F7 12 01 02 02 Content octet(s) 3850 hx xx xx xl 4-byte length of the immediately following exported 3851 name blob, most significant octet first 3853 pp qq ... zz exported name blob of specified length, 3854 bits and bytes specified in the 3855 (Kerberos 5) GSS-API v2 mechanism spec 3857 4: Name Type Definitions 3859 This section includes definitions for name types and associated 3860 syntaxes which are defined in a mechanism-independent fashion at the 3861 GSS-API level rather than being defined in individual mechanism 3862 specifications. 3864 4.1: Host-Based Service Name Form 3866 This name form shall be represented by the Object Identifier: 3868 {iso(1) member-body(2) United States(840) mit(113554) infosys(1) 3869 "gssapi(2) generic(1) service_name(4)}. 3871 The recommended symbolic name for this type is 3872 "GSS_C_NT_HOSTBASED_SERVICE". 3874 For reasons of compatibility with existing implementations, it is 3875 recommended that this OID be used rather than the alternate value as 3876 included in [RFC-2078]: 3878 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3879 2(gss-host-based-services)} 3881 While it is not recommended that this alternate value be emitted on 3882 output by GSS implementations, it is recommended that it be accepted 3883 on input as equivalent to the recommended value. 3885 This name type is used to represent services associated with host 3886 computers. Support for this name form is recommended to mechanism 3887 designers in the interests of portability, but is not mandated by 3888 this specification. This name form is constructed using two elements, 3889 "service" and "hostname", as follows: 3891 service@hostname 3893 When a reference to a name of this type is resolved, the "hostname" 3894 may (as an example implementation strategy) be canonicalized by 3895 attempting a DNS lookup and using the fully-qualified domain name 3896 which is returned, or by using the "hostname" as provided if the DNS 3897 lookup fails. The canonicalization operation also maps the host's 3898 name into lower-case characters. 3900 The "hostname" element may be omitted. If no "@" separator is 3901 included, the entire name is interpreted as the service specifier, 3902 with the "hostname" defaulted to the canonicalized name of the local 3903 host. 3905 Documents specifying means for GSS integration into a particular 3906 protocol should state either: 3908 (a) that a specific IANA-registered name associated with that 3909 protocol shall be used for the "service" element (this admits, if 3910 needed, the possibility that a single name can be registered and 3911 shared among a related set of protocols), or 3913 (b) that the generic name "host" shall be used for the "service" 3914 element, or 3916 (c) that, for that protocol, fallback in specified order (a, then 3917 b) or (b, then a) shall be applied. 3919 IANA registration of specific names per (a) should be handled in 3920 accordance with the "Specification Required" assignment policy, 3921 defined as of draft-iesg-iana-considerations-02 as follows: "Values 3922 and their meaning must be documented in an RFC or other available 3923 reference, in sufficient detail so that interoperability between 3924 independent implementations is possible." 3926 4.2: User Name Form 3928 This name form shall be represented by the Object Identifier {iso(1) 3929 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3930 generic(1) user_name(1)}. The recommended mechanism-independent 3931 symbolic name for this type is "GSS_C_NT_USER_NAME". (Note: the same 3932 name form and OID is defined within the Kerberos V5 GSS-API 3933 mechanism, but the symbolic name recommended there begins with a 3934 "GSS_KRB5_NT_" prefix.) 3936 This name type is used to indicate a named user on a local system. 3937 Its syntax and interpretation may be OS-specific. This name form is 3938 constructed as: 3940 username 3942 4.3: Machine UID Form 3944 This name form shall be represented by the Object Identifier {iso(1) 3945 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3946 generic(1) machine_uid_name(2)}. The recommended mechanism- 3947 independent symbolic name for this type is 3948 "GSS_C_NT_MACHINE_UID_NAME". (Note: the same name form and OID is 3949 defined within the Kerberos V5 GSS-API mechanism, but the symbolic 3950 name recommended there begins with a "GSS_KRB5_NT_" prefix.) 3952 This name type is used to indicate a numeric user identifier 3953 corresponding to a user on a local system. Its interpretation is 3954 OS-specific. The gss_buffer_desc representing a name of this type 3955 should contain a locally-significant user ID, represented in host 3956 byte order. The GSS_Import_name() operation resolves this uid into a 3957 username, which is then treated as the User Name Form. 3959 4.4: String UID Form 3961 This name form shall be represented by the Object Identifier {iso(1) 3962 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3963 generic(1) string_uid_name(3)}. The recommended symbolic name for 3964 this type is "GSS_C_NT_STRING_UID_NAME". (Note: the same name form 3965 and OID is defined within the Kerberos V5 GSS-API mechanism, but the 3966 symbolic name recommended there begins with a "GSS_KRB5_NT_" prefix.) 3968 This name type is used to indicate a string of digits representing 3969 the numeric user identifier of a user on a local system. Its 3970 interpretation is OS-specific. This name type is similar to the 3971 Machine UID Form, except that the buffer contains a string 3972 representing the user ID. 3974 4.5: Anonymous Nametype 3976 The following Object Identifier value is provided as a means to 3977 identify anonymous names, and can be compared against in order to 3978 determine, in a mechanism-independent fashion, whether a name refers 3979 to an anonymous principal: 3981 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3982 3(gss-anonymous-name)} 3984 The recommended symbolic name corresponding to this definition is 3985 GSS_C_NT_ANONYMOUS. 3987 4.6: GSS_C_NO_OID 3989 The recommended symbolic name GSS_C_NO_OID corresponds to a null 3990 input value instead of an actual object identifier. Where specified, 3991 it indicates interpretation of an associated name based on a 3992 mechanism-specific default printable syntax. 3994 4.7: Exported Name Object 3996 Name objects of the Mechanism-Independent Exported Name Object type, 3997 as defined in Section 3.2 of this document, will be identified with 3998 the following Object Identifier: 4000 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 4001 4(gss-api-exported-name)} 4003 The recommended symbolic name corresponding to this definition is 4004 GSS_C_NT_EXPORT_NAME. 4006 4.8: GSS_C_NO_NAME 4008 The recommended symbolic name GSS_C_NO_NAME indicates that no name is 4009 being passed within a particular value of a parameter used for the 4010 purpose of transferring names. 4012 5: Mechanism-Specific Example Scenarios 4014 This section provides illustrative overviews of the use of various 4015 candidate mechanism types to support the GSS-API. These discussions 4016 are intended primarily for readers familiar with specific security 4017 technologies, demonstrating how GSS-API functions can be used and 4018 implemented by candidate underlying mechanisms. They should not be 4019 regarded as constrictive to implementations or as defining the only 4020 means through which GSS-API functions can be realized with a 4021 particular underlying technology, and do not demonstrate all GSS-API 4022 features with each technology. 4024 5.1: Kerberos V5, single-TGT 4026 OS-specific login functions yield a TGT to the local realm Kerberos 4027 server; TGT is placed in a credentials structure for the client. 4028 Client calls GSS_Acquire_cred() to acquire a cred_handle in order to 4029 reference the credentials for use in establishing security contexts. 4031 Client calls GSS_Init_sec_context(). If the requested service is 4032 located in a different realm, GSS_Init_sec_context() gets the 4033 necessary TGT/key pairs needed to traverse the path from local to 4034 target realm; these data are placed in the owner's TGT cache. After 4035 any needed remote realm resolution, GSS_Init_sec_context() yields a 4036 service ticket to the requested service with a corresponding session 4037 key; these data are stored in conjunction with the context. GSS-API 4038 code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP 4039 response(s) (in the successful case) or KRB_ERROR. 4041 Assuming success, GSS_Init_sec_context() builds a Kerberos-formatted 4042 KRB_AP_REQ message, and returns it in output_token. The client sends 4043 the output_token to the service. 4045 The service passes the received token as the input_token argument to 4046 GSS_Accept_sec_context(), which verifies the authenticator, provides 4047 the service with the client's authenticated name, and returns an 4048 output_context_handle. 4050 Both parties now hold the session key associated with the service 4051 ticket, and can use this key in subsequent GSS_GetMIC(), 4052 GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() operations. 4054 5.2: Kerberos V5, double-TGT 4056 TGT acquisition as above. 4058 Note: To avoid unnecessary frequent invocations of error paths when 4059 implementing the GSS-API atop Kerberos V5, it seems appropriate to 4060 represent "single-TGT K-V5" and "double-TGT K-V5" with separate 4061 mech_types, and this discussion makes that assumption. 4063 Based on the (specified or defaulted) mech_type, 4064 GSS_Init_sec_context() determines that the double-TGT protocol 4065 should be employed for the specified target. GSS_Init_sec_context() 4066 returns GSS_S_CONTINUE_NEEDED major_status, and its returned 4067 output_token contains a request to the service for the service's TGT. 4068 (If a service TGT with suitably long remaining lifetime already 4069 exists in a cache, it may be usable, obviating the need for this 4070 step.) The client passes the output_token to the service. Note: this 4071 scenario illustrates a different use for the GSS_S_CONTINUE_NEEDED 4072 status return facility than for support of mutual authentication; 4073 note that both uses can coexist as successive operations within a 4074 single context establishment operation. 4076 The service passes the received token as the input_token argument to 4077 GSS_Accept_sec_context(), which recognizes it as a request for TGT. 4078 (Note that current Kerberos V5 defines no intra-protocol mechanism to 4079 represent such a request.) GSS_Accept_sec_context() returns 4080 GSS_S_CONTINUE_NEEDED major_status and provides the service's TGT in 4081 its output_token. The service sends the output_token to the client. 4083 The client passes the received token as the input_token argument to a 4084 continuation of GSS_Init_sec_context(). GSS_Init_sec_context() caches 4085 the received service TGT and uses it as part of a service ticket 4086 request to the Kerberos authentication server, storing the returned 4087 service ticket and session key in conjunction with the context. 4088 GSS_Init_sec_context() builds a Kerberos-formatted authenticator, and 4089 returns it in output_token along with GSS_S_COMPLETE return 4090 major_status. The client sends the output_token to the service. 4092 Service passes the received token as the input_token argument to a 4093 continuation call to GSS_Accept_sec_context(). 4094 GSS_Accept_sec_context() verifies the authenticator, provides the 4095 service with the client's authenticated name, and returns 4096 major_status GSS_S_COMPLETE. 4098 GSS_GetMIC(), GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() as 4099 above. 4101 5.3: X.509 Authentication Framework 4103 This example illustrates use of the GSS-API in conjunction with 4104 public-key mechanisms, consistent with the X.509 Directory 4105 Authentication Framework. 4107 The GSS_Acquire_cred() call establishes a credentials structure, 4108 making the client's private key accessible for use on behalf of the 4109 client. 4111 The client calls GSS_Init_sec_context(), which interrogates the 4112 Directory to acquire (and validate) a chain of public-key 4113 certificates, thereby collecting the public key of the service. The 4114 certificate validation operation determines that suitable integrity 4115 checks were applied by trusted authorities and that those 4116 certificates have not expired. GSS_Init_sec_context() generates a 4117 secret key for use in per-message protection operations on the 4118 context, and enciphers that secret key under the service's public 4119 key. 4121 The enciphered secret key, along with an authenticator quantity 4122 signed with the client's private key, is included in the output_token 4123 from GSS_Init_sec_context(). The output_token also carries a 4124 certification path, consisting of a certificate chain leading from 4125 the service to the client; a variant approach would defer this path 4126 resolution to be performed by the service instead of being asserted 4127 by the client. The client application sends the output_token to the 4128 service. 4130 The service passes the received token as the input_token argument to 4131 GSS_Accept_sec_context(). GSS_Accept_sec_context() validates the 4132 certification path, and as a result determines a certified binding 4133 between the client's distinguished name and the client's public key. 4134 Given that public key, GSS_Accept_sec_context() can process the 4135 input_token's authenticator quantity and verify that the client's 4136 private key was used to sign the input_token. At this point, the 4137 client is authenticated to the service. The service uses its private 4138 key to decipher the enciphered secret key provided to it for per- 4139 message protection operations on the context. 4141 The client calls GSS_GetMIC() or GSS_Wrap() on a data message, which 4142 causes per-message authentication, integrity, and (optional) 4143 confidentiality facilities to be applied to that message. The service 4144 uses the context's shared secret key to perform corresponding 4145 GSS_VerifyMIC() and GSS_Unwrap() calls. 4147 6: Security Considerations 4149 Security issues are discussed throughout this memo. 4151 7: Related Activities 4153 In order to implement the GSS-API atop existing, emerging, and future 4154 security mechanisms: 4156 object identifiers must be assigned to candidate GSS-API 4157 mechanisms and the name types which they support 4159 concrete data element formats and processing procedures must be 4160 defined for candidate mechanisms 4162 Calling applications must implement formatting conventions which will 4163 enable them to distinguish GSS-API tokens from other data carried in 4164 their application protocols. 4166 Concrete language bindings are required for the programming 4167 environments in which the GSS-API is to be employed, as [RFC-1509] 4168 defines for the C programming language and GSS-V1. 4170 8: Referenced Documents 4172 [ISO-7498-2] International Standard ISO 7498-2-1988(E), Security 4173 Architecture. 4175 [ISOIEC-8824] ISO/IEC 8824, "Specification of Abstract Syntax 4176 Notation One (ASN.1)". 4178 [ISOIEC-8825] ISO/IEC 8825, "Specification of Basic Encoding Rules 4179 for Abstract Syntax Notation One (ASN.1)".) 4181 [RFC-1507]: C. Kaufman, "DASS: Distributed Authentication Security 4182 Service", RFC 1507. 4184 [RFC-1508]: J. Linn, "Generic Security Service Application Program 4185 Interface", RFC 1508. 4187 [RFC-1509]: J. Wray, "Generic Security Service API: C-bindings", RFC 4188 1509. 4190 [RFC-1964]: J. Linn, "The Kerberos Version 5 GSS-API Mechanism", RFC 4191 1964. 4193 [RFC-2025]: C. Adams, "The Simple Public-Key GSS-API Mechanism 4194 (SPKM)", RFC 2025. 4196 [RFC-2078]: J. Linn, "Generic Security Service Application Program 4197 Interface, Version 2", RFC 2078. 4199 [RFC-2203]: M. Eisler, A. Chiu, L. Ling, "RPCSEC_GSS Protocol 4200 Specification", RFC 2203. 4202 APPENDIX A 4204 MECHANISM DESIGN CONSTRAINTS 4206 The following constraints on GSS-API mechanism designs are adopted in 4207 response to observed caller protocol requirements, and adherence thereto 4208 is anticipated in subsequent descriptions of GSS-API mechanisms to be 4209 documented in standards-track Internet specifications. 4211 It is strongly recommended that mechanisms offering per-message 4212 protection services also offer at least one of the replay detection and 4213 sequencing services, as mechanisms offering neither of the latter will 4214 fail to satisfy recognized requirements of certain candidate caller 4215 protocols. 4217 APPENDIX B 4219 COMPATIBILITY WITH GSS-V1 4221 It is the intent of this document to define an interface and procedures 4222 which preserve compatibility between GSS-V1 [RFC-1508] callers and GSS- 4223 V2 providers. All calls defined in GSS-V1 are preserved, and it has 4224 been a goal that GSS-V1 callers should be able to operate atop GSS-V2 4225 provider implementations. Certain detailed changes, summarized in this 4226 section, have been made in order to resolve omissions identified in 4227 GSS-V1. 4229 The following GSS-V1 constructs, while supported within GSS-V2, are 4230 deprecated: 4232 Names for per-message processing routines: GSS_Seal() deprecated in 4233 favor of GSS_Wrap(); GSS_Sign() deprecated in favor of 4234 GSS_GetMIC(); GSS_Unseal() deprecated in favor of GSS_Unwrap(); 4235 GSS_Verify() deprecated in favor of GSS_VerifyMIC(). 4237 GSS_Delete_sec_context() facility for context_token usage, allowing 4238 mechanisms to signal context deletion, is retained for 4239 compatibility with GSS-V1. For current usage, it is recommended 4240 that both peers to a context invoke GSS_Delete_sec_context() 4241 independently, passing a null output_context_token buffer to 4242 indicate that no context_token is required. Implementations of 4243 GSS_Delete_sec_context() should delete relevant locally-stored 4244 context information. 4246 This GSS-V2 specification adds the following calls which are not present 4247 in GSS-V1: 4249 Credential management calls: GSS_Add_cred(), 4250 GSS_Inquire_cred_by_mech(). 4252 Context-level calls: GSS_Inquire_context(), GSS_Wrap_size_limit(), 4253 GSS_Export_sec_context(), GSS_Import_sec_context(). 4255 Per-message calls: No new calls. Existing calls have been renamed. 4257 Support calls: GSS_Create_empty_OID_set(), 4258 GSS_Add_OID_set_member(), GSS_Test_OID_set_member(), 4259 GSS_Inquire_names_for_mech(), GSS_Inquire_mechs_for_name(), 4260 GSS_Canonicalize_name(), GSS_Export_name(), GSS_Duplicate_name(). 4262 This GSS-V2 specification introduces three new facilities applicable to 4263 security contexts, indicated using the following context state values 4264 which are not present in GSS-V1: 4266 anon_state, set TRUE to indicate that a context's initiator is 4267 anonymous from the viewpoint of the target; Section 1.2.5 of this 4268 specification provides a summary description of the GSS-V2 4269 anonymity support facility, support and use of which is optional. 4271 prot_ready_state, set TRUE to indicate that a context may be used 4272 for per-message protection before final completion of context 4273 establishment; Section 1.2.7 of this specification provides a 4274 summary description of the GSS-V2 facility enabling mechanisms to 4275 selectively permit per-message protection during context 4276 establishment, support and use of which is optional. 4278 trans_state, set TRUE to indicate that a context is transferable to 4279 another process using the GSS-V2 GSS_Export_sec_context() facility. 4281 These state values are represented (at the C bindings level) in 4282 positions within a bit vector which are unused in GSS-V1, and may be 4283 safely ignored by GSS-V1 callers. 4285 Relative to GSS-V1, GSS-V2 provides additional guidance to GSS-API 4286 implementors in the following areas: implementation robustness, 4287 credential management, behavior in multi-mechanism configurations, 4288 naming support, and inclusion of optional sequencing services. The 4289 token tagging facility as defined in GSS-V2, Section 3.1, is now 4290 described directly in terms of octets to facilitate interoperable 4291 implementation without general ASN.1 processing code; the corresponding 4292 ASN.1 syntax, included for descriptive purposes, is unchanged from that 4293 in GSS-V1. For use in conjunction with added naming support facilities, 4294 a new Exported Name Object construct is added. Additional name types 4295 are introduced in Section 4. 4297 This GSS-V2 specification adds the following major_status values which 4298 are not defined in GSS-V1: 4300 GSS_S_BAD_QOP unsupported QOP value 4301 GSS_S_UNAUTHORIZED operation unauthorized 4302 GSS_S_UNAVAILABLE operation unavailable 4303 GSS_S_DUPLICATE_ELEMENT duplicate credential element 4304 requested 4305 GSS_S_NAME_NOT_MN name contains multi-mechanism 4306 elements 4307 GSS_S_GAP_TOKEN skipped predecessor token(s) 4308 detected 4310 Of these added status codes, only two values are defined to be 4311 returnable by calls existing in GSS-V1: GSS_S_BAD_QOP (returnable by 4312 GSS_GetMIC() and GSS_Wrap()), and GSS_S_GAP_TOKEN (returnable by 4313 GSS_VerifyMIC() and GSS_Unwrap()). 4315 Additionally, GSS-V2 descriptions of certain calls present in GSS-V1 4316 have been updated to allow return of additional major_status values from 4317 the set as defined in GSS-V1: GSS_Inquire_cred() has 4318 GSS_S_DEFECTIVE_CREDENTIAL and GSS_S_CREDENTIALS_EXPIRED defined as 4319 returnable, GSS_Init_sec_context() has GSS_S_OLD_TOKEN, 4320 GSS_S_DUPLICATE_TOKEN, and GSS_S_BAD_MECH defined as returnable, and 4321 GSS_Accept_sec_context() has GSS_S_BAD_MECH defined as returnable. 4323 AUTHOR'S ADDRESS 4325 John Linn 4326 RSA Laboratories East 4327 20 Crosby Drive 4328 Bedford, MA 01730 USA 4329 +1 781.687.7817 4331 E-mail: linn@rsa.com 4332 TABLE OF CONTENTS 4334 1: GSS-API Characteristics and Concepts 4335 1.1: GSS-API Constructs 4336 1.1.1: Credentials 4337 1.1.1.1: Credential Constructs and Concepts 4338 1.1.1.2: Credential Management 4339 1.1.1.3: Default Credential Resolution 4340 1.1.2: Tokens 4341 1.1.3: Security Contexts 4342 1.1.4: Mechanism Types 4343 1.1.5: Naming 4344 1.1.6: Channel Bindings 4345 1.2: GSS-API Features and Issues 4346 1.2.1: Status Reporting 4347 1.2.2: Per-Message Security Service Availability 4348 1.2.3: Per-Message Replay Detection and Sequencing 4349 1.2.4: Quality of Protection 4350 1.2.5: Anonymity Support 4351 1.2.6: Initialization 4352 1.2.7: Per-Message Protection During Context Establishment 4353 1.2.8: Implementation Robustness 4354 2: Interface Descriptions 4355 2.1: Credential management calls 4356 2.1.1: GSS_Acquire_cred call 4357 2.1.2: GSS_Release_cred call 4358 2.1.3: GSS_Inquire_cred call 4359 2.1.4: GSS_Add_cred call 4360 2.1.5: GSS_Inquire_cred_by_mech call 4361 2.2: Context-level calls 4362 2.2.1: GSS_Init_sec_context call 4363 2.2.2: GSS_Accept_sec_context call 4364 2.2.3: GSS_Delete_sec_context call 4365 2.2.4: GSS_Process_context_token call 4366 2.2.5: GSS_Context_time call 4367 2.2.6: GSS_Inquire_context call 4368 2.2.7: GSS_Wrap_size_limit call 4369 2.2.8: GSS_Export_sec_context call 4370 2.2.9: GSS_Import_sec_context call 4371 2.3: Per-message calls 4372 2.3.1: GSS_GetMIC call 4373 2.3.2: GSS_VerifyMIC call 4374 2.3.3: GSS_Wrap call 4375 2.3.4: GSS_Unwrap call 4376 2.4: Support calls 4377 2.4.1: GSS_Display_status call 4378 2.4.2: GSS_Indicate_mechs call 4379 2.4.3: GSS_Compare_name call 4380 2.4.4: GSS_Display_name call 4381 2.4.5: GSS_Import_name call 4382 2.4.6: GSS_Release_name call 4383 2.4.7: GSS_Release_buffer call 4384 2.4.8: GSS_Release_OID_set call 4385 2.4.9: GSS_Create_empty_OID_set call 4386 2.4.10: GSS_Add_OID_set_member call 4387 2.4.11: GSS_Test_OID_set_member call 4388 2.4.12: GSS_Inquire_names_for_mech call 4389 2.4.13: GSS_Inquire_mechs_for_name call 4390 2.4.14: GSS_Canonicalize_name call 4391 2.4.15: GSS_Export_name call 4392 2.4.16: GSS_Duplicate_name call 4393 3: Data Structure Definitions for GSS-V2 Usage 4394 3.1: Mechanism-Independent Token Format 4395 3.2: Mechanism-Independent Exported Name Object Format 4396 4: Name Type Definitions 4397 4.1: Host-Based Service Name Form 4398 4.2: User Name Form 4399 4.3: Machine UID Form 4400 4.4: String UID Form 4401 5: Mechanism-Specific Example Scenarios 4402 5.1: Kerberos V5, single-TGT 4403 5.2: Kerberos V5, double-TGT 4404 5.3: X.509 Authentication Framework 4405 6: Security Considerations 4406 7: Related Activities 4407 8: Referenced Documents 4408 Appendix A: Mechanism Design Constraints 4409 Appendix B: Compatibility with GSS-V1 4411 John Linn (linn@rsa.com) 4412 RSA Laboratories East, Bedford, MA, USA