idnits 2.17.1 draft-ietf-cat-rfc2078bis-01.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-25) 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 93 longer pages, the longest (page 11) being 64 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 94 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 1198 has weird spacing: '...t_token pro...' == Line 1235 has weird spacing: '...or_mech indi...' == Line 1237 has weird spacing: '...or_name indi...' == Line 3798 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 (11 November 1997) is 9662 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 4115 looks like a reference -- Missing reference section? 'ISO-7498-2' on line 4091 looks like a reference -- Missing reference section? 'RFC-1964' on line 4109 looks like a reference -- Missing reference section? 'RFC-2025' on line 4112 looks like a reference -- Missing reference section? 'RFC-2203' on line 4118 looks like a reference -- Missing reference section? 'ISOIEC-8825' on line 4097 looks like a reference -- Missing reference section? 'ISOIEC-8824' on line 4094 looks like a reference -- Missing reference section? 'RFC-1507' on line 4100 looks like a reference -- Missing reference section? 'APPLICATION 0' on line 3722 looks like a reference -- Missing reference section? 'RFC-1509' on line 4106 looks like a reference -- Missing reference section? 'RFC-1508' on line 4141 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 11 November 1997 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 allow 273 the value GSS_C_NO_CREDENTIAL to be specified as their credential 274 handle parameter. This special credential-handle indicates a desire 275 by the application to act as a default principal. In support of 276 application portability, support for the default resolution behavior 277 described below for initiator credentials (GSS_Init_sec_context() 278 usage) is mandated; support for the default resolution behavior 279 described below for acceptor credentials (GSS_Accept_sec_context() 280 usage) is recommended. If default credential resolution fails, 281 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 1.1.4: Mechanism Types 439 In order to successfully establish a security context with a target 440 peer, it is necessary to identify an appropriate underlying mechanism 441 type (mech_type) which both initiator and target peers support. The 442 definition of a mechanism embodies not only the use of a particular 443 cryptographic technology (or a hybrid or choice among alternative 444 cryptographic technologies), but also definition of the syntax and 445 semantics of data element exchanges which that mechanism will employ 446 in order to support security services. 448 It is recommended that callers initiating contexts specify the 449 "default" mech_type value, allowing system-specific functions within 450 or invoked by the GSS-API implementation to select the appropriate 451 mech_type, but callers may direct that a particular mech_type be 452 employed when necessary. 454 For GSS-API purposes, the phrase "negotiating mechanism" refers to a 455 mechanism which itself performs negotiation in order to select a 456 concrete mechanism which is shared between peers and is then used for 457 context establishment. Only those mechanisms which are defined in 458 their specifications as negotiating mechanisms are to yield selected 459 mechanisms with different identifier values than the value which is 460 input by a GSS-API caller, except for the case of a caller requesting 461 the "default" mech_type. 463 The means for identifying a shared mech_type to establish a security 464 context with a peer will vary in different environments and 465 circumstances; examples include (but are not limited to): 467 use of a fixed mech_type, defined by configuration, within an 468 environment 470 syntactic convention on a target-specific basis, through 471 examination of a target's name 473 lookup of a target's name in a naming service or other database in 474 order to identify mech_types supported by that target 476 explicit negotiation between GSS-API callers in advance of 477 security context setup 479 use of a negotiating mechanism 481 When transferred between GSS-API peers, mech_type specifiers (per 482 Section 3 of this document, represented as Object Identifiers (OIDs)) 483 serve to qualify the interpretation of associated tokens. (The 484 structure and encoding of Object Identifiers is defined in [ISOIEC- 485 8824] and [ISOIEC-8825].) Use of hierarchically structured OIDs 486 serves to preclude ambiguous interpretation of mech_type specifiers. 487 The OID representing the DASS ([RFC-1507]) MechType, for example, is 488 1.3.12.2.1011.7.5, and that of the Kerberos V5 mechanism ([RFC- 489 1964]), having been advanced to the level of Proposed Standard, is 490 1.2.840.113554.1.2.2. 492 1.1.5: Naming 494 The GSS-API avoids prescribing naming structures, treating the names 495 which are transferred across the interface in order to initiate and 496 accept security contexts as opaque objects. This approach supports 497 the GSS-API's goal of implementability atop a range of underlying 498 security mechanisms, recognizing the fact that different mechanisms 499 process and authenticate names which are presented in different 500 forms. Generalized services offering translation functions among 502 arbitrary sets of naming environments are outside the scope of the 503 GSS-API; availability and use of local conversion functions to 504 translate among the naming formats supported within a given end 505 system is anticipated. 507 Different classes of name representations are used in conjunction 508 with different GSS-API parameters: 510 - Internal form (denoted in this document by INTERNAL NAME), 511 opaque to callers and defined by individual GSS-API 512 implementations. GSS-API implementations supporting multiple 513 namespace types must maintain internal tags to disambiguate the 514 interpretation of particular names. A Mechanism Name (MN) is a 515 special case of INTERNAL NAME, guaranteed to contain elements 516 corresponding to one and only one mechanism; calls which are 517 guaranteed to emit MNs or which require MNs as input are so 518 identified within this specification. 520 - Contiguous string ("flat") form (denoted in this document by 521 OCTET STRING); accompanied by OID tags identifying the namespace 522 to which they correspond. Depending on tag value, flat names may 523 or may not be printable strings for direct acceptance from and 524 presentation to users. Tagging of flat names allows GSS-API 525 callers and underlying GSS-API mechanisms to disambiguate name 526 types and to determine whether an associated name's type is one 527 which they are capable of processing, avoiding aliasing problems 528 which could result from misinterpreting a name of one type as a 529 name of another type. 531 - The GSS-API Exported Name Object, a special case of flat name 532 designated by a reserved OID value, carries a canonicalized form 533 of a name suitable for binary comparisons. 535 In addition to providing means for names to be tagged with types, 536 this specification defines primitives to support a level of naming 537 environment independence for certain calling applications. To provide 538 basic services oriented towards the requirements of callers which 539 need not themselves interpret the internal syntax and semantics of 540 names, GSS-API calls for name comparison (GSS_Compare_name()), 541 human-readable display (GSS_Display_name()), input conversion 542 (GSS_Import_name()), internal name deallocation (GSS_Release_name()), 543 and internal name duplication (GSS_Duplicate_name()) functions are 544 defined. (It is anticipated that these proposed GSS-API calls will be 545 implemented in many end systems based on system-specific name 546 manipulation primitives already extant within those end systems; 547 inclusion within the GSS-API is intended to offer GSS-API callers a 548 portable means to perform specific operations, supportive of 549 authorization and audit requirements, on authenticated names.) 551 GSS_Import_name() implementations can, where appropriate, support 552 more than one printable syntax corresponding to a given namespace 553 (e.g., alternative printable representations for X.500 Distinguished 554 Names), allowing flexibility for their callers to select among 555 alternative representations. GSS_Display_name() implementations 556 output a printable syntax selected as appropriate to their 557 operational environments; this selection is a local matter. Callers 558 desiring portability across alternative printable syntaxes should 559 refrain from implementing comparisons based on printable name forms 560 and should instead use the GSS_Compare_name() call to determine 561 whether or not one internal-format name matches another. 563 When used in large access control lists, the overhead of invoking 564 GSS_Import_name() and GSS_Compare_name() on each name from the ACL 565 may be prohibitive. As an alternative way of supporting this case, 566 GSS-API defines a special form of the contiguous string name which 567 may be compared directly (e.g., with memcmp()). Contiguous names 568 suitable for comparison are generated by the GSS_Export_name() 569 routine, which requires an MN as input. Exported names may be re- 570 imported by the GSS_Import_name() routine, and the resulting internal 571 name will also be an MN. The symbolic constant GSS_C_NT_EXPORT_NAME 572 identifies the "export name" type. Structurally, an exported name 573 object consists of a header containing an OID identifying the 574 mechanism that authenticated the name, and a trailer containing the 575 name itself, where the syntax of the trailer is defined by the 576 individual mechanism specification. The precise format of an 577 exported name is defined in Section 3.2 of this specification. 579 Note that the results obtained by using GSS_Compare_name() will in 580 general be different from those obtained by invoking 581 GSS_Canonicalize_name() and GSS_Export_name(), and then comparing the 582 exported names. The first series of operation determines whether two 583 (unauthenticated) names identify the same principal; the second 584 whether a particular mechanism would authenticate them as the same 585 principal. These two operations will in general give the same 586 results only for MNs. 588 The following diagram illustrates the intended dataflow among name- 589 related GSS-API processing routines. 591 GSS-API library defaults 592 | 593 | 594 V text, for 595 text --------------> internal_name (IN) -----------> display only 596 import_name() / display_name() 597 / 598 / 599 / 600 accept_sec_context() / 601 | / 602 | / 603 | / canonicalize_name() 604 | / 605 | / 606 | / 607 | / 608 | / 609 | | 610 V V <--------------------- 611 single mechanism import_name() exported name: flat 612 internal_name (MN) binary "blob" usable 613 ----------------------> for access control 614 export_name() 616 1.1.6: Channel Bindings 618 The GSS-API accommodates the concept of caller-provided channel 619 binding ("chan_binding") information. Channel bindings are used to 620 strengthen the quality with which peer entity authentication is 621 provided during context establishment, by limiting the scope within 622 which an intercepted context establishment token can be reused by an 623 attacker. Specifically, they enable GSS-API callers to bind the 624 establishment of a security context to relevant characteristics 625 (e.g., addresses, transformed representations of encryption keys) of 626 the underlying communications channel, of protection mechanisms 627 applied to that communications channel, and to application-specific 628 data. 630 The caller initiating a security context must determine the 631 appropriate channel binding values to provide as input to the 632 GSS_Init_sec_context() call, and consistent values must be provided 633 to GSS_Accept_sec_context() by the context's target, in order for 634 both peers' GSS-API mechanisms to validate that received tokens 635 possess correct channel-related characteristics. Use or non-use of 636 the GSS-API channel binding facility is a caller option. GSS-API 637 mechanisms can operate in an environment where NULL channel bindings 638 are presented; mechanism implementors are encouraged, but not 639 required, to make use of caller-provided channel binding data within 640 their mechanisms. Callers should not assume that underlying 641 mechanisms provide confidentiality protection for channel binding 642 information. 644 When non-NULL channel bindings are provided by callers, certain 645 mechanisms can offer enhanced security value by interpreting the 646 bindings' content (rather than simply representing those bindings, or 647 integrity check values computed on them, within tokens) and will 648 therefore depend on presentation of specific data in a defined 649 format. To this end, agreements among mechanism implementors are 650 defining conventional interpretations for the contents of channel 651 binding arguments, including address specifiers (with content 652 dependent on communications protocol environment) for context 653 initiators and acceptors. (These conventions are being incorporated 654 in GSS-API mechanism specifications and into the GSS-API C language 655 bindings specification.) In order for GSS-API callers to be portable 656 across multiple mechanisms and achieve the full security 657 functionality which each mechanism can provide, it is strongly 658 recommended that GSS-API callers provide channel bindings consistent 659 with these conventions and those of the networking environment in 660 which they operate. 662 1.2: GSS-API Features and Issues 664 This section describes aspects of GSS-API operations, of the security 665 services which the GSS-API provides, and provides commentary on 666 design issues. 668 1.2.1: Status Reporting and Optional Service Support 670 1.2.1.1: Status Reporting 672 Each GSS-API call provides two status return values. Major_status 673 values provide a mechanism-independent indication of call status 674 (e.g., GSS_S_COMPLETE, GSS_S_FAILURE, GSS_S_CONTINUE_NEEDED), 675 sufficient to drive normal control flow within the caller in a 676 generic fashion. Table 1 summarizes the defined major_status return 677 codes in tabular fashion. 679 Table 1: GSS-API Major Status Codes 681 FATAL ERROR CODES 683 GSS_S_BAD_BINDINGS channel binding mismatch 684 GSS_S_BAD_MECH unsupported mechanism requested 685 GSS_S_BAD_NAME invalid name provided 686 GSS_S_BAD_NAMETYPE name of unsupported type provided 687 GSS_S_BAD_STATUS invalid input status selector 688 GSS_S_BAD_SIG token had invalid integrity check 689 GSS_S_BAD_MIC preferred alias for GSS_S_BAD_SIG 690 GSS_S_CONTEXT_EXPIRED specified security context expired 691 GSS_S_CREDENTIALS_EXPIRED expired credentials detected 692 GSS_S_DEFECTIVE_CREDENTIAL defective credential detected 693 GSS_S_DEFECTIVE_TOKEN defective token detected 694 GSS_S_FAILURE failure, unspecified at GSS-API 695 level 696 GSS_S_NO_CONTEXT no valid security context specified 697 GSS_S_NO_CRED no valid credentials provided 698 GSS_S_BAD_QOP unsupported QOP value 699 GSS_S_UNAUTHORIZED operation unauthorized 700 GSS_S_UNAVAILABLE operation unavailable 701 GSS_S_DUPLICATE_ELEMENT duplicate credential element requested 702 GSS_S_NAME_NOT_MN name contains multi-mechanism elements 704 INFORMATORY STATUS CODES 706 GSS_S_COMPLETE normal completion 707 GSS_S_CONTINUE_NEEDED continuation call to routine 708 required 709 GSS_S_DUPLICATE_TOKEN duplicate per-message token 710 detected 711 GSS_S_OLD_TOKEN timed-out per-message token 712 detected 713 GSS_S_UNSEQ_TOKEN reordered (early) per-message token 714 detected 715 GSS_S_GAP_TOKEN skipped predecessor token(s) 716 detected 718 Minor_status provides more detailed status information which may 719 include status codes specific to the underlying security mechanism. 720 Minor_status values are not specified in this document. 722 GSS_S_CONTINUE_NEEDED major_status returns, and optional message 723 outputs, are provided in GSS_Init_sec_context() and 724 GSS_Accept_sec_context() calls so that different mechanisms' 725 employment of different numbers of messages within their 726 authentication sequences need not be reflected in separate code paths 727 within calling applications. Instead, such cases are accommodated 728 with sequences of continuation calls to GSS_Init_sec_context() and 729 GSS_Accept_sec_context(). The same facility is used to encapsulate 730 mutual authentication within the GSS-API's context initiation calls. 732 For mech_types which require interactions with third-party servers in 733 order to establish a security context, GSS-API context establishment 734 calls may block pending completion of such third-party interactions. 735 On the other hand, no GSS-API calls pend on serialized interactions 736 with GSS-API peer entities. As a result, local GSS-API status 737 returns cannot reflect unpredictable or asynchronous exceptions 738 occurring at remote peers, and reflection of such status information 739 is a caller responsibility outside the GSS-API. 741 1.2.1.2: Optional Service Support 743 A context initiator may request various optional services at context 744 establishment time. Each of these services is requested by setting a 745 flag in the req_flags input parameter to GSS_Init_sec_context(). 747 The optional services currently defined are: 749 - Delegation - The (usually temporary) transfer of rights from 750 initiator to acceptor, enabling the acceptor to authenticate 751 itself as an agent of the initiator. 753 - Mutual Authentication - In addition to the initiator 754 authenticating its identity to the context acceptor, the context 755 acceptor should also authenticate itself to the initiator. 757 - Replay detection - In addition to providing message integrity 758 services, GSS_GetMIC() and GSS_Wrap() should include message 759 numbering information to enable GSS_VerifyMIC() and GSS_Unwrap() 760 to detect if a message has been duplicated. 762 - Out-of-sequence detection - In addition to providing message 763 integrity services, GSS_GetMIC() and GSS_Wrap() should include 764 message sequencing information to enable GSS_VerifyMIC() and 765 GSS_Unwrap() to detect if a message has been received out of 766 sequence. 768 - Anonymous authentication - The establishment of the security 769 context should not reveal the initiator's identity to the 770 context acceptor. 772 Any currently undefined bits within such flag arguments should be 773 ignored by GSS-API implementations when presented by an application, 774 and should be set to zero when returned to the application by the 775 GSS-API implementation. 777 Some mechanisms may not support all optional services, and some 778 mechanisms may only support some services in conjunction with others. 779 Both GSS_Init_sec_context() and GSS_Accept_sec_context() inform the 780 applications which services will be available from the context when 781 the establishment phase is complete, via the ret_flags output 782 parameter. In general, if the security mechanism is capable of 783 providing a requested service, it should do so, even if additional 784 services must be enabled in order to provide the requested service. 785 If the mechanism is incapable of providing a requested service, it 786 should proceed without the service, leaving the application to abort 787 the context establishment process if it considers the requested 788 service to be mandatory. 790 Some mechanisms may specify that support for some services is 791 optional, and that implementors of the mechanism need not provide it. 792 This is most commonly true of the confidentiality service, often 793 because of legal restrictions on the use of data-encryption, but may 794 apply to any of the services. Such mechanisms are required to send 795 at least one token from acceptor to initiator during context 796 establishment when the initiator indicates a desire to use such a 797 service, so that the initiating GSS-API can correctly indicate 798 whether the service is supported by the acceptor's GSS-API. 800 1.2.2: Per-Message Security Service Availability 802 When a context is established, two flags are returned to indicate the 803 set of per-message protection security services which will be 804 available on the context: 806 the integ_avail flag indicates whether per-message integrity and 807 data origin authentication services are available 809 the conf_avail flag indicates whether per-message confidentiality 810 services are available, and will never be returned TRUE unless the 811 integ_avail flag is also returned TRUE 813 GSS-API callers desiring per-message security services should 814 check the values of these flags at context establishment time, and 815 must be aware that a returned FALSE value for integ_avail means 816 that invocation of GSS_GetMIC() or GSS_Wrap() primitives on the 817 associated context will apply no cryptographic protection to user 818 data messages. 820 The GSS-API per-message integrity and data origin authentication 821 services provide assurance to a receiving caller that protection was 822 applied to a message by the caller's peer on the security context, 823 corresponding to the entity named at context initiation. The GSS-API 824 per-message confidentiality service provides assurance to a sending 825 caller that the message's content is protected from access by 826 entities other than the context's named peer. 828 The GSS-API per-message protection service primitives, as the 829 category name implies, are oriented to operation at the granularity 830 of protocol data units. They perform cryptographic operations on the 831 data units, transfer cryptographic control information in tokens, 832 and, in the case of GSS_Wrap(), encapsulate the protected data unit. 833 As such, these primitives are not oriented to efficient data 834 protection for stream-paradigm protocols (e.g., Telnet) if 835 cryptography must be applied on an octet-by-octet basis. 837 1.2.3: Per-Message Replay Detection and Sequencing 839 Certain underlying mech_types offer support for replay detection 840 and/or sequencing of messages transferred on the contexts they 841 support. These optionally-selectable protection features are distinct 842 from replay detection and sequencing features applied to the context 843 establishment operation itself; the presence or absence of context- 844 level replay or sequencing features is wholly a function of the 845 underlying mech_type's capabilities, and is not selected or omitted 846 as a caller option. 848 The caller initiating a context provides flags (replay_det_req_flag 849 and sequence_req_flag) to specify whether the use of per-message 850 replay detection and sequencing features is desired on the context 851 being established. The GSS-API implementation at the initiator system 852 can determine whether these features are supported (and whether they 853 are optionally selectable) as a function of mech_type, without need 854 for bilateral negotiation with the target. When enabled, these 855 features provide recipients with indicators as a result of GSS-API 856 processing of incoming messages, identifying whether those messages 857 were detected as duplicates or out-of-sequence. Detection of such 858 events does not prevent a suspect message from being provided to a 859 recipient; the appropriate course of action on a suspect message is a 860 matter of caller policy. 862 The semantics of the replay detection and sequencing services applied 863 to received messages, as visible across the interface which the GSS- 864 API provides to its clients, are as follows: 866 When replay_det_state is TRUE, the possible major_status returns for 867 well-formed and correctly signed messages are as follows: 869 1. GSS_S_COMPLETE indicates that the message was within the window 870 (of time or sequence space) allowing replay events to be detected, 871 and that the message was not a replay of a previously-processed 872 message within that window. 874 2. GSS_S_DUPLICATE_TOKEN indicates that the cryptographic 875 checkvalue on the received message was correct, but that the 876 message was recognized as a duplicate of a previously-processed 877 message. 879 3. GSS_S_OLD_TOKEN indicates that the cryptographic checkvalue on 880 the received message was correct, but that the message is too old 881 to be checked for duplication. 883 When sequence_state is TRUE, the possible major_status returns for 884 well-formed and correctly signed messages are as follows: 886 1. GSS_S_COMPLETE indicates that the message was within the window 887 (of time or sequence space) allowing replay events to be detected, 888 that the message was not a replay of a previously-processed 889 message within that window, and that no predecessor sequenced 890 messages are missing relative to the last received message (if 891 any) processed on the context with a correct cryptographic 892 checkvalue. 894 2. GSS_S_DUPLICATE_TOKEN indicates that the integrity check value 895 on the received message was correct, but that the message was 896 recognized as a duplicate of a previously-processed message. 898 3. GSS_S_OLD_TOKEN indicates that the integrity check value on the 899 received message was correct, but that the token is too old to be 900 checked for duplication. 902 4. GSS_S_UNSEQ_TOKEN indicates that the cryptographic checkvalue 903 on the received message was correct, but that it is earlier in a 904 sequenced stream than a message already processed on the context. 905 [Note: Mechanisms can be architected to provide a stricter form of 906 sequencing service, delivering particular messages to recipients 907 only after all predecessor messages in an ordered stream have been 908 delivered. This type of support is incompatible with the GSS-API 909 paradigm in which recipients receive all messages, whether in 910 order or not, and provide them (one at a time, without intra-GSS- 911 API message buffering) to GSS-API routines for validation. GSS- 912 API facilities provide supportive functions, aiding clients to 913 achieve strict message stream integrity in an efficient manner in 914 conjunction with sequencing provisions in communications 915 protocols, but the GSS-API does not offer this level of message 916 stream integrity service by itself.] 918 5. GSS_S_GAP_TOKEN indicates that the cryptographic checkvalue on 919 the received message was correct, but that one or more predecessor 920 sequenced messages have not been successfully processed relative 921 to the last received message (if any) processed on the context 922 with a correct cryptographic checkvalue. 924 As the message stream integrity features (especially sequencing) may 925 interfere with certain applications' intended communications 926 paradigms, and since support for such features is likely to be 927 resource intensive, it is highly recommended that mech_types 928 supporting these features allow them to be activated selectively on 929 initiator request when a context is established. A context initiator 930 and target are provided with corresponding indicators 931 (replay_det_state and sequence_state), signifying whether these 932 features are active on a given context. 934 An example mech_type supporting per-message replay detection could 935 (when replay_det_state is TRUE) implement the feature as follows: The 936 underlying mechanism would insert timestamps in data elements output 937 by GSS_GetMIC() and GSS_Wrap(), and would maintain (within a time- 938 limited window) a cache (qualified by originator-recipient pair) 939 identifying received data elements processed by GSS_VerifyMIC() and 940 GSS_Unwrap(). When this feature is active, exception status returns 941 (GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN) will be provided when 942 GSS_VerifyMIC() or GSS_Unwrap() is presented with a message which is 943 either a detected duplicate of a prior message or which is too old to 944 validate against a cache of recently received messages. 946 1.2.4: Quality of Protection 948 Some mech_types provide their users with fine granularity control 949 over the means used to provide per-message protection, allowing 950 callers to trade off security processing overhead dynamically against 951 the protection requirements of particular messages. A per-message 952 quality-of-protection parameter (analogous to quality-of-service, or 953 QOS) selects among different QOP options supported by that mechanism. 954 On context establishment for a multi-QOP mech_type, context-level 955 data provides the prerequisite data for a range of protection 956 qualities. 958 It is expected that the majority of callers will not wish to exert 959 explicit mechanism-specific QOP control and will therefore request 960 selection of a default QOP. Definitions of, and choices among, non- 961 default QOP values are mechanism-specific, and no ordered sequences 962 of QOP values can be assumed equivalent across different mechanisms. 963 Meaningful use of non-default QOP values demands that callers be 964 familiar with the QOP definitions of an underlying mechanism or 965 mechanisms, and is therefore a non-portable construct. The 966 GSS_S_BAD_QOP major_status value is defined in order to indicate that 967 a provided QOP value is unsupported for a security context, most 968 likely because that value is unrecognized by the underlying 969 mechanism. 971 1.2.5: Anonymity Support 973 In certain situations or environments, an application may wish to 974 authenticate a peer and/or protect communications using GSS-API per- 975 message services without revealing its own identity. For example, 976 consider an application which provides read access to a research 977 database, and which permits queries by arbitrary requestors. A 978 client of such a service might wish to authenticate the service, to 979 establish trust in the information received from it, but might not 980 wish to disclose its identity to the service for privacy reasons. 982 In ordinary GSS-API usage, a context initiator's identity is made 983 available to the context acceptor as part of the context 984 establishment process. To provide for anonymity support, a facility 985 (input anon_req_flag to GSS_Init_sec_context()) is provided through 986 which context initiators may request that their identity not be 987 provided to the context acceptor. Mechanisms are not required to 988 honor this request, but a caller will be informed (via returned 989 anon_state indicator from GSS_Init_sec_context()) whether or not the 990 request is honored. Note that authentication as the anonymous 991 principal does not necessarily imply that credentials are not 992 required in order to establish a context. 994 Section 4.5 of this document defines the Object Identifier value used 995 to identify an anonymous principal. 997 Four possible combinations of anon_state and mutual_state are 998 possible, with the following results: 1000 anon_state == FALSE, mutual_state == FALSE: initiator 1001 authenticated to target. 1003 anon_state == FALSE, mutual_state == TRUE: initiator authenticated 1004 to target, target authenticated to initiator. 1006 anon_state == TRUE, mutual_state == FALSE: initiator authenticated 1007 as anonymous principal to target. 1009 anon_state == TRUE, mutual_state == TRUE: initiator authenticated 1010 as anonymous principal to target, target authenticated to 1011 initiator. 1013 1.2.6: Initialization 1014 No initialization calls (i.e., calls which must be invoked prior to 1015 invocation of other facilities in the interface) are defined in GSS- 1016 API. As an implication of this fact, GSS-API implementations must 1017 themselves be self-initializing. 1019 1.2.7: Per-Message Protection During Context Establishment 1021 A facility is defined in GSS-V2 to enable protection and buffering of 1022 data messages for later transfer while a security context's 1023 establishment is in GSS_S_CONTINUE_NEEDED status, to be used in cases 1024 where the caller side already possesses the necessary session key to 1025 enable this processing. Specifically, a new state Boolean, called 1026 prot_ready_state, is added to the set of information returned by 1027 GSS_Init_sec_context(), GSS_Accept_sec_context(), and 1028 GSS_Inquire_context(). 1030 For context establishment calls, this state Boolean is valid and 1031 interpretable when the associated major_status is either 1032 GSS_S_CONTINUE_NEEDED, or GSS_S_COMPLETE. Callers of GSS-API (both 1033 initiators and acceptors) can assume that per-message protection (via 1034 GSS_Wrap(), GSS_Unwrap(), GSS_GetMIC() and GSS_VerifyMIC()) is 1035 available and ready for use if either: prot_ready_state == TRUE, or 1036 major_status == GSS_S_COMPLETE, though mutual authentication (if 1037 requested) cannot be guaranteed until GSS_S_COMPLETE is returned. 1039 This achieves full, transparent backward compatibility for GSS-API V1 1040 callers, who need not even know of the existence of prot_ready_state, 1041 and who will get the expected behavior from GSS_S_COMPLETE, but who 1042 will not be able to use per-message protection before GSS_S_COMPLETE 1043 is returned. 1045 It is not a requirement that GSS-V2 mechanisms ever return TRUE 1046 prot_ready_state before completion of context establishment (indeed, 1047 some mechanisms will not evolve usable message protection keys, 1048 especially at the context acceptor, before context establishment is 1049 complete). It is expected but not required that GSS-V2 mechanisms 1050 will return TRUE prot_ready_state upon completion of context 1051 establishment if they support per-message protection at all (however 1052 GSS-V2 applications should not assume that TRUE prot_ready_state will 1053 always be returned together with the GSS_S_COMPLETE major_status, 1054 since GSS-V2 implementations may continue to support GSS-V1 mechanism 1055 code, which will never return TRUE prot_ready_state). 1057 When prot_ready_state is returned TRUE, mechanisms shall also set 1058 those context service indicator flags (deleg_state, mutual_state, 1059 replay_det_state, sequence_state, anon_state, trans_state, 1060 conf_avail, integ_avail) which represent facilities confirmed, at 1061 that time, to be available on the context being established. In 1062 situations where prot_ready_state is returned before GSS_S_COMPLETE, 1063 it is possible that additional facilities may be confirmed and 1064 subsequently indicated when GSS_S_COMPLETE is returned. 1066 1.2.8: Implementation Robustness 1068 This section recommends aspects of GSS-API implementation behavior in 1069 the interests of overall robustness. 1071 If a token is presented for processing on a GSS-API security context 1072 and that token is determined to be invalid for that context, the 1073 context's state should not be disrupted for purposes of processing 1074 subsequent valid tokens. 1076 Certain local conditions at a GSS-API implementation (e.g., 1077 unavailability of memory) may preclude, temporarily or permanently, 1078 the successful processing of tokens on a GSS-API security context, 1079 typically generating GSS_S_FAILURE major_status returns along with 1080 locally-significant minor_status. For robust operation under such 1081 conditions, the following recommendations are made: 1083 Failing calls should free any memory they allocate, so that callers 1084 may retry without causing further loss of resources. 1086 Failure of an individual call on an established context should not 1087 preclude subsequent calls from succeeding on the same context. 1089 Whenever possible, it should be possible for 1090 GSS_Delete_sec_context() calls to be successfully processed even if 1091 other calls cannot succeed, thereby enabling context-related 1092 resources to be released. 1094 1.2.9: Delegation 1096 The GSS-API allows delegation to be controlled by the initiating 1097 application via a Boolean parameter to GSS_Init_sec_context(), the 1098 routine that establishes a security context. Some mechanisms do not 1099 support delegation, and for such mechanisms attempts by an 1100 application to enable delegation are ignored. 1102 The acceptor of a security context for which the initiator enabled 1103 delegation will receive (via the delegated_cred_handle parameter of 1104 GSS_Accept_sec_context()) a credential handle that contains the 1105 delegated identity, and this credential handle may be used to 1106 initiate subsequent GSS-API security contexts as an agent or delegate 1107 of the initiator. If the original initiator's identity is "A" and 1108 the delegate's identity is "B", then, depending on the underlying 1109 mechanism, the identity embodied by the delegated credential may be 1110 either "A" or "B acting for A". 1112 For many mechanisms that support delegation, a simple Boolean does 1113 not provide enough control. Examples of additional aspects of 1114 delegation control that a mechanism might provide to an application 1115 are duration of delegation, network addresses from which delegation 1116 is valid, and constraints on the tasks that may be performed by a 1117 delegate. Such controls are presently outside the scope of the GSS- 1118 API. GSS-API implementations supporting mechanisms offering 1119 additional controls should provide extension routines that allow 1120 these controls to be exercised (perhaps by modifying the initiator's 1121 GSS-API credential prior to its use in establishing a context). 1122 However, the simple delegation control provided by GSS-API should 1123 always be able to over-ride other mechanism-specific delegation 1124 controls; if the application instructs GSS_Init_sec_context() that 1125 delegation is not desired, then the implementation must not permit 1126 delegation to occur. This is an exception to the general rule that a 1127 mechanism may enable services even if they are not requested; 1128 delegation may only be provided at the explicit request of the 1129 application. 1131 1.2.10: Interprocess Context Transfer 1133 GSS-API V2 provides routines (GSS_Export_sec_context() and 1134 GSS_Import_sec_context()) which allow a security context to be 1135 transferred between processes on a single machine. The most common 1136 use for such a feature is a client-server design where the server is 1137 implemented as a single process that accepts incoming security 1138 contexts, which then launches child processes to deal with the data 1139 on these contexts. In such a design, the child processes must have 1140 access to the security context data structure created within the 1141 parent by its call to GSS_Accept_sec_context() so that they can use 1142 per-message protection services and delete the security context when 1143 the communication session ends. 1145 Since the security context data structure is expected to contain 1146 sequencing information, it is impractical in general to share a 1147 context between processes. Thus GSS-API provides a call 1148 (GSS_Export_sec_context()) that the process which currently owns the 1149 context can call to declare that it has no intention to use the 1150 context subsequently, and to create an inter-process token containing 1151 information needed by the adopting process to successfully import the 1152 context. After successful completion of this call, the original 1153 security context is made inaccessible to the calling process by GSS- 1154 API, and any context handles referring to this context are no longer 1155 valid. The originating process transfers the inter-process token to 1156 the adopting process, which passes it to GSS_Import_sec_context(), 1157 and a fresh context handle is created such that it is functionally 1158 identical to the original context. 1160 The inter-process token may contain sensitive data from the original 1161 security context (including cryptographic keys). Applications using 1162 inter-process tokens to transfer security contexts must take 1163 appropriate steps to protect these tokens in transit. 1164 Implementations are not required to support the inter-process 1165 transfer of security contexts. The ability to transfer a security 1166 context is indicated when the context is created, by 1167 GSS_Init_sec_context() or GSS_Accept_sec_context() indicating a TRUE 1168 trans_state return value. 1170 2: Interface Descriptions 1172 This section describes the GSS-API's service interface, dividing the 1173 set of calls offered into four groups. Credential management calls 1174 are related to the acquisition and release of credentials by 1175 principals. Context-level calls are related to the management of 1176 security contexts between principals. Per-message calls are related 1177 to the protection of individual messages on established security 1178 contexts. Support calls provide ancillary functions useful to GSS-API 1179 callers. Table 2 groups and summarizes the calls in tabular fashion. 1181 Table 2: GSS-API Calls 1183 CREDENTIAL MANAGEMENT 1185 GSS_Acquire_cred acquire credentials for use 1186 GSS_Release_cred release credentials after use 1187 GSS_Inquire_cred display information about 1188 credentials 1189 GSS_Add_cred construct credentials incrementally 1190 GSS_Inquire_cred_by_mech display per-mechanism credential 1191 information 1193 CONTEXT-LEVEL CALLS 1195 GSS_Init_sec_context initiate outbound security context 1196 GSS_Accept_sec_context accept inbound security context 1197 GSS_Delete_sec_context flush context when no longer needed 1198 GSS_Process_context_token process received control token on 1199 context 1200 GSS_Context_time indicate validity time remaining on 1201 context 1202 GSS_Inquire_context display information about context 1203 GSS_Wrap_size_limit determine GSS_Wrap token size limit 1204 GSS_Export_sec_context transfer context to other process 1205 GSS_Import_sec_context import transferred context 1206 PER-MESSAGE CALLS 1208 GSS_GetMIC apply integrity check, receive as 1209 token separate from message 1210 GSS_VerifyMIC validate integrity check token 1211 along with message 1212 GSS_Wrap sign, optionally encrypt, 1213 encapsulate 1214 GSS_Unwrap decapsulate, decrypt if needed, 1215 validate integrity check 1217 SUPPORT CALLS 1219 GSS_Display_status translate status codes to printable 1220 form 1221 GSS_Indicate_mechs indicate mech_types supported on 1222 local system 1223 GSS_Compare_name compare two names for equality 1224 GSS_Display_name translate name to printable form 1225 GSS_Import_name convert printable name to 1226 normalized form 1227 GSS_Release_name free storage of normalized-form 1228 name 1229 GSS_Release_buffer free storage of general GSS-allocated 1230 object 1231 GSS_Release_OID_set free storage of OID set object 1232 GSS_Create_empty_OID_set create empty OID set 1233 GSS_Add_OID_set_member add member to OID set 1234 GSS_Test_OID_set_member test if OID is member of OID set 1235 GSS_Inquire_names_for_mech indicate name types supported by 1236 mechanism 1237 GSS_Inquire_mechs_for_name indicates mechanisms supporting name 1238 type 1239 GSS_Canonicalize_name translate name to per-mechanism form 1240 GSS_Export_name externalize per-mechanism name 1241 GSS_Duplicate_name duplicate name object 1243 2.1: Credential management calls 1245 These GSS-API calls provide functions related to the management of 1246 credentials. Their characterization with regard to whether or not 1247 they may block pending exchanges with other network entities (e.g., 1248 directories or authentication servers) depends in part on OS-specific 1249 (extra-GSS-API) issues, so is not specified in this document. 1251 The GSS_Acquire_cred() call is defined within the GSS-API in support 1252 of application portability, with a particular orientation towards 1253 support of portable server applications. It is recognized that (for 1254 certain systems and mechanisms) credentials for interactive users may 1255 be managed differently from credentials for server processes; in such 1256 environments, it is the GSS-API implementation's responsibility to 1257 distinguish these cases and the procedures for making this 1258 distinction are a local matter. The GSS_Release_cred() call provides 1259 a means for callers to indicate to the GSS-API that use of a 1260 credentials structure is no longer required. The GSS_Inquire_cred() 1261 call allows callers to determine information about a credentials 1262 structure. The GSS_Add_cred() call enables callers to append 1263 elements to an existing credential structure, allowing iterative 1264 construction of a multi-mechanism credential. The 1265 GSS_Inquire_cred_by_mech() call enables callers to extract per- 1266 mechanism information describing a credentials structure. 1268 2.1.1: GSS_Acquire_cred call 1270 Inputs: 1272 o desired_name INTERNAL NAME, -- NULL requests locally-determined 1273 -- default 1275 o lifetime_req INTEGER, -- in seconds; 0 requests default 1277 o desired_mechs SET OF OBJECT IDENTIFIER, -- empty set requests 1278 -- system-selected default 1280 o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1281 -- 2=ACCEPT-ONLY 1283 Outputs: 1285 o major_status INTEGER, 1287 o minor_status INTEGER, 1289 o output_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL, 1290 -- caller must release with GSS_Release_cred() 1292 o actual_mechs SET OF OBJECT IDENTIFIER, -- if returned non-NULL, 1293 -- caller must release with GSS_Release_oid_set() 1295 o lifetime_rec INTEGER -- in seconds, or reserved value for 1296 -- INDEFINITE 1298 Return major_status codes: 1300 o GSS_S_COMPLETE indicates that requested credentials were 1301 successfully established, for the duration indicated in 1302 lifetime_rec, suitable for the usage requested in cred_usage, 1303 for the set of mech_types indicated in actual_mechs, and that 1304 those credentials can be referenced for subsequent use with 1305 the handle returned in output_cred_handle. 1307 o GSS_S_BAD_MECH indicates that a mech_type unsupported by the 1308 GSS-API implementation type was requested, causing the 1309 credential establishment operation to fail. 1311 o GSS_S_BAD_NAMETYPE indicates that the provided desired_name is 1312 uninterpretable or of a type unsupported by the applicable 1313 underlying GSS-API mechanism(s), so no credentials could be 1314 established for the accompanying desired_name. 1316 o GSS_S_BAD_NAME indicates that the provided desired_name is 1317 inconsistent in terms of internally-incorporated type specifier 1318 information, so no credentials could be established for the 1319 accompanying desired_name. 1321 o GSS_S_CREDENTIALS_EXPIRED indicates that underlying credential 1322 elements corresponding to the requested desired_name have 1323 expired, so requested credentials could not be established. 1325 o GSS_S_NO_CRED indicates that no credential elements corresponding 1326 to the requested desired_name and usage could be accessed, so 1327 requested credentials could not be established. In particular, 1328 this status should be returned upon temporary user-fixable 1329 conditions preventing successful credential establishment. 1331 o GSS_S_FAILURE indicates that credential establishment failed 1332 for reasons unspecified at the GSS-API level, including lack 1333 of authorization to establish and use credentials associated 1334 with the identity named in the input desired_name argument. 1336 GSS_Acquire_cred() is used to acquire credentials so that a principal 1337 can (as a function of the input cred_usage parameter) initiate and/or 1338 accept security contexts under the identity represented by the 1339 desired_name input argument. On successful completion, the returned 1340 output_cred_handle result provides a handle for subsequent references 1341 to the acquired credentials. Typically, single-user client processes 1342 requesting that default credential behavior be applied for context 1343 establishment purposes will have no need to invoke this call. 1345 A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name, 1346 which will be interpreted as a request for a credential handle that 1347 will invoke default behavior when passed to GSS_Init_sec_context(), 1348 if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or 1349 GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or 1350 GSS_C_BOTH. It is possible that multiple pre-established credentials 1351 may exist for the same principal identity (for example, as a result 1352 of multiple user login sessions) when GSS_Acquire_cred() is called; 1353 the means used in such cases to select a specific credential are 1354 local matters. The input lifetime_req argument to GSS_Acquire_cred() 1355 may provide useful information for local GSS-API implementations to 1356 employ in making this disambiguation in a manner which will best 1357 satisfy a caller's intent. 1359 This routine is expected to be used primarily by context acceptors, 1360 since implementations are likely to provide mechanism-specific ways 1361 of obtaining GSS-API initiator credentials from the system login 1362 process. Some implementations may therefore not support the 1363 acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via 1364 GSS_Acquire_cred() for any name other than GSS_C_NO_NAME or the name 1365 which would result from applying the GSS_Inquire_cred() call against 1366 a credential handle corresponding to default behavior. 1368 The lifetime_rec result indicates the length of time for which the 1369 acquired credentials will be valid, as an offset from the present. A 1370 mechanism may return a reserved value indicating INDEFINITE if no 1371 constraints on credential lifetime are imposed. A caller of 1372 GSS_Acquire_cred() can request a length of time for which acquired 1373 credentials are to be valid (lifetime_req argument), beginning at the 1374 present, or can request credentials with a default validity interval. 1375 (Requests for postdated credentials are not supported within the 1376 GSS-API.) Certain mechanisms and implementations may bind in 1377 credential validity period specifiers at a point preliminary to 1378 invocation of the GSS_Acquire_cred() call (e.g., in conjunction with 1379 user login procedures). As a result, callers requesting non-default 1380 values for lifetime_req must recognize that such requests cannot 1381 always be honored and must be prepared to accommodate the use of 1382 returned credentials with different lifetimes as indicated in 1383 lifetime_rec. 1385 The caller of GSS_Acquire_cred() can explicitly specify a set of 1386 mech_types which are to be accommodated in the returned credentials 1387 (desired_mechs argument), or can request credentials for a system- 1388 defined default set of mech_types. Selection of the system-specified 1389 default set is recommended in the interests of application 1390 portability. The actual_mechs return value may be interrogated by the 1391 caller to determine the set of mechanisms with which the returned 1392 credentials may be used. 1394 2.1.2: GSS_Release_cred call 1396 Input: 1398 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1399 -- is specified, the call will complete successfully, but 1400 -- will have no effect; no credential elements will be 1401 -- released. 1403 Outputs: 1405 o major_status INTEGER, 1407 o minor_status INTEGER 1409 Return major_status codes: 1411 o GSS_S_COMPLETE indicates that the credentials referenced by the 1412 input cred_handle were released for purposes of subsequent 1413 access by the caller. The effect on other processes which may 1414 be authorized shared access to such credentials is a local 1415 matter. 1417 o GSS_S_NO_CRED indicates that no release operation was 1418 performed, either because the input cred_handle was invalid or 1419 because the caller lacks authorization to access the 1420 referenced credentials. 1422 o GSS_S_FAILURE indicates that the release operation failed for 1423 reasons unspecified at the GSS-API level. 1425 Provides a means for a caller to explicitly request that credentials 1426 be released when their use is no longer required. Note that system- 1427 specific credential management functions are also likely to exist, 1428 for example to assure that credentials shared among processes are 1429 properly deleted when all affected processes terminate, even if no 1430 explicit release requests are issued by those processes. Given the 1431 fact that multiple callers are not precluded from gaining authorized 1432 access to the same credentials, invocation of GSS_Release_cred() 1433 cannot be assumed to delete a particular set of credentials on a 1434 system-wide basis. 1436 2.1.3: GSS_Inquire_cred call 1438 Input: 1440 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1441 -- specified, default initiator credentials are queried 1443 Outputs: 1445 o major_status INTEGER, 1446 o minor_status INTEGER, 1448 o cred_name INTERNAL NAME, -- caller must release with 1449 -- GSS_Release_name() 1451 o lifetime_rec INTEGER -- in seconds, or reserved value for 1452 -- INDEFINITE 1454 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1455 -- 2=ACCEPT-ONLY 1457 o mech_set SET OF OBJECT IDENTIFIER -- caller must release 1458 -- with GSS_Release_oid_set() 1460 Return major_status codes: 1462 o GSS_S_COMPLETE indicates that the credentials referenced by the 1463 input cred_handle argument were valid, and that the output 1464 cred_name, lifetime_rec, and cred_usage values represent, 1465 respectively, the credentials' associated principal name, 1466 remaining lifetime, suitable usage modes, and supported 1467 mechanism types. 1469 o GSS_S_NO_CRED indicates that no information could be returned 1470 about the referenced credentials, either because the input 1471 cred_handle was invalid or because the caller lacks 1472 authorization to access the referenced credentials. 1474 o GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced 1475 credentials are invalid. 1477 o GSS_S_CREDENTIALS_EXPIRED indicates that the referenced 1478 credentials have expired. 1480 o GSS_S_FAILURE indicates that the operation failed for 1481 reasons unspecified at the GSS-API level. 1483 The GSS_Inquire_cred() call is defined primarily for the use of those 1484 callers which request use of default credential behavior rather than 1485 acquiring credentials explicitly with GSS_Acquire_cred(). It enables 1486 callers to determine a credential structure's associated principal 1487 name, remaining validity period, usability for security context 1488 initiation and/or acceptance, and supported mechanisms. 1490 For a multi-mechanism credential, the returned "lifetime" specifier 1491 indicates the shortest lifetime of any of the mechanisms' elements in 1492 the credential (for either context initiation or acceptance 1493 purposes). 1495 GSS_Inquire_cred() should indicate INITIATE-AND-ACCEPT for 1496 "cred_usage" if both of the following conditions hold: 1498 (1) there exists in the credential an element which allows 1499 context initiation using some mechanism 1501 (2) there exists in the credential an element which allows 1502 context acceptance using some mechanism (allowably, but not 1503 necessarily, one of the same mechanism(s) qualifying for (1)). 1505 If condition (1) holds but not condition (2), GSS_Inquire_cred() 1506 should indicate INITIATE-ONLY for "cred_usage". If condition (2) 1507 holds but not condition (1), GSS_Inquire_cred() should indicate 1508 ACCEPT-ONLY for "cred_usage". 1510 Callers requiring finer disambiguation among available combinations 1511 of lifetimes, usage modes, and mechanisms should call the 1512 GSS_Inquire_cred_by_mech() routine, passing that routine one of the 1513 mech OIDs returned by GSS_Inquire_cred(). 1515 2.1.4: GSS_Add_cred call 1517 Inputs: 1519 o input_cred_handle CREDENTIAL HANDLE -- handle to credential 1520 -- structure created with prior GSS_Acquire_cred() or 1521 -- GSS_Add_cred() call; see text for definition of behavior 1522 -- when GSS_C_NO_CREDENTIAL provided. 1524 o desired_name INTERNAL NAME 1526 o initiator_time_req INTEGER -- in seconds; 0 requests default 1528 o acceptor_time_req INTEGER -- in seconds; 0 requests default 1530 o desired_mech OBJECT IDENTIFIER 1532 o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1533 -- 2=ACCEPT-ONLY 1535 Outputs: 1537 o major_status INTEGER, 1539 o minor_status INTEGER, 1541 o output_cred_handle CREDENTIAL HANDLE, -- NULL to request that 1542 -- credential elements be added "in place" to the credential 1543 -- structure identified by input_cred_handle, 1544 -- non-NULL pointer to request that 1545 -- a new credential structure and handle be created. 1546 -- if credential handle returned, caller must release with 1547 -- GSS_Release_cred() 1549 o actual_mechs SET OF OBJECT IDENTIFIER, -- if returned, caller must 1550 -- release with GSS_Release_oid_set() 1552 o initiator_time_rec INTEGER -- in seconds, or reserved value for 1553 -- INDEFINITE 1555 o acceptor_time_rec INTEGER -- in seconds, or reserved value for 1556 -- INDEFINITE 1558 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1559 -- 2=ACCEPT-ONLY 1561 o mech_set SET OF OBJECT IDENTIFIER -- full set of mechanisms 1562 -- supported by resulting credential. 1564 Return major_status codes: 1566 o GSS_S_COMPLETE indicates that the credentials referenced by 1567 the input_cred_handle argument were valid, and that the 1568 resulting credential from GSS_Add_cred() is valid for the 1569 durations indicated in initiator_time_rec and acceptor_time_rec, 1570 suitable for the usage requested in cred_usage, and for the 1571 mechanisms indicated in actual_mechs. 1573 o GSS_S_DUPLICATE_ELEMENT indicates that the input desired_mech 1574 specified a mechanism for which the referenced credential 1575 already contained a credential element with overlapping cred_usage 1576 and validity time specifiers. 1578 o GSS_S_BAD_MECH indicates that the input desired_mech specified 1579 a mechanism unsupported by the GSS-API implementation, causing 1580 the GSS_Add_cred() operation to fail. 1582 o GSS_S_BAD_NAMETYPE indicates that the provided desired_name 1583 is uninterpretable or of a type unsupported by the applicable 1584 underlying GSS-API mechanism(s), so the GSS_Add_cred() operation 1585 could not be performed for that name. 1587 o GSS_S_BAD_NAME indicates that the provided desired_name is 1588 inconsistent in terms of internally-incorporated type specifier 1589 information, so the GSS_Add_cred() operation could not be 1590 performed for that name. 1592 o GSS_S_NO_CRED indicates that the input_cred_handle referenced 1593 invalid or inaccessible credentials. In particular, 1594 this status should be returned upon temporary user-fixable 1595 conditions preventing successful credential establishment. 1597 o GSS_S_CREDENTIALS_EXPIRED indicates that referenced credential 1598 elements have expired, so the GSS_Add_cred() operation could 1599 not be performed. 1601 o GSS_S_FAILURE indicates that the operation failed for 1602 reasons unspecified at the GSS-API level, including lack of 1603 authorization to establish or use credentials representing 1604 the requested identity. 1606 GSS_Add_cred() enables callers to construct credentials iteratively 1607 by adding credential elements in successive operations, corresponding 1608 to different mechanisms. This offers particular value in multi- 1609 mechanism environments, as the major_status and minor_status values 1610 returned on each iteration are individually visible and can therefore 1611 be interpreted unambiguously on a per-mechanism basis. A credential 1612 element is identified by the name of the principal to which it 1613 refers. GSS-API implementations must impose a local access control 1614 policy on callers of this routine to prevent unauthorized callers 1615 from acquiring credential elements to which they are not entitled. 1616 This routine is not intended to provide a ``login to the network'' 1617 function, as such a function would involve the creation of new 1618 mechanism-specific authentication data, rather than merely acquiring 1619 a GSS-API handle to existing data. Such functions, if required, 1620 should be defined in implementation-specific extension routines. 1622 If credential acquisition is time-consuming for a mechanism, the 1623 mechanism may choose to delay the actual acquisition until the 1624 credential is required (e.g. by GSS_Init_sec_context() or 1625 GSS_Accept_sec_context()). Such mechanism-specific implementation 1626 decisions should be invisible to the calling application; thus a call 1627 of GSS_Inquire_cred() immediately following the call of 1628 GSS_Acquire_cred() must return valid credential data, and may 1629 therefore incur the overhead of a deferred credential acquisition. 1631 If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL 1632 output_cred_handle must be supplied. For the case of 1633 GSS_C_NO_CREDENTIAL as input_cred_handle, GSS_Add_cred() will create 1634 the credential referenced by its output_cred_handle based on default 1635 behavior. That is, the call will have the same effect as if the 1636 caller had previously called GSS_Acquire_cred(), specifying the same 1637 usage and passing GSS_C_NO_NAME as the desired_name parameter 1638 (thereby obtaining an explicit credential handle corresponding to 1639 default behavior), had passed that credential handle to 1640 GSS_Add_cred(), and had finally called GSS_Release_cred() on the 1641 credential handle received from GSS_Acquire_cred(). 1643 This routine is expected to be used primarily by context acceptors, 1644 since implementations are likely to provide mechanism-specific ways 1645 of obtaining GSS-API initiator credentials from the system login 1646 process. Some implementations may therefore not support the 1647 acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via 1648 GSS_Acquire_cred() for any name other than GSS_C_NO_NAME or the name 1649 which would result from applying the GSS_Inquire_cred() call against 1650 a credential handle corresponding to default behavior. 1652 A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name, 1653 which will be interpreted as a request for a credential handle that 1654 will invoke default behavior when passed to GSS_Init_sec_context(), 1655 if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or 1656 GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or 1657 GSS_C_BOTH. 1659 The same input desired_name, or default reference, should be used on 1660 all GSS_Acquire_cred() and GSS_Add_cred() calls corresponding to a 1661 particular credential. 1663 2.1.5: GSS_Inquire_cred_by_mech call 1665 Inputs: 1667 o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL 1668 -- specified, default initiator credentials are queried 1670 o mech_type OBJECT IDENTIFIER -- specific mechanism for 1671 -- which credentials are being queried 1673 Outputs: 1675 o major_status INTEGER, 1677 o minor_status INTEGER, 1679 o cred_name INTERNAL NAME, -- guaranteed to be MN; caller must 1680 -- release with GSS_Release_name() 1682 o lifetime_rec_initiate INTEGER -- in seconds, or reserved value for 1683 -- INDEFINITE 1685 o lifetime_rec_accept INTEGER -- in seconds, or reserved value for 1686 -- INDEFINITE 1687 o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 1688 -- 2=ACCEPT-ONLY 1690 Return major_status codes: 1692 o GSS_S_COMPLETE indicates that the credentials referenced by the 1693 input cred_handle argument were valid, that the mechanism 1694 indicated by the input mech_type was represented with elements 1695 within those credentials, and that the output cred_name, 1696 lifetime_rec_initiate, lifetime_rec_accept, and cred_usage values 1697 represent, respectively, the credentials' associated principal 1698 name, remaining lifetimes, and suitable usage modes. 1700 o GSS_S_NO_CRED indicates that no information could be returned 1701 about the referenced credentials, either because the input 1702 cred_handle was invalid or because the caller lacks 1703 authorization to access the referenced credentials. 1705 o GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced 1707 credentials are invalid. 1709 o GSS_S_CREDENTIALS_EXPIRED indicates that the referenced 1710 credentials have expired. 1712 o GSS_S_BAD_MECH indicates that the referenced credentials do not 1713 contain elements for the requested mechanism. 1715 o GSS_S_FAILURE indicates that the operation failed for reasons 1716 unspecified at the GSS-API level. 1718 The GSS_Inquire_cred_by_mech() call enables callers in multi- 1719 mechanism environments to acquire specific data about available 1720 combinations of lifetimes, usage modes, and mechanisms within a 1721 credential structure. The lifetime_rec_initiate result indicates the 1722 available lifetime for context initiation purposes; the 1723 lifetime_rec_accept result indicates the available lifetime for 1724 context acceptance purposes. 1726 2.2: Context-level calls 1728 This group of calls is devoted to the establishment and management of 1729 security contexts between peers. A context's initiator calls 1730 GSS_Init_sec_context(), resulting in generation of a token which the 1731 caller passes to the target. At the target, that token is passed to 1732 GSS_Accept_sec_context(). Depending on the underlying mech_type and 1733 specified options, additional token exchanges may be performed in the 1734 course of context establishment; such exchanges are accommodated by 1735 GSS_S_CONTINUE_NEEDED status returns from GSS_Init_sec_context() and 1736 GSS_Accept_sec_context(). 1738 Either party to an established context may invoke 1739 GSS_Delete_sec_context() to flush context information when a context 1740 is no longer required. GSS_Process_context_token() is used to process 1741 received tokens carrying context-level control information. 1742 GSS_Context_time() allows a caller to determine the length of time 1743 for which an established context will remain valid. 1744 GSS_Inquire_context() returns status information describing context 1745 characteristics. GSS_Wrap_size_limit() allows a caller to determine 1746 the size of a token which will be generated by a GSS_Wrap() 1747 operation. GSS_Export_sec_context() and GSS_Import_sec_context() 1748 enable transfer of active contexts between processes on an end 1749 system. 1751 2.2.1: GSS_Init_sec_context call 1753 Inputs: 1755 o claimant_cred_handle CREDENTIAL HANDLE, -- NULL specifies "use 1756 -- default" 1758 o input_context_handle CONTEXT HANDLE, -- 0 specifies "none assigned 1759 -- yet" 1761 o targ_name INTERNAL NAME, 1763 o mech_type OBJECT IDENTIFIER, -- NULL parameter specifies "use 1764 -- default" 1766 o deleg_req_flag BOOLEAN, 1768 o mutual_req_flag BOOLEAN, 1770 o replay_det_req_flag BOOLEAN, 1772 o sequence_req_flag BOOLEAN, 1774 o anon_req_flag BOOLEAN, 1776 o conf_req_flag BOOLEAN, 1778 o integ_req_flag BOOLEAN, 1780 o lifetime_req INTEGER, -- 0 specifies default lifetime 1782 o chan_bindings OCTET STRING, 1783 o input_token OCTET STRING -- NULL or token received from target 1785 Outputs: 1787 o major_status INTEGER, 1789 o minor_status INTEGER, 1791 o output_context_handle CONTEXT HANDLE, -- once returned non-NULL, 1792 -- caller must release with GSS_Delete_sec_context() 1794 o mech_type OBJECT IDENTIFIER, -- actual mechanism always 1795 -- indicated, never NULL; caller should treat as read-only 1796 -- and should not attempt to release 1798 o output_token OCTET STRING, -- NULL or token to pass to context 1799 -- target; caller must release with GSS_Release_buffer() 1801 o deleg_state BOOLEAN, 1803 o mutual_state BOOLEAN, 1805 o replay_det_state BOOLEAN, 1807 o sequence_state BOOLEAN, 1809 o anon_state BOOLEAN, 1811 o trans_state BOOLEAN, 1813 o prot_ready_state BOOLEAN, -- see Section 1.2.7 1815 o conf_avail BOOLEAN, 1817 o integ_avail BOOLEAN, 1819 o lifetime_rec INTEGER -- in seconds, or reserved value for 1820 -- INDEFINITE 1822 This call may block pending network interactions for those mech_types 1823 in which an authentication server or other network entity must be 1824 consulted on behalf of a context initiator in order to generate an 1825 output_token suitable for presentation to a specified target. 1827 Return major_status codes: 1829 o GSS_S_COMPLETE indicates that context-level information was 1830 successfully initialized, and that the returned output_token 1831 will provide sufficient information for the target to perform 1832 per-message processing on the newly-established context. 1834 o GSS_S_CONTINUE_NEEDED indicates that control information in the 1835 returned output_token must be sent to the target, and that a 1836 reply must be received and passed as the input_token argument 1837 to a continuation call to GSS_Init_sec_context(), before 1838 per-message processing can be performed in conjunction with 1839 this context. 1841 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks 1842 performed on the input_token failed, preventing further 1843 processing from being performed based on that token. 1845 o GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks 1846 performed on the credential structure referenced by 1847 claimant_cred_handle failed, preventing further processing from 1848 being performed using that credential structure. 1850 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 1851 input_token contains an incorrect integrity check, so 1852 context setup cannot be accomplished. 1854 o GSS_S_NO_CRED indicates that no context was established, 1855 either because the input cred_handle was invalid, because the 1856 referenced credentials are valid for context acceptor use 1857 only, because the caller lacks authorization to access the 1858 referenced credentials, or because the resolution of default 1859 credentials failed. 1861 o GSS_S_CREDENTIALS_EXPIRED indicates that the credentials 1862 provided through the input claimant_cred_handle argument are no 1863 longer valid, so context establishment cannot be completed. 1865 o GSS_S_BAD_BINDINGS indicates that a mismatch between the 1866 caller-provided chan_bindings and those extracted from the 1867 input_token was detected, signifying a security-relevant 1868 event and preventing context establishment. (This result will 1869 be returned by GSS_Init_sec_context() only for contexts where 1870 mutual_state is TRUE.) 1872 o GSS_S_OLD_TOKEN indicates that the input_token is too old to 1873 be checked for integrity. This is a fatal error during context 1874 establishment. 1876 o GSS_S_DUPLICATE_TOKEN indicates that the input token has a 1877 correct integrity check, but is a duplicate of a token already 1878 processed. This is a fatal error during context establishment. 1880 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 1881 for the input context_handle provided; this major status will 1882 be returned only for successor calls following GSS_S_CONTINUE_ 1883 NEEDED status returns. 1885 o GSS_S_BAD_NAMETYPE indicates that the provided targ_name is 1886 of a type uninterpretable or unsupported by the applicable 1887 underlying GSS-API mechanism(s), so context establishment 1888 cannot be completed. 1890 o GSS_S_BAD_NAME indicates that the provided targ_name is 1891 inconsistent in terms of internally-incorporated type specifier 1892 information, so context establishment cannot be accomplished. 1894 o GSS_S_BAD_MECH indicates receipt of a context establishment token 1895 or of a caller request specifying a mechanism unsupported by 1896 the local system or with the caller's active credentials 1898 o GSS_S_FAILURE indicates that context setup could not be 1899 accomplished for reasons unspecified at the GSS-API level, and 1900 that no interface-defined recovery action is available. 1902 This routine is used by a context initiator, and ordinarily emits one 1903 (or, for the case of a multi-step exchange, more than one) 1904 output_token suitable for use by the target within the selected 1905 mech_type's protocol. Using information in the credentials structure 1906 referenced by claimant_cred_handle, GSS_Init_sec_context() 1907 initializes the data structures required to establish a security 1908 context with target targ_name. The targ_name may be any valid 1909 INTERNAL NAME; it need not be an MN. The claimant_cred_handle must 1910 correspond to the same valid credentials structure on the initial 1911 call to GSS_Init_sec_context() and on any successor calls resulting 1912 from GSS_S_CONTINUE_NEEDED status returns; different protocol 1913 sequences modeled by the GSS_S_CONTINUE_NEEDED facility will require 1914 access to credentials at different points in the context 1915 establishment sequence. 1917 The input_context_handle argument is 0, specifying "not yet 1918 assigned", on the first GSS_Init_sec_context() call relating to a 1919 given context. If successful (i.e., if accompanied by major_status 1920 GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the 1921 initial GSS_Init_sec_context() call returns a non-zero 1922 output_context_handle for use in future references to this context. 1923 Once a non-zero output_context_handle has been returned, GSS-API 1924 callers should call GSS_Delete_sec_context() to release context- 1925 related resources if errors occur in later phases of context 1926 establishment, or when an established context is no longer required. 1927 If GSS_Init_sec_context() is passed the handle of a context which is 1928 already fully established, GSS_S_FAILURE status is returned. 1930 When continuation attempts to GSS_Init_sec_context() are needed to 1931 perform context establishment, the previously-returned non-zero 1932 handle value is entered into the input_context_handle argument and 1933 will be echoed in the returned output_context_handle argument. On 1934 such continuation attempts (and only on continuation attempts) the 1935 input_token value is used, to provide the token returned from the 1936 context's target. 1938 The chan_bindings argument is used by the caller to provide 1939 information binding the security context to security-related 1940 characteristics (e.g., addresses, cryptographic keys) of the 1941 underlying communications channel. See Section 1.1.6 of this document 1942 for more discussion of this argument's usage. 1944 The input_token argument contains a message received from the target, 1945 and is significant only on a call to GSS_Init_sec_context() which 1946 follows a previous return indicating GSS_S_CONTINUE_NEEDED 1947 major_status. 1949 It is the caller's responsibility to establish a communications path 1950 to the target, and to transmit any returned output_token (independent 1951 of the accompanying returned major_status value) to the target over 1952 that path. The output_token can, however, be transmitted along with 1953 the first application-provided input message to be processed by 1954 GSS_GetMIC() or GSS_Wrap() in conjunction with a successfully- 1955 established context. 1957 The initiator may request various context-level functions through 1958 input flags: the deleg_req_flag requests delegation of access rights, 1959 the mutual_req_flag requests mutual authentication, the 1960 replay_det_req_flag requests that replay detection features be 1961 applied to messages transferred on the established context, and the 1962 sequence_req_flag requests that sequencing be enforced. (See Section 1963 1.2.3 for more information on replay detection and sequencing 1964 features.) The anon_req_flag requests that the initiator's identity 1965 not be transferred within tokens to be sent to the acceptor. The 1966 conf_req_flag and integ_req_flag provide informatory inputs to the 1967 GSS-API implementation as to whether, respectively, per-message 1968 confidentiality and per-message integrity services will be required 1969 on the context. 1971 Not all of the optionally-requestable features will be available in 1972 all underlying mech_types. The corresponding return state values 1973 deleg_state, mutual_state, replay_det_state, and sequence_state 1974 indicate, as a function of mech_type processing capabilities and 1975 initiator-provided input flags, the set of features which will be 1976 active on the context. The returned trans_state value indicates 1977 whether the context is transferable to other processes through use of 1978 GSS_Export_sec_context(). These state indicators' values are 1979 undefined unless either the routine's major_status indicates 1980 GSS_S_COMPLETE, or TRUE prot_ready_state is returned along with 1981 GSS_S_CONTINUE_NEEDED major_status; for the latter case, it is 1982 possible that additional features, not confirmed or indicated along 1983 with TRUE prot_ready_state, will be confirmed and indicated when 1984 GSS_S_COMPLETE is subsequently returned. 1986 The returned anon_state and prot_ready_state values are significant 1987 for both GSS_S_COMPLETE and GSS_S_CONTINUE_NEEDED major_status 1988 returns from GSS_Init_sec_context(). When anon_state is returned 1989 TRUE, this indicates that neither the current token nor its 1990 predecessors delivers or has delivered the initiator's identity. 1991 Callers wishing to perform context establishment only if anonymity 1992 support is provided should transfer a returned token from 1993 GSS_Init_sec_context() to the peer only if it is accompanied by a 1994 TRUE anon_state indicator. When prot_ready_state is returned TRUE in 1995 conjunction with GSS_S_CONTINUE_NEEDED major_status, this indicates 1996 that per-message protection operations may be applied on the context: 1997 see Section 1.2.7 for further discussion of this facility. 1999 Failure to provide the precise set of features requested by the 2000 caller does not cause context establishment to fail; it is the 2001 caller's prerogative to delete the context if the feature set 2002 provided is unsuitable for the caller's use. 2004 The returned mech_type value indicates the specific mechanism 2005 employed on the context; it will never indicate the value for 2006 "default". A valid mech_type result must be returned along with a 2007 GSS_S_COMPLETE status return; GSS-API implementations may (but are 2008 not required to) also return mech_type along with predecessor calls 2009 indicating GSS_S_CONTINUE_NEEDED status. For the case of mechanisms 2010 which themselves perform negotiation, the returned mech_type result 2011 may indicate selection of a mechanism identified by an OID different 2012 than that passed in the input mech_type argument, and the returned 2013 value may change between successive calls returning 2014 GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE. 2016 The conf_avail return value indicates whether the context supports 2017 per-message confidentiality services, and so informs the caller 2018 whether or not a request for encryption through the conf_req_flag 2019 input to GSS_Wrap() can be honored. In similar fashion, the 2020 integ_avail return value indicates whether per-message integrity 2021 services are available (through either GSS_GetMIC() or GSS_Wrap()) on 2022 the established context. These state indicators' values are undefined 2023 unless either the routine's major_status indicates GSS_S_COMPLETE, or 2024 TRUE prot_ready_state is returned along with GSS_S_CONTINUE_NEEDED 2025 major_status. 2027 The lifetime_req input specifies a desired upper bound for the 2028 lifetime of the context to be established, with a value of 0 used to 2029 request a default lifetime. The lifetime_rec return value indicates 2030 the length of time for which the context will be valid, expressed as 2031 an offset from the present; depending on mechanism capabilities, 2032 credential lifetimes, and local policy, it may not correspond to the 2033 value requested in lifetime_req. If no constraints on context 2034 lifetime are imposed, this may be indicated by returning a reserved 2035 value representing INDEFINITE lifetime_req. The value of lifetime_rec 2036 is undefined unless the routine's major_status indicates 2037 GSS_S_COMPLETE. 2039 If the mutual_state is TRUE, this fact will be reflected within the 2040 output_token. A call to GSS_Accept_sec_context() at the target in 2041 conjunction with such a context will return a token, to be processed 2042 by a continuation call to GSS_Init_sec_context(), in order to achieve 2043 mutual authentication. 2045 2.2.2: GSS_Accept_sec_context call 2047 Inputs: 2049 o acceptor_cred_handle CREDENTIAL HANDLE, -- NULL specifies 2050 -- "use default" 2052 o input_context_handle CONTEXT HANDLE, -- 0 specifies 2053 -- "not yet assigned" 2055 o chan_bindings OCTET STRING, 2057 o input_token OCTET STRING 2059 Outputs: 2061 o major_status INTEGER, 2063 o minor_status INTEGER, 2065 o src_name INTERNAL NAME, -- guaranteed to be MN 2066 -- once returned, caller must release with GSS_Release_name() 2068 o mech_type OBJECT IDENTIFIER, -- caller should treat as 2069 -- read-only; does not need to be released 2071 o output_context_handle CONTEXT HANDLE, -- once returned 2072 -- non-NULL in context establishment sequence, caller 2073 -- must release with GSS_Delete_sec_context() 2075 o deleg_state BOOLEAN, 2077 o mutual_state BOOLEAN, 2079 o replay_det_state BOOLEAN, 2081 o sequence_state BOOLEAN, 2083 o anon_state BOOLEAN, 2085 o trans_state BOOLEAN, 2087 o prot_ready_state BOOLEAN, -- see Section 1.2.7 for discussion 2089 o conf_avail BOOLEAN, 2091 o integ_avail BOOLEAN, 2093 o lifetime_rec INTEGER, -- in seconds, or reserved value for 2094 -- INDEFINITE 2096 o delegated_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL, 2097 -- caller must release with GSS_Release_cred() 2099 o output_token OCTET STRING -- NULL or token to pass to context 2100 -- initiator; if returned non-NULL, caller must release with 2101 -- GSS_Release_buffer() 2103 This call may block pending network interactions for those mech_types 2104 in which a directory service or other network entity must be 2105 consulted on behalf of a context acceptor in order to validate a 2106 received input_token. 2108 Return major_status codes: 2110 o GSS_S_COMPLETE indicates that context-level data structures 2111 were successfully initialized, and that per-message processing 2112 can now be performed in conjunction with this context. 2114 o GSS_S_CONTINUE_NEEDED indicates that control information in the 2115 returned output_token must be sent to the initiator, and that 2116 a response must be received and passed as the input_token 2117 argument to a continuation call to GSS_Accept_sec_context(), 2118 before per-message processing can be performed in conjunction 2119 with this context. 2121 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 2122 on the input_token failed, preventing further processing from 2123 being performed based on that token. 2125 o GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks 2126 performed on the credential structure referenced by 2127 acceptor_cred_handle failed, preventing further processing from 2128 being performed using that credential structure. 2130 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 2131 input_token contains an incorrect integrity check, so context 2132 setup cannot be accomplished. 2134 o GSS_S_DUPLICATE_TOKEN indicates that the integrity check on the 2135 received input_token was correct, but that the input_token 2136 was recognized as a duplicate of an input_token already 2137 processed. No new context is established. 2139 o GSS_S_OLD_TOKEN indicates that the integrity check on the received 2140 input_token was correct, but that the input_token is too old 2141 to be checked for duplication against previously-processed 2142 input_tokens. No new context is established. 2144 o GSS_S_NO_CRED indicates that no context was established, either 2145 because the input cred_handle was invalid, because the 2146 referenced credentials are valid for context initiator use 2147 only, because the caller lacks authorization to access the 2148 referenced credentials, or because the procedure for default 2149 credential resolution failed. 2151 o GSS_S_CREDENTIALS_EXPIRED indicates that the credentials provided 2152 through the input acceptor_cred_handle argument are no 2153 longer valid, so context establishment cannot be completed. 2155 o GSS_S_BAD_BINDINGS indicates that a mismatch between the 2156 caller-provided chan_bindings and those extracted from the 2157 input_token was detected, signifying a security-relevant 2158 event and preventing context establishment. 2160 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2161 for the input context_handle provided; this major status will 2162 be returned only for successor calls following GSS_S_CONTINUE_ 2163 NEEDED status returns. 2165 o GSS_S_BAD_MECH indicates receipt of a context establishment token 2166 specifying a mechanism unsupported by the local system or with 2167 the caller's active credentials. 2169 o GSS_S_FAILURE indicates that context setup could not be 2170 accomplished for reasons unspecified at the GSS-API level, and 2171 that no interface-defined recovery action is available. 2173 The GSS_Accept_sec_context() routine is used by a context target. 2174 Using information in the credentials structure referenced by the 2175 input acceptor_cred_handle, it verifies the incoming input_token and 2176 (following the successful completion of a context establishment 2177 sequence) returns the authenticated src_name and the mech_type used. 2178 The returned src_name is guaranteed to be an MN, processed by the 2179 mechanism under which the context was established. The 2180 acceptor_cred_handle must correspond to the same valid credentials 2181 structure on the initial call to GSS_Accept_sec_context() and on any 2182 successor calls resulting from GSS_S_CONTINUE_NEEDED status returns; 2183 different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED 2184 mechanism will require access to credentials at different points in 2185 the context establishment sequence. 2187 The input_context_handle argument is 0, specifying "not yet 2188 assigned", on the first GSS_Accept_sec_context() call relating to a 2189 given context. If successful (i.e., if accompanied by major_status 2190 GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the 2191 initial GSS_Accept_sec_context() call returns a non-zero 2192 output_context_handle for use in future references to this context. 2193 Once a non-zero output_context_handle has been returned, GSS-API 2194 callers should call GSS_Delete_sec_context() to release context- 2195 related resources if errors occur in later phases of context 2196 establishment, or when an established context is no longer required. 2197 If GSS_Accept_sec_context() is passed the handle of a context which 2198 is already fully established, GSS_S_FAILURE status is returned. 2200 The chan_bindings argument is used by the caller to provide 2201 information binding the security context to security-related 2202 characteristics (e.g., addresses, cryptographic keys) of the 2203 underlying communications channel. See Section 1.1.6 of this document 2204 for more discussion of this argument's usage. 2206 The returned state results (deleg_state, mutual_state, 2207 replay_det_state, sequence_state, anon_state, trans_state, and 2208 prot_ready_state) reflect the same information as described for 2209 GSS_Init_sec_context(), and their values are significant under the 2210 same return state conditions. 2212 The conf_avail return value indicates whether the context supports 2213 per-message confidentiality services, and so informs the caller 2214 whether or not a request for encryption through the conf_req_flag 2215 input to GSS_Wrap() can be honored. In similar fashion, the 2216 integ_avail return value indicates whether per-message integrity 2217 services are available (through either GSS_GetMIC() or GSS_Wrap()) 2218 on the established context. These values are significant under the 2219 same return state conditions as described under 2220 GSS_Init_sec_context(). 2222 The lifetime_rec return value is significant only in conjunction with 2223 GSS_S_COMPLETE major_status, and indicates the length of time for 2224 which the context will be valid, expressed as an offset from the 2225 present. 2227 The returned mech_type value indicates the specific mechanism 2228 employed on the context; it will never indicate the value for 2229 "default". A valid mech_type result must be returned whenever 2230 GSS_S_COMPLETE status is indicated; GSS-API implementations may (but 2231 are not required to) also return mech_type along with predecessor 2232 calls indicating GSS_S_CONTINUE_NEEDED status. For the case of 2233 mechanisms which themselves perform negotiation, the returned 2234 mech_type result may indicate selection of a mechanism identified by 2235 an OID different than that passed in the input mech_type argument, 2236 and the returned value may change between successive calls returning 2237 GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE. 2239 The delegated_cred_handle result is significant only when deleg_state 2240 is TRUE, and provides a means for the target to reference the 2241 delegated credentials. The output_token result, when non-NULL, 2242 provides a context-level token to be returned to the context 2243 initiator to continue a multi-step context establishment sequence. As 2244 noted with GSS_Init_sec_context(), any returned token should be 2245 transferred to the context's peer (in this case, the context 2246 initiator), independent of the value of the accompanying returned 2247 major_status. 2249 Note: A target must be able to distinguish a context-level 2250 input_token, which is passed to GSS_Accept_sec_context(), from the 2251 per-message data elements passed to GSS_VerifyMIC() or GSS_Unwrap(). 2252 These data elements may arrive in a single application message, and 2253 GSS_Accept_sec_context() must be performed before per-message 2254 processing can be performed successfully. 2256 2.2.3: GSS_Delete_sec_context call 2258 Input: 2260 o context_handle CONTEXT HANDLE 2262 Outputs: 2264 o major_status INTEGER, 2265 o minor_status INTEGER, 2267 o output_context_token OCTET STRING 2269 Return major_status codes: 2271 o GSS_S_COMPLETE indicates that the context was recognized, and that 2272 relevant context-specific information was flushed. If the caller 2273 provides a non-null buffer to receive an output_context_token, and 2274 the mechanism returns a non-NULL token into that buffer, the 2275 returned output_context_token is ready for transfer to the 2276 context's peer. 2278 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2279 for the input context_handle provided, so no deletion was 2280 performed. 2282 o GSS_S_FAILURE indicates that the context is recognized, but 2283 that the GSS_Delete_sec_context() operation could not be 2284 performed for reasons unspecified at the GSS-API level. 2286 This call can be made by either peer in a security context, to flush 2287 context-specific information. Once a non-zero output_context_handle 2288 has been returned by context establishment calls, GSS-API callers 2289 should call GSS_Delete_sec_context() to release context-related 2290 resources if errors occur in later phases of context establishment, 2291 or when an established context is no longer required. This call may 2292 block pending network interactions for mech_types in which active 2293 notification must be made to a central server when a security context 2294 is to be deleted. 2296 If a non-null output_context_token parameter is provided by the 2297 caller, an output_context_token may be returned to the caller. If an 2298 output_context_token is provided to the caller, it can be passed to 2299 the context's peer to inform the peer's GSS-API implementation that 2300 the peer's corresponding context information can also be flushed. 2301 (Once a context is established, the peers involved are expected to 2302 retain cached credential and context-related information until the 2303 information's expiration time is reached or until a 2304 GSS_Delete_sec_context() call is made.) 2306 The facility for context_token usage to signal context deletion is 2307 retained for compatibility with GSS-API Version 1. For current 2308 usage, it is recommended that both peers to a context invoke 2309 GSS_Delete_sec_context() independently, passing a null 2310 output_context_token buffer to indicate that no context_token is 2311 required. Implementations of GSS_Delete_sec_context() should delete 2312 relevant locally-stored context information. 2314 Attempts to perform per-message processing on a deleted context will 2315 result in error returns. 2317 2.2.4: GSS_Process_context_token call 2319 Inputs: 2321 o context_handle CONTEXT HANDLE, 2323 o input_context_token OCTET STRING 2325 Outputs: 2327 o major_status INTEGER, 2329 o minor_status INTEGER, 2331 Return major_status codes: 2333 o GSS_S_COMPLETE indicates that the input_context_token was 2334 successfully processed in conjunction with the context 2335 referenced by context_handle. 2337 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks 2338 performed on the received context_token failed, preventing 2339 further processing from being performed with that token. 2341 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2342 for the input context_handle provided. 2344 o GSS_S_FAILURE indicates that the context is recognized, but 2345 that the GSS_Process_context_token() operation could not be 2346 performed for reasons unspecified at the GSS-API level. 2348 This call is used to process context_tokens received from a peer once 2349 a context has been established, with corresponding impact on 2350 context-level state information. One use for this facility is 2351 processing of the context_tokens generated by 2352 GSS_Delete_sec_context(); GSS_Process_context_token() will not block 2353 pending network interactions for that purpose. Another use is to 2354 process tokens indicating remote-peer context establishment failures 2355 after the point where the local GSS-API implementation has already 2356 indicated GSS_S_COMPLETE status. 2358 2.2.5: GSS_Context_time call 2360 Input: 2362 o context_handle CONTEXT HANDLE, 2364 Outputs: 2366 o major_status INTEGER, 2368 o minor_status INTEGER, 2370 o lifetime_rec INTEGER -- in seconds, or reserved value for 2371 -- INDEFINITE 2373 Return major_status codes: 2375 o GSS_S_COMPLETE indicates that the referenced context is valid, 2376 and will remain valid for the amount of time indicated in 2377 lifetime_rec. 2379 o GSS_S_CONTEXT_EXPIRED indicates that data items related to the 2380 referenced context have expired. 2382 o GSS_S_CREDENTIALS_EXPIRED indicates that the context is 2383 recognized, 2384 but that its associated credentials have expired. Return of this 2385 status by GSS_Context_time() is deprecated. 2387 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2388 for the input context_handle provided. 2390 o GSS_S_FAILURE indicates that the requested operation failed for 2391 reasons unspecified at the GSS-API level. 2393 This call is used to determine the amount of time for which a 2394 currently established context will remain valid. 2396 2.2.6: GSS_Inquire_context call 2398 Input: 2400 o context_handle CONTEXT HANDLE, 2402 Outputs: 2404 o major_status INTEGER, 2406 o minor_status INTEGER, 2408 o src_name INTERNAL NAME, -- name of context initiator, 2409 -- guaranteed to be MN; 2410 -- caller must release with GSS_Release_name() 2411 o targ_name INTERNAL NAME, -- name of context target, 2412 -- guaranteed to be MN; 2413 -- caller must release with GSS_Release_name() 2415 o lifetime_rec INTEGER -- in seconds, or reserved value for 2416 -- INDEFINITE, 2418 o mech_type OBJECT IDENTIFIER, -- the mechanism supporting this 2419 -- security context; caller should treat as read-only and not 2420 -- attempt to release 2422 o deleg_state BOOLEAN, 2424 o mutual_state BOOLEAN, 2426 o replay_det_state BOOLEAN, 2428 o sequence_state BOOLEAN, 2430 o anon_state BOOLEAN, 2432 o trans_state BOOLEAN, 2434 o prot_ready_state BOOLEAN, 2436 o conf_avail BOOLEAN, 2438 o integ_avail BOOLEAN, 2440 o locally_initiated BOOLEAN, -- TRUE if initiator, FALSE if acceptor 2442 Return major_status codes: 2444 o GSS_S_COMPLETE indicates that the referenced context is valid 2445 and that src_name, targ_name, lifetime_rec, mech_type, 2446 deleg_state, mutual_state, replay_det_state, sequence_state, 2447 anon_state, trans_state, prot_ready_state, conf_avail, 2448 integ_avail, and locally_initiated return values describe the 2449 corresponding characteristics of the context. 2451 o GSS_S_CONTEXT_EXPIRED indicates that the provided input 2452 context_handle is recognized, but that the referenced context 2453 has expired. Return values other than major_status and 2454 minor_status are undefined. 2456 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2457 for the input context_handle provided. Return values other than 2458 major_status and minor_status are undefined. 2460 o GSS_S_FAILURE indicates that the requested operation failed for 2461 reasons unspecified at the GSS-API level. Return values other than 2462 major_status and minor_status are undefined. 2464 This call is used to extract information describing characteristics 2465 of a security context. 2467 2.2.7: GSS_Wrap_size_limit call 2469 Inputs: 2471 o context_handle CONTEXT HANDLE, 2473 o qop INTEGER, 2475 o output_size INTEGER 2477 Outputs: 2479 o major_status INTEGER, 2481 o minor_status INTEGER, 2483 o max_input_size INTEGER 2485 Return major_status codes: 2487 o GSS_S_COMPLETE indicates a successful token size determination: 2488 an input message with a length in octets equal to the 2489 returned max_input_size value will, when passed to GSS_Wrap() 2490 for processing on the context identified by the context_handle 2491 parameter and with the quality of protection specifier provided 2492 in the qop parameter, yield an output token no larger than the 2493 value of the provided output_size parameter. 2495 o GSS_S_CONTEXT_EXPIRED indicates that the provided input 2496 context_handle is recognized, but that the referenced context has 2497 expired. Return values other than major_status and minor_status 2498 are undefined. 2500 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2501 for the input context_handle provided. Return values other than 2502 major_status and minor_status are undefined. 2504 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2505 recognized or supported for the context. 2507 o GSS_S_FAILURE indicates that the requested operation failed for 2508 reasons unspecified at the GSS-API level. Return values other than 2509 major_status and minor_status are undefined. 2511 This call is used to determine the largest input datum which may be 2512 passed to GSS_Wrap() without yielding an output token larger than a 2513 caller-specified value. 2515 2.2.8: GSS_Export_sec_context call 2517 Inputs: 2519 o context_handle CONTEXT HANDLE 2521 Outputs: 2523 o major_status INTEGER, 2525 o minor_status INTEGER, 2527 o interprocess_token OCTET STRING -- caller must release 2528 -- with GSS_Release_buffer() 2530 Return major_status codes: 2532 o GSS_S_COMPLETE indicates that the referenced context has been 2533 successfully exported to a representation in the interprocess_token, 2534 and is no longer available for use by the caller. 2536 o GSS_S_UNAVAILABLE indicates that the context export facility 2537 is not available for use on the referenced context. (This status 2538 should occur only for contexts for which the trans_state value is 2539 FALSE.) Return values other than major_status and minor_status are 2540 undefined. 2542 o GSS_S_CONTEXT_EXPIRED indicates that the provided input 2543 context_handle is recognized, but that the referenced context has 2544 expired. Return values other than major_status and minor_status 2545 are undefined. 2547 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2548 for the input context_handle provided. Return values other than 2549 major_status and minor_status are undefined. 2551 o GSS_S_FAILURE indicates that the requested operation failed for 2552 reasons unspecified at the GSS-API level. Return values other than 2553 major_status and minor_status are undefined. 2555 This call generates an interprocess token for transfer to another 2556 process within an end system, in order to transfer control of a 2557 security context to that process. The recipient of the interprocess 2558 token will call GSS_Import_sec_context() to accept the transfer. The 2559 GSS_Export_sec_context() operation is defined for use only with 2560 security contexts which are fully and successfully established (i.e., 2561 those for which GSS_Init_sec_context() and GSS_Accept_sec_context() 2562 have returned GSS_S_COMPLETE major_status). 2564 A successful GSS_Export_sec_context() operation deactivates the 2565 security context for the calling process; for this case, the GSS-API 2566 implementation shall deallocate all process-wide resources associated 2567 with the security context and shall set the context_handle to 2568 GSS_C_NO_CONTEXT. In the event of an error that makes it impossible 2569 to complete export of the security context, the GSS-API 2570 implementation must not return an interprocess token and should 2571 strive to leave the security context referenced by the context_handle 2572 untouched. If this is impossible, it is permissible for the 2573 implementation to delete the security context, provided that it also 2574 sets te context_handle parameter to GSS_C_NO_CONTEXT. 2576 Portable callers must not assume that a given interprocess token can 2577 be imported by GSS_Import_sec_context() more than once, thereby 2578 creating multiple instantiations of a single context. GSS-API 2579 implementations may detect and reject attempted multiple imports, but 2580 are not required to do so. 2582 The internal representation contained within the interprocess token 2583 is an implementation-defined local matter. Interprocess tokens 2584 cannot be assumed to be transferable across different GSS-API 2585 implementations. 2587 It is recommended that GSS-API implementations adopt policies suited 2588 to their operational environments in order to define the set of 2589 processes eligible to import a context, but specific constraints in 2590 this area are local matters. Candidate examples include transfers 2591 between processes operating on behalf of the same user identity, or 2592 processes comprising a common job. However, it may be impossible to 2593 enforce such policies in some implementations. 2595 In support of the above goals, implementations may protect the 2596 transferred context data by using cryptography to protect data within 2597 the interprocess token, or by using interprocess tokens as a means to 2598 reference local interprocess communication facilities (protected by 2599 other means) rather than storing the context data directly within the 2600 tokens. 2602 Transfer of an open context may, for certain mechanisms and 2603 implementations, reveal data about the credential which was used to 2604 establish the context. Callers should, therefore, be cautious about 2605 the trustworthiness of processes to which they transfer contexts. 2606 Although the GSS-API implementation may provide its own set of 2607 protections over the exported context, the caller is responsible for 2608 protecting the interprocess token from disclosure, and for taking 2609 care that the context is transferred to an appropriate destination 2610 process. 2612 2.2.9: GSS_Import_sec_context call 2614 Inputs: 2616 o interprocess_token OCTET STRING 2618 Outputs: 2620 o major_status INTEGER, 2622 o minor_status INTEGER, 2624 o context_handle CONTEXT HANDLE -- if successfully returned, 2625 -- caller must release with GSS_Delete_sec_context() 2627 Return major_status codes: 2629 o GSS_S_COMPLETE indicates that the context represented by the 2630 input interprocess_token has been successfully transferred to 2631 the caller, and is available for future use via the output 2632 context_handle. 2634 o GSS_S_CONTEXT_EXPIRED indicates that the context represented by 2635 the input interprocess_token has expired. Return values other 2636 than major_status and minor_status are undefined. 2638 o GSS_S_NO_CONTEXT indicates that the context represented by the 2639 input interprocess_token was invalid. Return values other than 2640 major_status and minor_status are undefined. 2642 o GSS_S_DEFECTIVE_TOKEN indicates that the input interprocess_token 2643 was defective. Return values other than major_status and 2644 minor_status are undefined. 2646 o GSS_S_UNAVAILABLE indicates that the context import facility 2647 is not available for use on the referenced context. Return values 2648 other than major_status and minor_status are undefined. 2650 o GSS_S_UNAUTHORIZED indicates that the context represented by 2651 the input interprocess_token is unauthorized for transfer to the 2652 caller. Return values other than major_status and minor_status 2653 are undefined. 2655 o GSS_S_FAILURE indicates that the requested operation failed for 2656 reasons unspecified at the GSS-API level. Return values other than 2657 major_status and minor_status are undefined. 2659 This call processes an interprocess token generated by 2660 GSS_Export_sec_context(), making the transferred context available 2661 for use by the caller. After a successful GSS_Import_sec_context() 2662 operation, the imported context is available for use by the importing 2663 process. In particular, the imported context is usable for all per- 2664 message operations and may be deleted or exported by its importer. 2665 The inability to receive delegated credentials through 2666 gss_import_sec_context() precludes establishment of new contexts 2667 based on information delegated to the importer's end system within 2668 the context which is being imported, unless those delegated 2669 credentials are obtained through separate routines (e.g., XGSS-API 2670 calls) outside the GSS-V2 definition. 2672 For further discussion of the security and authorization issues 2673 regarding this call, please see the discussion in Section 2.2.8. 2675 2.3: Per-message calls 2677 This group of calls is used to perform per-message protection 2678 processing on an established security context. None of these calls 2679 block pending network interactions. These calls may be invoked by a 2680 context's initiator or by the context's target. The four members of 2681 this group should be considered as two pairs; the output from 2682 GSS_GetMIC() is properly input to GSS_VerifyMIC(), and the output 2683 from GSS_Wrap() is properly input to GSS_Unwrap(). 2685 GSS_GetMIC() and GSS_VerifyMIC() support data origin authentication 2686 and data integrity services. When GSS_GetMIC() is invoked on an input 2687 message, it yields a per-message token containing data items which 2688 allow underlying mechanisms to provide the specified security 2689 services. The original message, along with the generated per-message 2690 token, is passed to the remote peer; these two data elements are 2691 processed by GSS_VerifyMIC(), which validates the message in 2692 conjunction with the separate token. 2694 GSS_Wrap() and GSS_Unwrap() support caller-requested confidentiality 2695 in addition to the data origin authentication and data integrity 2696 services offered by GSS_GetMIC() and GSS_VerifyMIC(). GSS_Wrap() 2697 outputs a single data element, encapsulating optionally enciphered 2698 user data as well as associated token data items. The data element 2699 output from GSS_Wrap() is passed to the remote peer and processed by 2700 GSS_Unwrap() at that system. GSS_Unwrap() combines decipherment (as 2701 required) with validation of data items related to authentication and 2702 integrity. 2704 Although zero-length tokens are never returned by GSS calls for 2705 transfer to a context's peer, a zero-length object may be passed by a 2706 caller into GSS_Wrap(), in which case the corresponding peer calling 2707 GSS_Unwrap() on the transferred token will receive a zero-length 2708 object as output from GSS_Unwrap(). Similarly, GSS_GetMIC() can be 2709 called on an empty object, yielding a MIC which GSS_VerifyMIC() will 2710 successfully verify against the active security context in 2711 conjunction with a zero-length object. 2713 2.3.1: GSS_GetMIC call 2715 Note: This call is functionally equivalent to the GSS_Sign call as 2716 defined in previous versions of this specification. In the interests 2717 of backward compatibility, it is recommended that implementations 2718 support this function under both names for the present; future 2719 references to this function as GSS_Sign are deprecated. 2721 Inputs: 2723 o context_handle CONTEXT HANDLE, 2725 o qop_req INTEGER, -- 0 specifies default QOP 2727 o message OCTET STRING 2729 Outputs: 2731 o major_status INTEGER, 2733 o minor_status INTEGER, 2735 o per_msg_token OCTET STRING -- caller must release 2736 -- with GSS_Release_buffer() 2738 Return major_status codes: 2740 o GSS_S_COMPLETE indicates that an integrity check, suitable for an 2741 established security context, was successfully applied and 2742 that the message and corresponding per_msg_token are ready 2743 for transmission. 2745 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2746 items have expired, so that the requested operation cannot be 2747 performed. 2749 o GSS_S_CREDENTIALS_EXPIRED indicates that the context is 2750 recognized, but that its associated credentials have expired, so 2751 that the requested operation cannot be performed. Return of 2752 this status by this routine is deprecated. 2754 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2755 for the input context_handle provided. 2757 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2758 recognized or supported for the context. 2760 o GSS_S_FAILURE indicates that the context is recognized, but 2761 that the requested operation could not be performed for 2762 reasons unspecified at the GSS-API level. 2764 Using the security context referenced by context_handle, apply an 2765 integrity check to the input message (along with timestamps and/or 2766 other data included in support of mech_type-specific mechanisms) and 2767 return the result in per_msg_token. The qop_req parameter, 2768 interpretation of which is discussed in Section 1.2.4, allows 2769 quality-of-protection control. The caller passes the message and the 2770 per_msg_token to the target. 2772 The GSS_GetMIC() function completes before the message and 2773 per_msg_token is sent to the peer; successful application of 2774 GSS_GetMIC() does not guarantee that a corresponding GSS_VerifyMIC() 2775 has been (or can necessarily be) performed successfully when the 2776 message arrives at the destination. 2778 Mechanisms which do not support per-message protection services 2779 should return GSS_S_FAILURE if this routine is called. 2781 2.3.2: GSS_VerifyMIC call 2783 Note: This call is functionally equivalent to the GSS_Verify call as 2784 defined in previous versions of this specification. In the interests 2785 of backward compatibility, it is recommended that implementations 2786 support this function under both names for the present; future 2787 references to this function as GSS_Verify are deprecated. 2789 Inputs: 2791 o context_handle CONTEXT HANDLE, 2793 o message OCTET STRING, 2794 o per_msg_token OCTET STRING 2796 Outputs: 2798 o qop_state INTEGER, 2800 o major_status INTEGER, 2802 o minor_status INTEGER, 2804 Return major_status codes: 2806 o GSS_S_COMPLETE indicates that the message was successfully 2807 verified. 2809 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 2810 on the received per_msg_token failed, preventing 2811 further processing from being performed with that token. 2813 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received 2814 per_msg_token contains an incorrect integrity check for the 2815 message. 2817 o GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, 2818 and GSS_S_GAP_TOKEN values appear in conjunction with the 2819 optional per-message replay detection features described 2820 in Section 1.2.3; their semantics are described in that section. 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_CREDENTIALS_EXPIRED indicates that the context is 2827 recognized, 2828 but that its associated credentials have expired, so 2829 that the requested operation cannot be performed. Return of this 2830 status by this routine is deprecated. 2832 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2833 for the input context_handle provided. 2835 o GSS_S_FAILURE indicates that the context is recognized, but 2836 that the GSS_VerifyMIC() operation could not be performed for 2837 reasons unspecified at the GSS-API level. 2839 Using the security context referenced by context_handle, verify that 2840 the input per_msg_token contains an appropriate integrity check for 2841 the input message, and apply any active replay detection or 2842 sequencing features. Return an indication of the quality-of- 2843 protection applied to the processed message in the qop_state result. 2845 Mechanisms which do not support per-message protection services 2846 should return GSS_S_FAILURE if this routine is called. 2848 2.3.3: GSS_Wrap call 2850 Note: This call is functionally equivalent to the GSS_Seal call as 2851 defined in previous versions of this specification. In the interests 2852 of backward compatibility, it is recommended that implementations 2853 support this function under both names for the present; future 2854 references to this function as GSS_Seal are deprecated. 2856 Inputs: 2858 o context_handle CONTEXT HANDLE, 2860 o conf_req_flag BOOLEAN, 2862 o qop_req INTEGER, -- 0 specifies default QOP 2864 o input_message OCTET STRING 2866 Outputs: 2868 o major_status INTEGER, 2870 o minor_status INTEGER, 2872 o conf_state BOOLEAN, 2874 o output_message OCTET STRING -- caller must release with 2875 -- GSS_Release_buffer() 2877 Return major_status codes: 2879 o GSS_S_COMPLETE indicates that the input_message was successfully 2880 processed and that the output_message is ready for 2881 transmission. 2883 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2884 items have expired, so that the requested operation cannot be 2885 performed. 2887 o GSS_S_CREDENTIALS_EXPIRED indicates that the context is 2888 recognized, but that its associated credentials have expired, so 2889 that the requested operation cannot be performed. Return of this 2890 status by this routine is deprecated. 2892 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2893 for the input context_handle provided. 2895 o GSS_S_BAD_QOP indicates that the provided QOP value is not 2896 recognized or supported for the context. 2898 o GSS_S_FAILURE indicates that the context is recognized, but 2899 that the GSS_Wrap() operation could not be performed for 2900 reasons unspecified at the GSS-API level. 2902 Performs the data origin authentication and data integrity functions 2903 of GSS_GetMIC(). If the input conf_req_flag is TRUE, requests that 2904 confidentiality be applied to the input_message. Confidentiality may 2905 not be supported in all mech_types or by all implementations; the 2906 returned conf_state flag indicates whether confidentiality was 2907 provided for the input_message. The qop_req parameter, interpretation 2908 of which is discussed in Section 1.2.4, allows quality-of-protection 2909 control. 2911 In all cases, the GSS_Wrap() call yields a single output_message data 2912 element containing (optionally enciphered) user data as well as 2913 control information. 2915 Mechanisms which do not support per-message protection services 2916 should return GSS_S_FAILURE if this routine is called. 2918 2.3.4: GSS_Unwrap call 2920 Note: This call is functionally equivalent to the GSS_Unseal call as 2921 defined in previous versions of this specification. In the interests 2922 of backward compatibility, it is recommended that implementations 2923 support this function under both names for the present; future 2924 references to this function as GSS_Unseal are deprecated. 2926 Inputs: 2928 o context_handle CONTEXT HANDLE, 2930 o input_message OCTET STRING 2932 Outputs: 2934 o conf_state BOOLEAN, 2936 o qop_state INTEGER, 2938 o major_status INTEGER, 2939 o minor_status INTEGER, 2941 o output_message OCTET STRING -- caller must release with 2942 -- GSS_Release_buffer() 2944 Return major_status codes: 2946 o GSS_S_COMPLETE indicates that the input_message was 2947 successfully processed and that the resulting output_message is 2948 available. 2950 o GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 2951 on the per_msg_token extracted from the input_message 2952 failed, preventing further processing from being performed. 2954 o GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that an incorrect 2955 integrity check was detected for the message. 2957 o GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, 2958 and GSS_S_GAP_TOKEN values appear in conjunction with the 2959 optional per-message replay detection features described 2960 in Section 1.2.3; their semantics are described in that section. 2962 o GSS_S_CONTEXT_EXPIRED indicates that context-related data 2963 items have expired, so that the requested operation cannot be 2964 performed. 2966 o GSS_S_CREDENTIALS_EXPIRED indicates that the context is 2967 recognized, but that its associated credentials have expired, so 2968 that the requested operation cannot be performed. Return of this 2969 status by this routine is deprecated. 2971 o GSS_S_NO_CONTEXT indicates that no valid context was recognized 2972 for the input context_handle provided. 2974 o GSS_S_FAILURE indicates that the context is recognized, but 2975 that the GSS_Unwrap() operation could not be performed for 2976 reasons unspecified at the GSS-API level. 2978 Processes a data element generated (and optionally enciphered) by 2979 GSS_Wrap(), provided as input_message. The returned conf_state value 2980 indicates whether confidentiality was applied to the input_message. 2981 If conf_state is TRUE, GSS_Unwrap() deciphers the input_message. 2982 Returns an indication of the quality-of-protection applied to the 2983 processed message in the qop_state result. GSS_Wrap() performs the 2984 data integrity and data origin authentication checking functions of 2985 GSS_VerifyMIC() on the plaintext data. Plaintext data is returned in 2986 output_message. 2988 Mechanisms which do not support per-message protection services 2989 should return GSS_S_FAILURE if this routine is called. 2991 2.4: Support calls 2993 This group of calls provides support functions useful to GSS-API 2994 callers, independent of the state of established contexts. Their 2995 characterization with regard to blocking or non-blocking status in 2996 terms of network interactions is unspecified. 2998 2.4.1: GSS_Display_status call 3000 Inputs: 3002 o status_value INTEGER, -- GSS-API major_status or minor_status 3003 -- return value 3005 o status_type INTEGER, -- 1 if major_status, 2 if minor_status 3007 o mech_type OBJECT IDENTIFIER -- mech_type to be used for minor_ 3008 -- status translation 3010 Outputs: 3012 o major_status INTEGER, 3014 o minor_status INTEGER, 3016 o status_string_set SET OF OCTET STRING -- required calls for 3017 -- release by caller are specific to language bindings 3019 Return major_status codes: 3021 o GSS_S_COMPLETE indicates that a valid printable status 3022 representation (possibly representing more than one status event 3023 encoded within the status_value) is available in the returned 3024 status_string_set. 3026 o GSS_S_BAD_MECH indicates that translation in accordance with an 3027 unsupported mech_type was requested, so translation could not 3028 be performed. 3030 o GSS_S_BAD_STATUS indicates that the input status_value was 3031 invalid, or that the input status_type carried a value other 3032 than 1 or 2, so translation could not be performed. 3034 o GSS_S_FAILURE indicates that the requested operation could not 3035 be performed for reasons unspecified at the GSS-API level. 3037 Provides a means for callers to translate GSS-API-returned major and 3038 minor status codes into printable string representations. Note: some 3039 language bindings may employ an iterative approach in order to emit 3040 successive status components; this approach is acceptable but not 3041 required for conformance with the current specification. 3043 Although not contemplated in [RFC-2078], it has been observed that 3044 some existing GSS-API implementations return GSS_S_CONTINUE_NEEDED 3045 status when iterating through successive messages returned from 3046 GSS_Display_status(). This behavior is deprecated; 3047 GSS_S_CONTINUE_NEEDED should be returned only by 3048 GSS_Init_sec_context() and GSS_Accept_sec_context(). For maximal 3049 portability, however, it is recommended that defensive callers be 3050 able to accept and ignore GSS_S_CONTINUE_NEEDED status if indicated 3051 by GSS_Display_status() or any other call other than 3052 GSS_Init_sec_context() or GSS_Accept_sec_context(). 3054 2.4.2: GSS_Indicate_mechs call 3056 Input: 3058 o (none) 3060 Outputs: 3062 o major_status INTEGER, 3064 o minor_status INTEGER, 3066 o mech_set SET OF OBJECT IDENTIFIER -- caller must release 3067 -- with GSS_Release_oid_set() 3069 Return major_status codes: 3071 o GSS_S_COMPLETE indicates that a set of available mechanisms has 3072 been returned in mech_set. 3074 o GSS_S_FAILURE indicates that the requested operation could not 3075 be performed for reasons unspecified at the GSS-API level. 3077 Allows callers to determine the set of mechanism types available on 3078 the local system. This call is intended for support of specialized 3079 callers who need to request non-default mech_type sets from 3080 GSS_Acquire_cred(), and should not be needed by other callers. 3082 2.4.3: GSS_Compare_name call 3084 Inputs: 3086 o name1 INTERNAL NAME, 3088 o name2 INTERNAL NAME 3090 Outputs: 3092 o major_status INTEGER, 3094 o minor_status INTEGER, 3096 o name_equal BOOLEAN 3098 Return major_status codes: 3100 o GSS_S_COMPLETE indicates that name1 and name2 were comparable, 3101 and that the name_equal result indicates whether name1 and 3102 name2 represent the same entity. 3104 o GSS_S_BAD_NAMETYPE indicates that 3105 the two input names' types are different and incomparable, so that 3106 the comparison operation could not be completed. 3108 o GSS_S_BAD_NAME indicates that one or both of the input names 3109 was ill-formed in terms of its internal type specifier, so 3110 the comparison operation could not be completed. 3112 o GSS_S_FAILURE indicates that the call's operation could not 3113 be performed for reasons unspecified at the GSS-API level. 3115 Allows callers to compare two internal name representations to 3116 determine whether they refer to the same entity. If either name 3117 presented to GSS_Compare_name() denotes an anonymous principal, 3118 GSS_Compare_name() shall indicate FALSE. It is not required that 3119 either or both inputs name1 and name2 be MNs; for some 3120 implementations and cases, GSS_S_BAD_NAMETYPE may be returned, 3121 indicating name incomparability, for the case where neither input 3122 name is an MN. 3124 2.4.4: GSS_Display_name call 3126 Inputs: 3128 o name INTERNAL NAME 3130 Outputs: 3132 o major_status INTEGER, 3133 o minor_status INTEGER, 3135 o name_string OCTET STRING, -- caller must release 3136 -- with GSS_Release_buffer() 3138 o name_type OBJECT IDENTIFIER -- caller should treat 3139 -- as read-only; does not need to be released 3141 Return major_status codes: 3143 o GSS_S_COMPLETE indicates that a valid printable name 3144 representation is available in the returned name_string. 3146 o GSS_S_BAD_NAME indicates that the contents of the provided name 3147 were inconsistent with the internally-indicated name type, so 3148 no printable representation could be generated. 3150 o GSS_S_FAILURE indicates that the requested operation could not 3151 be performed for reasons unspecified at the GSS-API level. 3153 Allows callers to translate an internal name representation into a 3155 printable form with associated namespace type descriptor. The syntax 3156 of the printable form is a local matter. 3158 If the input name represents an anonymous identity, a reserved value 3159 (GSS_C_NT_ANONYMOUS) shall be returned for name_type. 3161 The GSS_C_NO_OID name type is to be returned only when the 3162 corresponding internal name was created through import with 3163 GSS_C_NO_OID. It is acceptable for mechanisms to normalize names 3164 imported with GSS_C_NO_OID into other supported types and, therefore, 3165 to display them with types other than GSS_C_NO_OID. 3167 2.4.5: GSS_Import_name call 3169 Inputs: 3171 o input_name_string OCTET STRING, 3173 o input_name_type OBJECT IDENTIFIER 3175 Outputs: 3177 o major_status INTEGER, 3179 o minor_status INTEGER, 3181 o output_name INTERNAL NAME -- caller must release with 3182 -- GSS_Release_name() 3184 Return major_status codes: 3186 o GSS_S_COMPLETE indicates that a valid name representation is 3187 output in output_name and described by the type value in 3188 output_name_type. 3190 o GSS_S_BAD_NAMETYPE indicates that the input_name_type is 3191 unsupported by the applicable underlying GSS-API mechanism(s), 3192 so the import operation could not be completed. 3194 o GSS_S_BAD_NAME indicates that the provided input_name_string 3195 is ill-formed in terms of the input_name_type, so the import 3196 operation could not be completed. 3198 o GSS_S_FAILURE indicates that the requested operation could not 3199 be performed for reasons unspecified at the GSS-API level. 3201 Allows callers to provide a name representation as a contiguous octet 3202 string, designate the type of namespace in conjunction with which it 3203 should be parsed, and convert that representation to an internal form 3204 suitable for input to other GSS-API routines. The syntax of the 3205 input_name_string is defined in conjunction with its associated name 3206 type; depending on the input_name_type, the associated 3207 input_name_string may or may not be a printable string. If the 3208 input_name_type's value is GSS_C_NO_OID, a mechanism-specific default 3209 printable syntax (which shall be specified in the corresponding GSS- 3210 V2 mechanism specification) is assumed for the input_name_string; 3211 other input_name_type values as registered by GSS-API implementations 3212 can be used to indicate specific non-default name syntaxes. Note: The 3213 input_name_type argument serves to describe and qualify the 3214 interpretation of the associated input_name_string; it does not 3215 specify the data type of the returned output_name. 3217 If a mechanism claims support for a particular name type, its 3218 GSS_Import_name() operation shall be able to accept all possible 3219 values conformant to the external name syntax as defined for that 3220 name type. These imported values may correspond to: 3222 (1) locally registered entities (for which credentials may be 3223 acquired), 3225 (2) non-local entities (for which local credentials cannot be 3226 acquired, but which may be referenced as targets of initiated 3227 security contexts or initiators of accepted security contexts), 3228 or to 3229 (3) neither of the above. 3231 Determination of whether a particular name belongs to class (1), (2), 3232 or (3) as described above is not guaranteed to be performed by the 3233 GSS_Import_name() function. 3235 The internal name generated by a GSS_Import_name() operation may be a 3236 single-mechanism MN, and is likely to be an MN within a single- 3237 mechanism implementation, but portable callers must not depend on 3238 this property (and must not, therefore, assume that the output from 3239 GSS_Import_name() can be passed directly to GSS_Export_name() without 3240 first being processed through GSS_Canonicalize_name()). 3242 2.4.6: GSS_Release_name call 3244 Inputs: 3246 o name INTERNAL NAME 3248 Outputs: 3250 o major_status INTEGER, 3252 o minor_status INTEGER 3254 Return major_status codes: 3256 o GSS_S_COMPLETE indicates that the storage associated with the 3257 input name was successfully released. 3259 o GSS_S_BAD_NAME indicates that the input name argument did not 3260 contain a valid name. 3262 o GSS_S_FAILURE indicates that the requested operation could not 3263 be performed for reasons unspecified at the GSS-API level. 3265 Allows callers to release the storage associated with an internal 3266 name representation. This call's specific behavior depends on the 3267 language and programming environment within which a GSS-API 3268 implementation operates, and is therefore detailed within applicable 3269 bindings specifications; in particular, implementation and invocation 3270 of this call may be superfluous (and may be omitted) within bindings 3271 where memory management is automatic. 3273 2.4.7: GSS_Release_buffer call 3275 Inputs: 3277 o buffer OCTET STRING 3279 Outputs: 3281 o major_status INTEGER, 3283 o minor_status INTEGER 3285 Return major_status codes: 3287 o GSS_S_COMPLETE indicates that the storage associated with the 3288 input buffer was successfully released. 3290 o GSS_S_FAILURE indicates that the requested operation could not 3291 be performed for reasons unspecified at the GSS-API level. 3293 Allows callers to release the storage associated with an OCTET STRING 3294 buffer allocated by another GSS-API call. This call's specific 3295 behavior depends on the language and programming environment within 3296 which a GSS-API implementation operates, and is therefore detailed 3297 within applicable bindings specifications; in particular, 3298 implementation and invocation of this call may be superfluous (and 3299 may be omitted) within bindings where memory management is automatic. 3301 2.4.8: GSS_Release_OID_set call 3303 Inputs: 3305 o buffer SET OF OBJECT IDENTIFIER 3307 Outputs: 3309 o major_status INTEGER, 3311 o minor_status INTEGER 3313 Return major_status codes: 3315 o GSS_S_COMPLETE indicates that the storage associated with the 3316 input object identifier set was successfully released. 3318 o GSS_S_FAILURE indicates that the requested operation could not 3319 be performed for reasons unspecified at the GSS-API level. 3321 Allows callers to release the storage associated with an object 3322 identifier set object allocated by another GSS-API call. This call's 3323 specific behavior depends on the language and programming environment 3324 within which a GSS-API implementation operates, and is therefore 3325 detailed within applicable bindings specifications; in particular, 3326 implementation and invocation of this call may be superfluous (and 3327 may be omitted) within bindings where memory management is automatic. 3329 2.4.9: GSS_Create_empty_OID_set call 3331 Inputs: 3333 o (none) 3335 Outputs: 3337 o major_status INTEGER, 3339 o minor_status INTEGER, 3341 o oid_set SET OF OBJECT IDENTIFIER -- caller must release 3342 -- with GSS_Release_oid_set() 3344 Return major_status codes: 3346 o GSS_S_COMPLETE indicates successful completion 3348 o GSS_S_FAILURE indicates that the operation failed 3350 Creates an object identifier set containing no object identifiers, to 3351 which members may be subsequently added using the 3352 GSS_Add_OID_set_member() routine. These routines are intended to be 3353 used to construct sets of mechanism object identifiers, for input to 3354 GSS_Acquire_cred(). 3356 2.4.10: GSS_Add_OID_set_member call 3358 Inputs: 3360 o member_oid OBJECT IDENTIFIER, 3362 o oid_set 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 successful completion 3374 o GSS_S_FAILURE indicates that the operation failed 3376 Adds an Object Identifier to an Object Identifier set. This routine 3377 is intended for use in conjunction with GSS_Create_empty_OID_set() 3378 when constructing a set of mechanism OIDs for input to 3379 GSS_Acquire_cred(). 3381 2.4.11: GSS_Test_OID_set_member call 3383 Inputs: 3385 o member OBJECT IDENTIFIER, 3387 o set SET OF OBJECT IDENTIFIER 3389 Outputs: 3391 o major_status INTEGER, 3393 o minor_status INTEGER, 3395 o present BOOLEAN 3397 Return major_status codes: 3399 o GSS_S_COMPLETE indicates successful completion 3401 o GSS_S_FAILURE indicates that the operation failed 3403 Interrogates an Object Identifier set to determine whether a 3404 specified Object Identifier is a member. This routine is intended to 3405 be used with OID sets returned by GSS_Indicate_mechs(), 3406 GSS_Acquire_cred(), and GSS_Inquire_cred(). 3408 2.4.12: GSS_Inquire_names_for_mech call 3410 Input: 3412 o input_mech_type OBJECT IDENTIFIER, -- mechanism type 3414 Outputs: 3416 o major_status INTEGER, 3417 o minor_status INTEGER, 3419 o name_type_set SET OF OBJECT IDENTIFIER -- caller must release 3420 -- with GSS_Release_oid_set() 3422 Return major_status codes: 3424 o GSS_S_COMPLETE indicates that the output name_type_set contains 3425 a list of name types which are supported by the locally available 3426 mechanism identified by input_mech_type. 3428 o GSS_S_BAD_MECH indicates that the mechanism identified by 3429 input_mech_type was unsupported within the local implementation, 3430 causing the query to fail. 3432 o GSS_S_FAILURE indicates that the requested operation could not 3433 be performed for reasons unspecified at the GSS-API level. 3435 Allows callers to determine the set of name types which are 3436 supportable by a specific locally-available mechanism. 3438 2.4.13: GSS_Inquire_mechs_for_name call 3440 Inputs: 3442 o input_name INTERNAL NAME, 3444 Outputs: 3446 o major_status INTEGER, 3448 o minor_status INTEGER, 3450 o mech_types SET OF OBJECT IDENTIFIER -- caller must release 3451 -- with GSS_Release_oid_set() 3453 Return major_status codes: 3455 o GSS_S_COMPLETE indicates that a set of object identifiers, 3456 corresponding to the set of mechanisms suitable for processing 3457 the input_name, is available in mech_types. 3459 o GSS_S_BAD_NAME indicates that the input_name was ill-formed 3460 and could not be processed. 3462 o GSS_S_BAD_NAMETYPE indicates that the input_name parameter 3463 contained an invalid name type or a name type unsupported 3464 by the GSS-API implementation. 3466 o GSS_S_FAILURE indicates that the requested operation could not 3467 be performed for reasons unspecified at the GSS-API level. 3469 This routine returns the mechanism set with which the input_name may 3470 be processed. 3472 Each mechanism returned will recognize at least one element within 3473 the name. It is permissible for this routine to be implemented within 3474 a mechanism-independent GSS-API layer, using the type information 3475 contained within the presented name, and based on registration 3476 information provided by individual mechanism implementations. This 3477 means that the returned mech_types result may indicate that a 3478 particular mechanism will understand a particular name when in fact 3479 it would refuse to accept that name as input to 3481 GSS_Canonicalize_name(), GSS_Init_sec_context(), GSS_Acquire_cred(), 3482 or GSS_Add_cred(), due to some property of the particular name rather 3483 than a property of the name type. Thus, this routine should be used 3484 only as a pre-filter for a call to a subsequent mechanism-specific 3485 routine. 3487 2.4.14: GSS_Canonicalize_name call 3489 Inputs: 3491 o input_name INTERNAL NAME, 3493 o mech_type OBJECT IDENTIFIER -- must be explicit mechanism, 3494 -- not "default" specifier or identifier of negotiating mechanism 3496 Outputs: 3498 o major_status INTEGER, 3500 o minor_status INTEGER, 3502 o output_name INTERNAL NAME -- caller must release with 3503 -- GSS_Release_name() 3505 Return major_status codes: 3507 o GSS_S_COMPLETE indicates that a mechanism-specific reduction of 3508 the input_name, as processed by the mechanism identified by 3509 mech_type, is available in output_name. 3511 o GSS_S_BAD_MECH indicates that the identified mechanism is 3512 unsupported for this operation; this may correspond either to 3513 a mechanism wholly unsupported by the local GSS-API implementation 3514 or to a negotiating mechanism with which the canonicalization 3515 operation cannot be performed. 3517 o GSS_S_BAD_NAMETYPE indicates that the input name does not 3518 contain an element with suitable type for processing by the 3519 identified mechanism. 3521 o GSS_S_BAD_NAME indicates that the input name contains an 3522 element with suitable type for processing by the identified 3523 mechanism, but that this element could not be processed 3524 successfully. 3526 o GSS_S_FAILURE indicates that the requested operation could not 3527 be performed for reasons unspecified at the GSS-API level. 3529 This routine reduces a GSS-API internal name input_name, which may in 3530 general contain elements corresponding to multiple mechanisms, to a 3531 mechanism-specific Mechanism Name (MN) output_name by applying the 3532 translations corresponding to the mechanism identified by mech_type. 3533 The contents of input_name are unaffected by the 3534 GSS_Canonicalize_name() operation. References to output_name will 3535 remain valid until output_name is released, independent of whether or 3536 not input_name is subsequently released. 3538 2.4.15: GSS_Export_name call 3540 Inputs: 3542 o input_name INTERNAL NAME, -- required to be MN 3544 Outputs: 3546 o major_status INTEGER, 3548 o minor_status INTEGER, 3550 o output_name OCTET STRING -- caller must release 3551 -- with GSS_Release_buffer() 3553 Return major_status codes: 3555 o GSS_S_COMPLETE indicates that a flat representation of the 3556 input name is available in output_name. 3558 o GSS_S_NAME_NOT_MN indicates that the input name contained 3559 elements corresponding to multiple mechanisms, so cannot 3560 be exported into a single-mechanism flat form. 3562 o GSS_S_BAD_NAME indicates that the input name was an MN, 3563 but could not be processed. 3565 o GSS_S_BAD_NAMETYPE indicates that the input name was an MN, 3566 but that its type is unsupported by the GSS-API implementation. 3568 o GSS_S_FAILURE indicates that the requested operation could not 3569 be performed for reasons unspecified at the GSS-API level. 3571 This routine creates a flat name representation, suitable for 3572 bytewise comparison or for input to GSS_Import_name() in conjunction 3573 with the reserved GSS-API Exported Name Object OID, from a internal- 3574 form Mechanism Name (MN) as emitted, e.g., by GSS_Canonicalize_name() 3575 or GSS_Accept_sec_context(). 3577 The emitted GSS-API Exported Name Object is self-describing; no 3578 associated parameter-level OID need be emitted by this call. This 3579 flat representation consists of a mechanism-independent wrapper 3580 layer, defined in Section 3.2 of this document, enclosing a 3581 mechanism-defined name representation. 3583 In all cases, the flat name output by GSS_Export_name() to correspond 3584 to a particular input MN must be invariant over time within a 3585 particular installation. 3587 The GSS_S_NAME_NOT_MN status code is provided to enable 3588 implementations to reject input names which are not MNs. It is not, 3589 however, required for purposes of conformance to this specification 3590 that all non-MN input names must necessarily be rejected. 3592 2.4.16: GSS_Duplicate_name call 3594 Inputs: 3596 o src_name INTERNAL NAME 3598 Outputs: 3600 o major_status INTEGER, 3602 o minor_status INTEGER, 3604 o dest_name INTERNAL NAME -- caller must release 3605 -- with GSS_Release_name() 3607 Return major_status codes: 3609 o GSS_S_COMPLETE indicates that dest_name references an internal 3610 name object containing the same name as passed to src_name. 3612 o GSS_S_BAD_NAME indicates that the input name was invalid. 3614 o GSS_S_FAILURE indicates that the requested operation could not 3615 be performed for reasons unspecified at the GSS-API level. 3617 This routine takes input internal name src_name, and returns another 3618 reference (dest_name) to that name which can be used even if src_name 3619 is later freed. (Note: This may be implemented by copying or through 3620 use of reference counts.) 3622 3: Data Structure Definitions for GSS-V2 Usage 3624 Subsections of this section define, for interoperability and 3625 portability purposes, certain data structures for use with GSS-V2. 3627 3.1: Mechanism-Independent Token Format 3629 This section specifies a mechanism-independent level of encapsulating 3630 representation for the initial token of a GSS-API context 3631 establishment sequence, incorporating an identifier of the mechanism 3632 type to be used on that context and enabling tokens to be interpreted 3633 unambiguously at GSS-API peers. Use of this format is required for 3634 initial context establishment tokens of Internet standards-track 3635 GSS-API mechanisms; use in non-initial tokens is optional. 3637 The encoding format for the token tag is derived from ASN.1 and DER 3638 (per illustrative ASN.1 syntax included later within this 3639 subsection), but its concrete representation is defined directly in 3640 terms of octets rather than at the ASN.1 level in order to facilitate 3641 interoperable implementation without use of general ASN.1 processing 3642 code. The token tag consists of the following elements, in order: 3644 1. 0x60 -- Tag for [APPLICATION 0] SEQUENCE; indicates that 3645 -- constructed form, definite length encoding follows. 3647 2. Token length octets, specifying length of subsequent data 3648 (i.e., the summed lengths of elements 3-5 in this list, and of 3649 the mechanism-defined token object following the tag). 3650 This element comprises a variable number of octets: 3652 2a. If the indicated value is less than 128, it shall be 3653 represented in a single octet with bit 8 (high order) 3654 set to "0" and the remaining bits representing the value. 3656 2b. If the indicated value is 128 or more, it shall be 3657 represented in two or more octets, with bit 8 of the first 3658 octet set to "1" and the remaining bits of the first octet 3659 specifying the number of additional octets. The subsequent 3660 octets carry the value, 8 bits per octet, most significant 3661 digit first. The minimum number of octets shall be used to 3662 encode the length (i.e., no octets representing leading zeros 3663 shall be included within the length encoding). 3665 3. 0x06 -- Tag for OBJECT IDENTIFIER 3667 4. Object identifier length -- length (number of octets) of 3668 -- the encoded object identifier contained in element 5, 3669 -- encoded per rules as described in 2a. and 2b. above. 3671 5. Object identifier octets -- variable number of octets, 3672 -- encoded per ASN.1 BER rules: 3674 5a. The first octet contains the sum of two values: (1) the 3675 top-level object identifier component, multiplied by 40 3676 (decimal), and (2) the second-level object identifier 3677 component. This special case is the only point within an 3678 object identifier encoding where a single octet represents 3679 contents of more than one component. 3681 5b. Subsequent octets, if required, encode successively-lower 3682 components in the represented object identifier. A component's 3683 encoding may span multiple octets, encoding 7 bits per octet 3684 (most significant bits first) and with bit 8 set to "1" on 3685 all but the final octet in the component's encoding. The 3686 minimum number of octets shall be used to encode each component 3687 (i.e., no octets representing leading zeros shall be included 3688 within a component's encoding). 3690 (Note: In many implementations, elements 3-5 may be stored and 3691 referenced as a contiguous string constant.) 3693 The token tag is immediately followed by a mechanism-defined token 3694 object. Note that no independent size specifier intervenes following 3695 the object identifier value to indicate the size of the mechanism- 3696 defined token object. While ASN.1 usage within mechanism-defined 3697 tokens is permitted, there is no requirement that the mechanism- 3698 specific innerContextToken, innerMsgToken, and sealedUserData data 3699 elements must employ ASN.1 BER/DER encoding conventions. 3701 The following ASN.1 syntax is included for descriptive purposes only, 3702 to illustrate structural relationships among token and tag objects. 3703 For interoperability purposes, token and tag encoding shall be 3704 performed using the concrete encoding procedures described earlier in 3705 this subsection. 3707 GSS-API DEFINITIONS ::= 3709 BEGIN 3711 MechType ::= OBJECT IDENTIFIER 3712 -- data structure definitions 3714 -- callers must be able to distinguish among 3715 -- InitialContextToken, SubsequentContextToken, 3716 -- PerMsgToken, and SealedMessage data elements 3717 -- based on the usage in which they occur 3719 InitialContextToken ::= 3720 -- option indication (delegation, etc.) indicated within 3721 -- mechanism-specific token 3722 [APPLICATION 0] IMPLICIT SEQUENCE { 3723 thisMech MechType, 3724 innerContextToken ANY DEFINED BY thisMech 3725 -- contents mechanism-specific 3726 -- ASN.1 structure not required 3727 } 3729 SubsequentContextToken ::= innerContextToken ANY 3730 -- interpretation based on predecessor InitialContextToken 3731 -- ASN.1 structure not required 3733 PerMsgToken ::= 3734 -- as emitted by GSS_GetMIC and processed by GSS_VerifyMIC 3735 -- ASN.1 structure not required 3736 innerMsgToken ANY 3738 SealedMessage ::= 3739 -- as emitted by GSS_Wrap and processed by GSS_Unwrap 3740 -- includes internal, mechanism-defined indicator 3741 -- of whether or not encrypted 3742 -- ASN.1 structure not required 3743 sealedUserData ANY 3745 END 3747 3.2: Mechanism-Independent Exported Name Object Format 3749 This section specifies a mechanism-independent level of encapsulating 3750 representation for names exported via the GSS_Export_name() call, 3751 including an object identifier representing the exporting mechanism. 3752 The format of names encapsulated via this representation shall be 3753 defined within individual mechanism drafts. The Object Identifier 3754 value to indicate names of this type is defined in Section 4.7 of 3755 this document. 3757 No name type OID is included in this mechanism-independent level of 3758 format definition, since (depending on individual mechanism 3759 specifications) the enclosed name may be implicitly typed or may be 3760 explicitly typed using a means other than OID encoding. 3762 The bytes within MECH_OID_LEN and NAME_LEN elements are represented 3763 most significant byte first (equivalently, in IP network byte order). 3765 Length Name Description 3767 2 TOK_ID Token Identifier 3768 For exported name objects, this 3769 must be hex 04 01. 3770 2 MECH_OID_LEN Length of the Mechanism OID 3771 MECH_OID_LEN MECH_OID Mechanism OID, in DER 3772 4 NAME_LEN Length of name 3773 NAME_LEN NAME Exported name; format defined in 3774 applicable mechanism draft. 3776 A concrete example of the contents of an exported name object, 3777 derived from the Kerberos Version 5 mechanism, is as follows: 3779 04 01 00 0B 06 09 2A 86 48 86 F7 12 01 02 02 hx xx xx xl pp qq ... zz 3781 04 01 mandatory token identifier 3783 00 0B 2-byte length of the immediately following DER-encoded 3784 ASN.1 value of type OID, most significant octet first 3786 06 09 2A 86 48 86 F7 12 01 02 02 DER-encoded ASN.1 value 3787 of type OID; Kerberos V5 3788 mechanism OID indicates 3789 Kerberos V5 exported name 3791 in Detail: 06 Identifier octet (6=OID) 3792 09 Length octet(s) 3793 2A 86 48 86 F7 12 01 02 02 Content octet(s) 3795 hx xx xx xl 4-byte length of the immediately following exported 3796 name blob, most significant octet first 3798 pp qq ... zz exported name blob of specified length, 3799 bits and bytes specified in the 3800 (Kerberos 5) GSS-API v2 mechanism spec 3802 4: Name Type Definitions 3804 This section includes definitions for name types and associated 3805 syntaxes which are defined in a mechanism-independent fashion at the 3806 GSS-API level rather than being defined in individual mechanism 3807 specifications. 3809 4.1: Host-Based Service Name Form 3811 This name form shall be represented by the Object Identifier: 3813 {iso(1) member-body(2) United States(840) mit(113554) infosys(1) 3814 "gssapi(2) generic(1) service_name(4)}. 3816 The recommended symbolic name for this type is 3817 "GSS_C_NT_HOSTBASED_SERVICE". 3819 For reasons of compatibility with existing implementations, it is 3820 recommended that this OID be used rather than the alternate value as 3821 included in [RFC-2078]: 3823 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3824 2(gss-host-based-services)} 3826 While it is not recommended that this alternate value be emitted on 3827 output by GSS implementations, it is recommended that it be accepted 3828 on input as equivalent to the recommended value. 3830 This name type is used to represent services associated with host 3831 computers. Support for this name form is recommended to mechanism 3832 designers in the interests of portability, but is not mandated by 3833 this specification. This name form is constructed using two elements, 3834 "service" and "hostname", as follows: 3836 service@hostname 3838 When a reference to a name of this type is resolved, the "hostname" 3839 may (as an example implementation strategy) be canonicalized by 3840 attempting a DNS lookup and using the fully-qualified domain name 3841 which is returned, or by using the "hostname" as provided if the DNS 3842 lookup fails. The canonicalization operation also maps the host's 3843 name into lower-case characters. 3845 The "hostname" element may be omitted. If no "@" separator is 3846 included, the entire name is interpreted as the service specifier, 3847 with the "hostname" defaulted to the canonicalized name of the local 3848 host. 3850 Values for the "service" element are registered with the IANA. 3852 4.2: User Name Form 3854 This name form shall be represented by the Object Identifier {iso(1) 3855 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3856 generic(1) user_name(1)}. The recommended mechanism-independent 3857 symbolic name for this type is "GSS_C_NT_USER_NAME". (Note: the same 3858 name form and OID is defined within the Kerberos V5 GSS-API 3859 mechanism, but the symbolic name recommended there begins with a 3860 "GSS_KRB5_NT_" prefix.) 3862 This name type is used to indicate a named user on a local system. 3863 Its syntax and interpretation may be OS-specific. This name form is 3864 constructed as: 3866 username 3868 4.3: Machine UID Form 3870 This name form shall be represented by the Object Identifier {iso(1) 3871 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3872 generic(1) machine_uid_name(2)}. The recommended mechanism- 3873 independent symbolic name for this type is 3874 "GSS_C_NT_MACHINE_UID_NAME". (Note: the same name form and OID is 3875 defined within the Kerberos V5 GSS-API mechanism, but the symbolic 3876 name recommended there begins with a "GSS_KRB5_NT_" prefix.) 3878 This name type is used to indicate a numeric user identifier 3879 corresponding to a user on a local system. Its interpretation is 3880 OS-specific. The gss_buffer_desc representing a name of this type 3881 should contain a locally-significant user ID, represented in host 3882 byte order. The GSS_Import_name() operation resolves this uid into a 3883 username, which is then treated as the User Name Form. 3885 4.4: String UID Form 3887 This name form shall be represented by the Object Identifier {iso(1) 3888 member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 3889 generic(1) string_uid_name(3)}. The recommended symbolic name for 3890 this type is "GSS_C_NT_STRING_UID_NAME". (Note: the same name form 3891 and OID is defined within the Kerberos V5 GSS-API mechanism, but the 3892 symbolic name recommended there begins with a "GSS_KRB5_NT_" prefix.) 3893 This name type is used to indicate a string of digits representing 3894 the numeric user identifier of a user on a local system. Its 3895 interpretation is OS-specific. This name type is similar to the 3896 Machine UID Form, except that the buffer contains a string 3897 representing the user ID. 3899 4.5: Anonymous Nametype 3901 The following Object Identifier value is provided as a means to 3902 identify anonymous names, and can be compared against in order to 3903 determine, in a mechanism-independent fashion, whether a name refers 3904 to an anonymous principal: 3906 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3907 3(gss-anonymous-name)} 3909 The recommended symbolic name corresponding to this definition is 3910 GSS_C_NT_ANONYMOUS. 3912 4.6: GSS_C_NO_OID 3914 The recommended symbolic name GSS_C_NO_OID corresponds to a null 3915 input value instead of an actual object identifier. Where specified, 3916 it indicates interpretation of an associated name based on a 3917 mechanism-specific default printable syntax. 3919 4.7: Exported Name Object 3921 Name objects of the Mechanism-Independent Exported Name Object type, 3922 as defined in Section 3.2 of this document, will be identified with 3923 the following Object Identifier: 3925 {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3926 4(gss-api-exported-name)} 3928 The recommended symbolic name corresponding to this definition is 3929 GSS_C_NT_EXPORT_NAME. 3931 5: Mechanism-Specific Example Scenarios 3933 This section provides illustrative overviews of the use of various 3934 candidate mechanism types to support the GSS-API. These discussions 3935 are intended primarily for readers familiar with specific security 3936 technologies, demonstrating how GSS-API functions can be used and 3937 implemented by candidate underlying mechanisms. They should not be 3938 regarded as constrictive to implementations or as defining the only 3939 means through which GSS-API functions can be realized with a 3940 particular underlying technology, and do not demonstrate all GSS-API 3941 features with each technology. 3943 5.1: Kerberos V5, single-TGT 3945 OS-specific login functions yield a TGT to the local realm Kerberos 3946 server; TGT is placed in a credentials structure for the client. 3947 Client calls GSS_Acquire_cred() to acquire a cred_handle in order to 3948 reference the credentials for use in establishing security contexts. 3950 Client calls GSS_Init_sec_context(). If the requested service is 3951 located in a different realm, GSS_Init_sec_context() gets the 3952 necessary TGT/key pairs needed to traverse the path from local to 3953 target realm; these data are placed in the owner's TGT cache. After 3954 any needed remote realm resolution, GSS_Init_sec_context() yields a 3955 service ticket to the requested service with a corresponding session 3956 key; these data are stored in conjunction with the context. GSS-API 3957 code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP 3958 response(s) (in the successful case) or KRB_ERROR. 3960 Assuming success, GSS_Init_sec_context() builds a Kerberos-formatted 3961 KRB_AP_REQ message, and returns it in output_token. The client sends 3962 the output_token to the service. 3964 The service passes the received token as the input_token argument to 3965 GSS_Accept_sec_context(), which verifies the authenticator, provides 3966 the service with the client's authenticated name, and returns an 3967 output_context_handle. 3969 Both parties now hold the session key associated with the service 3970 ticket, and can use this key in subsequent GSS_GetMIC(), 3971 GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() operations. 3973 5.2: Kerberos V5, double-TGT 3975 TGT acquisition as above. 3977 Note: To avoid unnecessary frequent invocations of error paths when 3978 implementing the GSS-API atop Kerberos V5, it seems appropriate to 3979 represent "single-TGT K-V5" and "double-TGT K-V5" with separate 3980 mech_types, and this discussion makes that assumption. 3982 Based on the (specified or defaulted) mech_type, 3983 GSS_Init_sec_context() determines that the double-TGT protocol 3984 should be employed for the specified target. GSS_Init_sec_context() 3985 returns GSS_S_CONTINUE_NEEDED major_status, and its returned 3986 output_token contains a request to the service for the service's TGT. 3987 (If a service TGT with suitably long remaining lifetime already 3988 exists in a cache, it may be usable, obviating the need for this 3989 step.) The client passes the output_token to the service. Note: this 3990 scenario illustrates a different use for the GSS_S_CONTINUE_NEEDED 3991 status return facility than for support of mutual authentication; 3992 note that both uses can coexist as successive operations within a 3993 single context establishment operation. 3995 The service passes the received token as the input_token argument to 3996 GSS_Accept_sec_context(), which recognizes it as a request for TGT. 3997 (Note that current Kerberos V5 defines no intra-protocol mechanism to 3998 represent such a request.) GSS_Accept_sec_context() returns 3999 GSS_S_CONTINUE_NEEDED major_status and provides the service's TGT in 4000 its output_token. The service sends the output_token to the client. 4002 The client passes the received token as the input_token argument to a 4003 continuation of GSS_Init_sec_context(). GSS_Init_sec_context() caches 4004 the received service TGT and uses it as part of a service ticket 4005 request to the Kerberos authentication server, storing the returned 4006 service ticket and session key in conjunction with the context. 4007 GSS_Init_sec_context() builds a Kerberos-formatted authenticator, and 4008 returns it in output_token along with GSS_S_COMPLETE return 4009 major_status. The client sends the output_token to the service. 4011 Service passes the received token as the input_token argument to a 4012 continuation call to GSS_Accept_sec_context(). 4013 GSS_Accept_sec_context() verifies the authenticator, provides the 4014 service with the client's authenticated name, and returns 4015 major_status GSS_S_COMPLETE. 4017 GSS_GetMIC(), GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() as 4018 above. 4020 5.3: X.509 Authentication Framework 4022 This example illustrates use of the GSS-API in conjunction with 4023 public-key mechanisms, consistent with the X.509 Directory 4024 Authentication Framework. 4026 The GSS_Acquire_cred() call establishes a credentials structure, 4027 making the client's private key accessible for use on behalf of the 4028 client. 4030 The client calls GSS_Init_sec_context(), which interrogates the 4031 Directory to acquire (and validate) a chain of public-key 4032 certificates, thereby collecting the public key of the service. The 4033 certificate validation operation determines that suitable integrity 4034 checks were applied by trusted authorities and that those 4035 certificates have not expired. GSS_Init_sec_context() generates a 4036 secret key for use in per-message protection operations on the 4037 context, and enciphers that secret key under the service's public 4038 key. 4040 The enciphered secret key, along with an authenticator quantity 4041 signed with the client's private key, is included in the output_token 4042 from GSS_Init_sec_context(). The output_token also carries a 4043 certification path, consisting of a certificate chain leading from 4044 the service to the client; a variant approach would defer this path 4045 resolution to be performed by the service instead of being asserted 4046 by the client. The client application sends the output_token to the 4047 service. 4049 The service passes the received token as the input_token argument to 4050 GSS_Accept_sec_context(). GSS_Accept_sec_context() validates the 4051 certification path, and as a result determines a certified binding 4052 between the client's distinguished name and the client's public key. 4053 Given that public key, GSS_Accept_sec_context() can process the 4054 input_token's authenticator quantity and verify that the client's 4055 private key was used to sign the input_token. At this point, the 4056 client is authenticated to the service. The service uses its private 4057 key to decipher the enciphered secret key provided to it for per- 4058 message protection operations on the context. 4060 The client calls GSS_GetMIC() or GSS_Wrap() on a data message, which 4061 causes per-message authentication, integrity, and (optional) 4062 confidentiality facilities to be applied to that message. The service 4063 uses the context's shared secret key to perform corresponding 4064 GSS_VerifyMIC() and GSS_Unwrap() calls. 4066 6: Security Considerations 4068 Security issues are discussed throughout this memo. 4070 7: Related Activities 4072 In order to implement the GSS-API atop existing, emerging, and future 4073 security mechanisms: 4075 object identifiers must be assigned to candidate GSS-API 4076 mechanisms and the name types which they support 4078 concrete data element formats and processing procedures must be 4079 defined for candidate mechanisms 4081 Calling applications must implement formatting conventions which will 4082 enable them to distinguish GSS-API tokens from other data carried in 4083 their application protocols. 4085 Concrete language bindings are required for the programming 4086 environments in which the GSS-API is to be employed, as [RFC-1509] 4087 defines for the C programming language and GSS-V1. 4089 8: Referenced Documents 4091 [ISO-7498-2] International Standard ISO 7498-2-1988(E), Security 4092 Architecture. 4094 [ISOIEC-8824] ISO/IEC 8824, "Specification of Abstract Syntax 4095 Notation One (ASN.1)". 4097 [ISOIEC-8825] ISO/IEC 8825, "Specification of Basic Encoding Rules 4098 for Abstract Syntax Notation One (ASN.1)".) 4100 [RFC-1507]: C. Kaufman, "DASS: Distributed Authentication Security 4101 Service", RFC 1507. 4103 [RFC-1508]: J. Linn, "Generic Security Service Application Program 4104 Interface", RFC 1508. 4106 [RFC-1509]: J. Wray, "Generic Security Service API: C-bindings", RFC 4107 1509. 4109 [RFC-1964]: J. Linn, "The Kerberos Version 5 GSS-API Mechanism", RFC 4110 1964. 4112 [RFC-2025]: C. Adams, "The Simple Public-Key GSS-API Mechanism 4113 (SPKM)", RFC 2025. 4115 [RFC-2078]: J. Linn, "Generic Security Service Application Program 4116 Interface, Version 2", RFC 2078. 4118 [RFC-2203]: M. Eisler, A. Chiu, L. Ling, "RPCSEC_GSS Protocol 4119 Specification", RFC 2203. 4121 APPENDIX A 4123 MECHANISM DESIGN CONSTRAINTS 4125 The following constraints on GSS-API mechanism designs are adopted in 4126 response to observed caller protocol requirements, and adherence thereto 4127 is anticipated in subsequent descriptions of GSS-API mechanisms to be 4128 documented in standards-track Internet specifications. 4130 It is strongly recommended that mechanisms offering per-message 4131 protection services also offer at least one of the replay detection and 4132 sequencing services, as mechanisms offering neither of the latter will 4133 fail to satisfy recognized requirements of certain candidate caller 4134 protocols. 4136 APPENDIX B 4138 COMPATIBILITY WITH GSS-V1 4140 It is the intent of this document to define an interface and procedures 4141 which preserve compatibility between GSS-V1 [RFC-1508] callers and GSS- 4142 V2 providers. All calls defined in GSS-V1 are preserved, and it has 4143 been a goal that GSS-V1 callers should be able to operate atop GSS-V2 4144 provider implementations. Certain detailed changes, summarized in this 4145 section, have been made in order to resolve omissions identified in 4146 GSS-V1. 4148 The following GSS-V1 constructs, while supported within GSS-V2, are 4149 deprecated: 4151 Names for per-message processing routines: GSS_Seal() deprecated in 4152 favor of GSS_Wrap(); GSS_Sign() deprecated in favor of 4153 GSS_GetMIC(); GSS_Unseal() deprecated in favor of GSS_Unwrap(); 4154 GSS_Verify() deprecated in favor of GSS_VerifyMIC(). 4156 GSS_Delete_sec_context() facility for context_token usage, allowing 4157 mechanisms to signal context deletion, is retained for 4158 compatibility with GSS-V1. For current usage, it is recommended 4159 that both peers to a context invoke GSS_Delete_sec_context() 4160 independently, passing a null output_context_token buffer to 4161 indicate that no context_token is required. Implementations of 4162 GSS_Delete_sec_context() should delete relevant locally-stored 4163 context information. 4165 This GSS-V2 specification adds the following calls which are not present 4166 in GSS-V1: 4168 Credential management calls: GSS_Add_cred(), 4169 GSS_Inquire_cred_by_mech(). 4171 Context-level calls: GSS_Inquire_context(), GSS_Wrap_size_limit(), 4172 GSS_Export_sec_context(), GSS_Import_sec_context(). 4174 Per-message calls: No new calls. Existing calls have been 4175 renamed. 4177 Support calls: GSS_Create_empty_OID_set(), 4178 GSS_Add_OID_set_member(), GSS_Test_OID_set_member(), 4179 GSS_Inquire_names_for_mech(), GSS_Inquire_mechs_for_name(), 4180 GSS_Canonicalize_name(), GSS_Export_name(), GSS_Duplicate_name(). 4182 This GSS-V2 specification introduces three new facilities applicable to 4183 security contexts, indicated using the following context state values 4184 which are not present in GSS-V1: 4186 anon_state, set TRUE to indicate that a context's initiator is 4187 anonymous from the viewpoint of the target; Section 1.2.5 of this 4188 specification provides a summary description of the GSS-V2 4189 anonymity support facility, support and use of which is optional. 4191 prot_ready_state, set TRUE to indicate that a context may be used 4192 for per-message protection before final completion of context 4193 establishment; Section 1.2.7 of this specification provides a 4194 summary description of the GSS-V2 facility enabling mechanisms to 4195 selectively permit per-message protection during context 4196 establishment, support and use of which is optional. 4198 trans_state, set TRUE to indicate that a context is transferable to 4199 another process using the GSS-V2 GSS_Export_sec_context() facility. 4201 These state values are represented (at the C bindings level) in 4202 positions within a bit vector which are unused in GSS-V1, and may be 4203 safely ignored by GSS-V1 callers. 4205 Relative to GSS-V1, GSS-V2 provides additional guidance to GSS-API 4206 implementors in the following areas: implementation robustness, 4207 credential management, behavior in multi-mechanism configurations, 4208 naming support, and inclusion of optional sequencing services. The 4209 token tagging facility as defined in GSS-V2, Section 3.1, is now 4210 described directly in terms of octets to facilitate interoperable 4211 implementation without general ASN.1 processing code; the corresponding 4212 ASN.1 syntax, included for descriptive purposes, is unchanged from that 4213 in GSS-V1. For use in conjunction with added naming support facilities, 4214 a new Exported Name Object construct is added. Additional name types 4215 are introduced in Section 4. 4217 This GSS-V2 specification adds the following major_status values which 4218 are not defined in GSS-V1: 4220 GSS_S_BAD_QOP unsupported QOP value 4221 GSS_S_UNAUTHORIZED operation unauthorized 4222 GSS_S_UNAVAILABLE operation unavailable 4223 GSS_S_DUPLICATE_ELEMENT duplicate credential element 4224 requested 4225 GSS_S_NAME_NOT_MN name contains multi-mechanism 4226 elements 4227 GSS_S_GAP_TOKEN skipped predecessor token(s) 4228 detected 4230 Of these added status codes, only two values are defined to be 4231 returnable by calls existing in GSS-V1: GSS_S_BAD_QOP (returnable by 4232 GSS_GetMIC() and GSS_Wrap()), and GSS_S_GAP_TOKEN (returnable by 4233 GSS_VerifyMIC() and GSS_Unwrap()). 4235 Additionally, GSS-V2 descriptions of certain calls present in GSS-V1 4236 have been updated to allow return of additional major_status values from 4237 the set as defined in GSS-V1: GSS_Inquire_cred() has 4238 GSS_S_DEFECTIVE_CREDENTIAL and GSS_S_CREDENTIALS_EXPIRED defined as 4239 returnable, GSS_Init_sec_context() has GSS_S_OLD_TOKEN, 4240 GSS_S_DUPLICATE_TOKEN, and GSS_S_BAD_MECH defined as returnable, and 4241 GSS_Accept_sec_context() has GSS_S_BAD_MECH defined as returnable. 4243 AUTHOR'S ADDRESS 4245 John Linn 4246 RSA Laboratories East 4247 20 Crosby Drive 4248 Bedford, MA 01730 USA 4249 +1 781.687.7817 4251 E-mail: linn@rsa.com 4252 TABLE OF CONTENTS 4254 1: GSS-API Characteristics and Concepts 4255 1.1: GSS-API Constructs 4256 1.1.1: Credentials 4257 1.1.1.1: Credential Constructs and Concepts 4258 1.1.1.2: Credential Management 4259 1.1.1.3: Default Credential Resolution 4260 1.1.2: Tokens 4261 1.1.3: Security Contexts 4262 1.1.4: Mechanism Types 4263 1.1.5: Naming 4264 1.1.6: Channel Bindings 4265 1.2: GSS-API Features and Issues 4266 1.2.1: Status Reporting 4267 1.2.2: Per-Message Security Service Availability 4268 1.2.3: Per-Message Replay Detection and Sequencing 4269 1.2.4: Quality of Protection 4270 1.2.5: Anonymity Support 4271 1.2.6: Initialization 4272 1.2.7: Per-Message Protection During Context Establishment 4273 1.2.8: Implementation Robustness 4274 2: Interface Descriptions 4275 2.1: Credential management calls 4276 2.1.1: GSS_Acquire_cred call 4277 2.1.2: GSS_Release_cred call 4278 2.1.3: GSS_Inquire_cred call 4279 2.1.4: GSS_Add_cred call 4280 2.1.5: GSS_Inquire_cred_by_mech call 4281 2.2: Context-level calls 4282 2.2.1: GSS_Init_sec_context call 4283 2.2.2: GSS_Accept_sec_context call 4284 2.2.3: GSS_Delete_sec_context call 4285 2.2.4: GSS_Process_context_token call 4286 2.2.5: GSS_Context_time call 4287 2.2.6: GSS_Inquire_context call 4288 2.2.7: GSS_Wrap_size_limit call 4289 2.2.8: GSS_Export_sec_context call 4290 2.2.9: GSS_Import_sec_context call 4291 2.3: Per-message calls 4292 2.3.1: GSS_GetMIC call 4293 2.3.2: GSS_VerifyMIC call 4294 2.3.3: GSS_Wrap call 4295 2.3.4: GSS_Unwrap call 4296 2.4: Support calls 4297 2.4.1: GSS_Display_status call 4298 2.4.2: GSS_Indicate_mechs call 4299 2.4.3: GSS_Compare_name call 4300 2.4.4: GSS_Display_name call 4301 2.4.5: GSS_Import_name call 4302 2.4.6: GSS_Release_name call 4303 2.4.7: GSS_Release_buffer call 4304 2.4.8: GSS_Release_OID_set call 4305 2.4.9: GSS_Create_empty_OID_set call 4306 2.4.10: GSS_Add_OID_set_member call 4307 2.4.11: GSS_Test_OID_set_member call 4308 2.4.12: GSS_Inquire_names_for_mech call 4309 2.4.13: GSS_Inquire_mechs_for_name call 4310 2.4.14: GSS_Canonicalize_name call 4311 2.4.15: GSS_Export_name call 4312 2.4.16: GSS_Duplicate_name call 4313 3: Data Structure Definitions for GSS-V2 Usage 4314 3.1: Mechanism-Independent Token Format 4315 3.2: Mechanism-Independent Exported Name Object Format 4316 4: Name Type Definitions 4317 4.1: Host-Based Service Name Form 4318 4.2: User Name Form 4319 4.3: Machine UID Form 4320 4.4: String UID Form 4321 5: Mechanism-Specific Example Scenarios 4322 5.1: Kerberos V5, single-TGT 4323 5.2: Kerberos V5, double-TGT 4324 5.3: X.509 Authentication Framework 4325 6: Security Considerations 4326 7: Related Activities 4327 8: Referenced Documents 4328 Appendix A: Mechanism Design Constraints 4329 Appendix B: Compatibility with GSS-V1 4331 John Linn (linn@rsa.com) 4332 RSA Laboratories East, Bedford, MA, USA