RFC 2743

Generic Security Service Application Program Interface Version 2, Update 1

πŸ“… published January 2000, from ietf

Generic Security Service Application Program Interface Version 2, Update 1 πŸŽ€βœ¨

okay bestie, so this is RFC 2743, and it's giving standards-track glow-up πŸ’…. It was written by J. Linn of RSA Laboratories, it's a Standards Track document, and it's dated January 2000 πŸ“…. It's also obsoleting RFC 2078 🫢, so 2743 is the newer version of the GSS-API spec.

Status of this Memo πŸ“œ

ok so this document is an Internet standards track protocol for the Internet community, and it's literally asking everyone for discussion and suggestions for improvements πŸ™Œ. If you want to know where this protocol stands in the standardization process, check the current edition of the "Internet Official Protocol Standards" (STD 1) πŸ”. And the distribution of this memo is unlimited, so share the tea freely πŸ“.

Copyright (C) The Internet Society (2000). All Rights Reserved. πŸ’œ

Abstract πŸ¦‹

so the Generic Security Service Application Program Interface (GSS-API), Version 2, is the one defined in [RFC-2078] 🌈. It gives security services to callers in a generic way πŸ’–, which means it can run on top of a whole range of underlying mechanisms and technologies. The big payoff is source-level portability of applications across different environments, and that's iconic πŸ‘‘.

This spec defines the GSS-API services and primitives at a level that doesn't depend on any particular underlying mechanism or programming language environment ✨. It's meant to be complemented by other related specs, specifically:

  • documents defining specific parameter bindings for particular language environments 🧚
  • documents defining token formats, protocols, and procedures to be implemented in order to realize GSS-API services atop particular security mechanisms πŸ”

This memo obsoletes [RFC-2078] πŸ’…. It makes specific, incremental changes in response to implementation experience and liaison requests, so it's very much built from real-world feedback 🫢. The plan is that this memo, or a successor version of it, will become the basis for later progression of the GSS-API specification on the standards track πŸš€. Main character energy, no cap πŸŽ€.


TABLE OF CONTENTS πŸ—‚οΈ

   1: GSS-API Characteristics and Concepts . . . . . . . . . . . .  4
   1.1: GSS-API Constructs . . . . . . . . . . . . . . . . . . . .  6
   1.1.1:  Credentials . . . . . . . . . . . . . . . . . . . . . .  6
   1.1.1.1: Credential Constructs and Concepts . . . . . . . . . .  6
   1.1.1.2: Credential Management  . . . . . . . . . . . . . . . .  7
   1.1.1.3: Default Credential Resolution  . . . . . . . . . . . .  8
   1.1.2: Tokens . . . . . . . . . . . . . . . . . . . . . . . . .  9
   1.1.3:  Security Contexts . . . . . . . . . . . . . . . . . . . 11
   1.1.4:  Mechanism Types . . . . . . . . . . . . . . . . . . . . 12
   1.1.5:  Naming  . . . . . . . . . . . . . . . . . . . . . . . . 13
   1.1.6:  Channel Bindings  . . . . . . . . . . . . . . . . . . . 16
   1.2:  GSS-API Features and Issues . . . . . . . . . . . . . . . 17
   1.2.1:  Status Reporting  and Optional Service Support  . . . . 17
   1.2.1.1: Status Reporting . . . . . . . . . . . . . . . . . . . 17
   1.2.1.2: Optional Service Support . . . . . . . . . . . . . . . 19
   1.2.2: Per-Message Security Service Availability  . . . . . . . 20
   1.2.3: Per-Message Replay Detection and Sequencing  . . . . . . 21
   1.2.4:  Quality of Protection . . . . . . . . . . . . . . . . . 24
   1.2.5: Anonymity Support  . . . . . . . . . . . . . . . . . . . 25
   1.2.6: Initialization . . . . . . . . . . . . . . . . . . . . . 25
   1.2.7: Per-Message Protection During Context Establishment  . . 26
   1.2.8: Implementation Robustness  . . . . . . . . . . . . . . . 27
   1.2.9: Delegation . . . . . . . . . . . . . . . . . . . . . . . 28
   1.2.10: Interprocess Context Transfer . . . . . . . . . . . . . 28
   2:  Interface Descriptions  . . . . . . . . . . . . . . . . . . 29
   2.1:  Credential management calls . . . . . . . . . . . . . . . 31
   2.1.1:  GSS_Acquire_cred call . . . . . . . . . . . . . . . . . 31
   2.1.2:  GSS_Release_cred call . . . . . . . . . . . . . . . . . 34
   2.1.3:  GSS_Inquire_cred call . . . . . . . . . . . . . . . . . 35
   2.1.4:  GSS_Add_cred call . . . . . . . . . . . . . . . . . . . 37
   2.1.5:  GSS_Inquire_cred_by_mech call . . . . . . . . . . . . . 40
   2.2:  Context-level calls . . . . . . . . . . . . . . . . . . . 41
   2.2.1:  GSS_Init_sec_context call . . . . . . . . . . . . . . . 42
   2.2.2:  GSS_Accept_sec_context call . . . . . . . . . . . . . . 49
   2.2.3:  GSS_Delete_sec_context call . . . . . . . . . . . . . . 53
   2.2.4:  GSS_Process_context_token call  . . . . . . . . . . . . 54
   2.2.5:  GSS_Context_time call . . . . . . . . . . . . . . . . . 55
   2.2.6:  GSS_Inquire_context call  . . . . . . . . . . . . . . . 56
   2.2.7:  GSS_Wrap_size_limit call  . . . . . . . . . . . . . . . 57
   2.2.8:  GSS_Export_sec_context call . . . . . . . . . . . . . . 59
   2.2.9:  GSS_Import_sec_context call . . . . . . . . . . . . . . 61
   2.3:  Per-message calls . . . . . . . . . . . . . . . . . . . . 62
   2.3.1:  GSS_GetMIC call . . . . . . . . . . . . . . . . . . . . 63
   2.3.2:  GSS_VerifyMIC call  . . . . . . . . . . . . . . . . . . 64
   2.3.3:  GSS_Wrap call . . . . . . . . . . . . . . . . . . . . . 65
   2.3.4:  GSS_Unwrap call . . . . . . . . . . . . . . . . . . . . 66
   2.4:  Support calls . . . . . . . . . . . . . . . . . . . . . . 68
   2.4.1:  GSS_Display_status call . . . . . . . . . . . . . . . . 68
   2.4.2:  GSS_Indicate_mechs call . . . . . . . . . . . . . . . . 69
   2.4.3:  GSS_Compare_name call . . . . . . . . . . . . . . . . . 70
   2.4.4:  GSS_Display_name call . . . . . . . . . . . . . . . . . 71
   2.4.5:  GSS_Import_name call  . . . . . . . . . . . . . . . . . 72
   2.4.6:  GSS_Release_name call . . . . . . . . . . . . . . . . . 73
   2.4.7:  GSS_Release_buffer call . . . . . . . . . . . . . . . . 74
   2.4.8:  GSS_Release_OID_set call  . . . . . . . . . . . . . . . 74
   2.4.9:  GSS_Create_empty_OID_set call . . . . . . . . . . . . . 75
   2.4.10: GSS_Add_OID_set_member call . . . . . . . . . . . . . . 76
   2.4.11: GSS_Test_OID_set_member call  . . . . . . . . . . . . . 76
   2.4.12: GSS_Inquire_names_for_mech call . . . . . . . . . . . . 77
   2.4.13: GSS_Inquire_mechs_for_name call . . . . . . . . . . . . 77
   2.4.14: GSS_Canonicalize_name call  . . . . . . . . . . . . . . 78
   2.4.15: GSS_Export_name call  . . . . . . . . . . . . . . . . . 79
   2.4.16: GSS_Duplicate_name call . . . . . . . . . . . . . . . . 80
   3: Data Structure Definitions for GSS-V2 Usage  . . . . . . . . 81
   3.1: Mechanism-Independent Token Format . . . . . . . . . . . . 81
   3.2: Mechanism-Independent Exported Name Object Format  . . . . 84
   4: Name Type Definitions  . . . . . . . . . . . . . . . . . . . 85
   4.1: Host-Based Service Name Form . . . . . . . . . . . . . . . 85
   4.2: User Name Form . . . . . . . . . . . . . . . . . . . . . . 86
   4.3: Machine UID Form . . . . . . . . . . . . . . . . . . . . . 87
   4.4: String UID Form  . . . . . . . . . . . . . . . . . . . . . 87
   4.5: Anonymous Nametype . . . . . . . . . . . . . . . . . . . . 87
   4.6: GSS_C_NO_OID . . . . . . . . . . . . . . . . . . . . . . . 88
   4.7: Exported Name Object . . . . . . . . . . . . . . . . . . . 88
   4.8: GSS_C_NO_NAME  . . . . . . . . . . . . . . . . . . . . . . 88
   5:  Mechanism-Specific Example Scenarios  . . . . . . . . . . . 88
   5.1: Kerberos V5, single-TGT  . . . . . . . . . . . . . . . . . 89
   5.2: Kerberos V5, double-TGT  . . . . . . . . . . . . . . . . . 89
   5.3:  X.509 Authentication Framework  . . . . . . . . . . . . . 90
   6:  Security Considerations . . . . . . . . . . . . . . . . . . 91
   7:  Related Activities  . . . . . . . . . . . . . . . . . . . . 92
   8:  Referenced Documents  . . . . . . . . . . . . . . . . . . . 93
   Appendix A: Mechanism Design Constraints  . . . . . . . . . . . 94
   Appendix B: Compatibility with GSS-V1 . . . . . . . . . . . . . 94
   Appendix C: Changes Relative to RFC-2078  . . . . . . . . . . . 96
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . .100
   Full Copyright Statement  . . . . . . . . . . . . . . . . . . .101

1. GSS-API Characteristics and Concepts ✨

okay bestie, so GSS-API runs on this paradigm πŸ’… A typical GSS-API caller is itself a communications protocol, and it calls GSS-API to protect its communications with authentication, integrity, and/or confidentiality security services πŸ” The caller takes the tokens its local GSS-API hands back, ships them to a peer on a remote system, and that peer passes the tokens it receives to its own local GSS-API to process them 🚚 These security services can be built on top of a range of underlying mechanisms that use secret-key and public-key crypto, and they really have been built that way πŸ”₯

The GSS-API splits the work into two parts πŸŽ€ First there's setting up a security context between peers and getting peer entity authentication (the GSS_Init_sec_context() and GSS_Accept_sec_context() calls). Then there's per-message data origin authentication and data integrity protection (the GSS_GetMIC() and GSS_VerifyMIC() calls) for messages sent later over that context. (The definition of the peer entity authentication service, and the other definitions in this doc, match what [ISO-7498-2] provides, so it's giving consistency 🧚) When a context gets set up, the GSS-API lets the context initiator optionally allow its credentials to be delegated, which means the context acceptor can start further contexts on behalf of the calling initiator 🫢 Then the per-message GSS_Wrap() and GSS_Unwrap() calls offer the same data origin authentication and data integrity that GSS_GetMIC() and GSS_VerifyMIC() do, and they also let the caller pick confidentiality as an option πŸ¦‹ Some extra calls are there to support the GSS-API's users too 🌸

Let's walk through an example, because it's so much easier to see it in action πŸ‘‘ It's mechanism-independent, which means it doesn't care which mechanism is underneath. It sets up a security context and then sends a protected message. The example assumes credential acquisition has already been done βœ… It also assumes the underlying authentication tech can authenticate a client to a server using elements in a single token, and can authenticate the server back to the client (mutual authentication) with a single returned token. Honestly, that holds for some CAT mechanisms that are already documented, but it's not guaranteed for every cryptographic technology and protocol out there πŸ™ˆ

The client calls GSS_Init_sec_context() to set up a security context with the server identified by targ_name, and it chooses to set mutual_req_flag so mutual authentication happens during context setup 🀝 GSS_Init_sec_context() gives back an output_token to send to the server, and it reports GSS_S_CONTINUE_NEEDED status because the mutual authentication sequence isn't finished yet ⏳ If mutual_req_flag hadn't been set, that very first call would've returned GSS_S_COMPLETE status instead. Then the client sends the output_token to the server πŸ“¨

The server passes the token it received in as the input_token parameter to GSS_Accept_sec_context() πŸ™Œ GSS_Accept_sec_context() reports GSS_S_COMPLETE status, gives back the client's authenticated identity in the src_name result, and provides an output_token to send back. The server sends that output_token to the client πŸ’Œ

The client passes the token it received as the input_token parameter to a follow-up call to GSS_Init_sec_context() πŸ”„ That call processes the data in the token so mutual authentication is achieved from the client's point of view. It returns GSS_S_COMPLETE status, which means mutual authentication succeeded and context establishment is done for this example πŸŽ‰

Next, the client makes a data message and passes it to GSS_Wrap() πŸŽ€ GSS_Wrap() does data origin authentication, data integrity, and (optionally) confidentiality processing on the message, wraps the result up into output_message, and reports GSS_S_COMPLETE status. The client sends the output_message to the server πŸš€

The server passes the message it received to GSS_Unwrap() πŸ”“ GSS_Unwrap() undoes the wrapping that GSS_Wrap() did, decrypts the message if the optional confidentiality feature was used, and checks the data origin authentication and data integrity values. When that checks out, GSS_Unwrap() returns GSS_S_COMPLETE status along with the resulting output_message ✨

For this example, the server somehow knows out-of-band that the context won't be used again after one protected message goes from client to server πŸ•΅οΈβ€β™€οΈ Given that, the server calls GSS_Delete_sec_context() to flush the context-level information 🧹 Optionally, the server-side application can give GSS_Delete_sec_context() a token buffer to receive a context_token. That token gets sent to the client to ask it to delete its own context-level information πŸ’€

If a context_token does get transferred, the client passes it to GSS_Process_context_token(), which returns GSS_S_COMPLETE status after deleting the context-level information on the client system πŸ’–

The GSS-API design is built around several basic goals, and they're all so iconic πŸ‘‘

  • Mechanism independence: The GSS-API defines an interface to cryptographically implemented strong authentication and other security services at a generic level that doesn't depend on any particular underlying mechanism 🧚 For example, GSS-API services have been implemented with secret-key technologies (like Kerberos, per [RFC-1964]) and with public-key approaches (like SPKM, per [RFC-2025]) πŸ”‘
  • Protocol environment independence: The GSS-API doesn't depend on the communications protocol suites it's used with, so it works in a broad range of protocol environments 🌈 In suitable environments, an intermediate implementation "veneer" that's oriented to a particular communication protocol can sit between the applications calling that protocol and the GSS-API. One example is the one defined in [RFC-2203] for Open Network Computing Remote Procedure Call (RPC). That way, GSS-API facilities get invoked along with that protocol's communications calls πŸ¦‹
  • Protocol association independence: The GSS-API's security context construct is independent of communications protocol association constructs πŸ’œ This means a single GSS-API implementation can be used by a variety of invoking protocol modules on behalf of their calling applications. GSS-API services can also be invoked directly by applications, completely independent of protocol associations 🌸
  • Suitability to a range of implementation placements: GSS-API clients aren't required to live inside any Trusted Computing Base (TCB) perimeter defined on a system where the GSS-API is implemented 🏰 The security services are specified in a way that works for both intra-TCB and extra-TCB callers 🫢

1.1. GSS-API Constructs

This section breaks down the basic elements that make up the GSS-API 🧩

1.1.1. Credentials

1.1.1.1. Credential Constructs and Concepts ✨

Credentials are the prerequisites that let GSS-API peers set up security contexts with each other πŸ” A caller can say the credential elements used for context initiation or acceptance should be selected by default πŸ™Œ Or, if a caller needs to explicitly pick particular credential structures, it can reference them through GSS-API-provided credential handles ("cred_handles"). Either way, the caller's credential references are indirect. The GSS-API implementation mediates them, so callers never have to access the selected credential elements directly πŸ¦‹

A single credential structure can be used both to initiate outbound contexts and to accept inbound contexts πŸ”„ Callers who only need one of those modes can say so when they acquire credentials, which lets the underlying mechanisms optimize their processing and storage needs πŸ’… A credential element defined by a particular mechanism can contain multiple cryptographic keys, for example so authentication and message encryption can use different algorithms πŸ”‘

A GSS-API credential structure can contain multiple credential elements, and each one holds mechanism-specific information for a particular underlying mechanism (mech_type) πŸŽ€ Even so, the elements inside a given credential structure all represent one common entity 🫢 What a credential structure contains depends on the set of mech_types that a particular GSS-API implementation supports 🌈 Each credential element identifies the data its mechanism needs to set up contexts on behalf of a particular principal. It can also hold separate credential references for context initiation and context acceptance 🧚 Within one credential, you're not allowed to have multiple credential elements with overlapping combinations of mechanism, usage mode, and validity period 🚫

Usually, a single mech_type gets used for every security context a particular initiator sets up with a particular target πŸ’– One big reason for supporting credential sets with multiple mech_types is so initiators on systems that can handle several types can still start contexts with targets on other systems that only support some of those types πŸ‘‘

1.1.1.2. Credential Management ✨

It's the job of the underlying system-specific mechanisms and OS functions below the GSS-API to make sure that acquiring and using credentials for a given identity stays limited to the right processes on a system πŸ›‘οΈ Implementors should take this seriously 😭 Being able to use a principal's credentials is basically the same as being able to successfully claim that principal's identity πŸ’€

Once a set of GSS-API credentials exists, whether that set can be handed off to other processes or similar constructs on the system is a local matter that the GSS-API doesn't define 🏠 For example, a local policy might say that any credentials received from logging into a user account, or from having rights delegated to that account, can be accessed by or transferred to processes running under that account πŸ¦‹

Credential establishment, especially when it's done for users instead of server processes, will probably need access to passwords or other sensitive values πŸ”’ Those should be protected locally and exposed for the shortest time possible. So it often makes sense for preliminary credential establishment to happen through local means at user login time, with the results cached for later use 🧁 Those preliminary credentials get set aside (in a system-specific way) for later use, either:

  • to be accessed by calling the GSS-API GSS_Acquire_cred() call, which returns an explicit handle to reference that credential 🎟️
  • to form the default credential elements that get installed and used whenever default credential behavior is requested on behalf of a process 🌸

1.1.1.3: Default Credential Resolution ✨

Okay so GSS_Init_sec_context() and GSS_Accept_sec_context() both let you pass GSS_C_NO_CREDENTIAL as the credential handle πŸŽ€. That special handle basically says "I want to act as the default principal, pls." For app portability, support for default resolution on initiator credentials (GSS_Init_sec_context() usage) is mandated πŸ’…. Support for default resolution on acceptor credentials (GSS_Accept_sec_context() usage) is recommended 🌸. If default credential resolution fails, the GSS_S_NO_CRED status is to be returned 😭.

GSS_Init_sec_context:

  • (i) If there is only a single principal capable of initiating security contexts that the application is authorized to act on behalf of, then that principal shall be used, otherwise
  • (ii) If the platform maintains a concept of a default network-identity, and if the application is authorized to act on behalf of that identity for the purpose of initiating security contexts, then the principal corresponding to that identity shall be used, otherwise
  • (iii) If the platform maintains a concept of a default local identity, and provides a means to map local identities into network-identities, and if the application is authorized to act on behalf of the network-identity image of the default local identity for the purpose of initiating security contexts, then the principal corresponding to that identity shall be used, otherwise
  • (iv) A user-configurable default identity should be used 🧚

GSS_Accept_sec_context:

  • (i) If there is only a single authorized principal identity capable of accepting security contexts, then that principal shall be used, otherwise
  • (ii) If the mechanism can determine the identity of the target principal by examining the context-establishment token, and if the accepting application is authorized to act as that principal for the purpose of accepting security contexts, then that principal identity shall be used, otherwise
  • (iii) If the mechanism supports context acceptance by any principal, and mutual authentication was not requested, any principal that the application is authorized to accept security contexts under may be used, otherwise
  • (iv) A user-configurable default identity shall be used πŸ’–

The whole point of these rules is to let both the initiator and the acceptor use the default behavior wherever possible ✨. Apps that ask for default behavior are likely to be more portable across mechanisms and platforms than apps that use GSS_Acquire_cred() to request a specific identity. So honestly, default is the iconic move πŸ‘‘.

1.1.2: Tokens πŸ¦‹

Okay, tokens are the data bits that GSS-API callers pass back and forth, and there are two flavors πŸ’…. Context-level tokens get exchanged to set up and manage a security context between peers. Per-message tokens belong to an already-established context, and they're exchanged to give protective security services (data origin authentication, integrity, and optional confidentiality) for the data messages πŸ”’.

The first context-level token that comes out of GSS_Init_sec_context() is required to start with a globally-interpretable mechanism identifier, which is an Object Identifier (OID) of the security mechanism 🌈. The rest of that token, plus the entire contents of every other token, is specific to the underlying mechanism that's supporting the GSS-API. Section 3.1 of this document is for mechanism designers, and it describes the header of that first context-level token, which is then followed by mechanism-specific info πŸŽ€.

Tokens' contents are opaque to GSS-API callers, so don't go poking inside πŸ™ˆ. They're generated inside the GSS-API implementation at one end system, handed to a GSS-API caller so they can be sent to the peer GSS-API caller at the far end, and then processed by the GSS-API implementation over there ✨.

Context-level tokens may be output by GSS-API calls, and should be sent to GSS-API peers, whether or not the call's status indicators say it finished successfully πŸ’œ. Per-message tokens, though, only get returned when a per-message call completes successfully πŸ“. Zero-length tokens are never returned by GSS routines for transfer to a peer, so don't expect them πŸ’€. Token transfer can happen in-band (smooshed into the same protocol stream the callers use for other data) or out-of-band (across a logically separate channel) πŸ¦‹.

Different tokens serve different purposes, like context initiation, context acceptance, or protected message data on an established context. So it's the GSS-API caller's job to tell the token types apart, link them to the right security contexts, and pass them to the right GSS-API processing routines 🧚. How you do that depends on your caller protocol environment, and there are a few ways to pull it off.

The following examples show ways the token types can be told apart:

  • implicit tagging based on state information (e.g., all tokens on a new association are considered to be context establishment tokens until context establishment is completed, at which point all tokens are considered to be wrapped data objects for that context),
  • explicit tagging at the caller protocol level,
  • a hybrid of these approaches.

Usually, the data inside a token has its own mechanism-specific tagging, which lets mechanism-level modules tell apart tokens meant for different purposes 🌸. Mechanism designers are strongly encouraged to add this internal tagging (it's recommended!), since it lets a mechanism figure out whether a caller has handed a token to the wrong GSS-API routine πŸ™ˆ.

Heads up, bestie: building a GSS-API mechanism on a particular cryptographic technique and protocol (so it conforms to a specific GSS-API mechanism definition) does NOT automatically mean GSS-API callers using that mechanism can talk to peers using the same technique and protocol outside the GSS-API world. It also doesn't mean they'll interoperate with peers running a different GSS-API mechanism built on the same tech 😭. The token format defined for a mechanism, and the way those tokens get woven into a caller's protocol, may not be interoperable with the tokens that non-GSS-API callers of the same underlying technique use πŸ’€.

1.1.3: Security Contexts 🌷

Okay, security contexts get set up between peers using credentials established locally with each peer, or credentials a peer received through delegation 🫢. You can have several contexts running at the same time between a pair of peers, using the same or different sets of credentials. Having multiple contexts with different credentials is what makes graceful rollover possible when credentials expire πŸ”„. Using the same credentials for multiple contexts is also useful, since it separates different message streams in a security sense ✨.

The GSS-API doesn't care about the underlying protocols or addressing structure, so it depends on its callers to transport the GSS-API data elements ✨. That means it's the caller's responsibility to parse the messages they receive, separating the GSS-API-related data elements from the caller's own data πŸ’…. The GSS-API also doesn't care whether the underlying communications service is connection-oriented or connectionless πŸ¦‹.

No correlation between a security context and a communications protocol association is dictated. (The optional channel binding facility, which is discussed in Section 1.1.6 of this document, is an intentional exception to this rule, supporting extra protection features within GSS-API supporting mechanisms πŸ”.) This separation is what lets the GSS-API work in a wide range of communications environments, and it also keeps the calling sequences of the individual calls simpler πŸŽ€. In many cases (depending on the underlying security protocol, the associated mechanism, and whether cached info is available), the state info needed for context setup can be sent alongside the initial signed user data, without any extra message exchanges πŸš€. Messages can be protected and transferred in both directions on an established GSS-API security context at the same time, and protecting messages in one direction doesn't interfere with protecting messages in the reverse direction πŸ”₯.

GSS-API implementations are expected to keep inquirable context data on a context until a caller releases that context, even after it has expired 🧚. The underlying cryptographic data elements may be deleted after expiration, though, in order to limit their exposure 🌈.

1.1.4: Mechanism Types ✨

okay so, to actually set up a security context with a target peer, you need to find an underlying mechanism type (mech_type) that BOTH the initiator and the target support 🫢 the mechanism is a whole package. It's not just the crypto tech (or a mix of crypto techs), it also defines the syntax and semantics of the data elements that get swapped so the security services can actually happen πŸ”₯

It is recommended that callers starting a context pass the "default" mech_type value πŸ’… that way, system-specific functions inside (or called by) the GSS-API implementation can pick the right mech_type for you. But if you need a specific one, you're totally allowed to ask for it πŸ¦‹

Quick terminology moment: "negotiating mechanism" means a mechanism that does its own negotiation to pick a concrete mechanism that both peers share, and then uses that one for context establishment 🧚 Only mechanisms whose specs define them as negotiating mechanisms are allowed to hand back a selected mechanism with a different identifier value than the one the caller put in. The exception is when the caller asked for "default" πŸ‘‘

There are a bunch of ways to figure out a shared mech_type for a peer, and they change depending on the environment and situation. A few examples (not an exhaustive list, bestie):

  • using a fixed mech_type that's set by configuration in your environment
  • a syntactic convention that works per target, by looking at the target's name, OR by looking up the target's name in a naming service or other database to find out which mech_types that target supports
  • explicit negotiation between the GSS-API callers before the security context gets set up
  • using a negotiating mechanism 🌸

When mech_type specifiers get transferred between GSS-API peers (per Section 3 of this document, they're represented as Object Identifiers, or OIDs), they're what tells you how to interpret the tokens that go with them πŸ’œ (The structure and encoding of OIDs is defined in [ISOIEC-8824] and [ISOIEC-8825], if you want to go deep.) Hierarchically structured OIDs are the reason you don't get confused about what a mech_type specifier means πŸ™ˆ

Some real examples for you: the OID for the DASS ([RFC-1507]) MechType is 1.3.12.2.1011.7.5, and the Kerberos V5 mechanism ([RFC-1964]) is 1.2.840.113554.1.2.2. Kerberos V5 has been bumped up to Proposed Standard, so it's officially a whole thing now πŸŽ€

1.1.5: Naming 🌈

the GSS-API doesn't force any naming structure on you πŸ™…β€β™€οΈ it treats the names that get passed across the interface (to start and accept security contexts) as opaque objects. This is what lets it work on top of a bunch of different security mechanisms, since they all process and authenticate names in their own ways. Translating between arbitrary naming environments is out of scope for the GSS-API, so you're expected to use local conversion functions within your end system to translate between the name formats it supports ✨

There are different classes of name representations, and each one goes with different GSS-API parameters:

  • Internal form (called INTERNAL NAME in this document) is opaque to callers and gets defined by each GSS-API implementation. Implementations that support multiple namespace types must maintain internal tags so they can tell which interpretation a given name should get 🧩 A Mechanism Name (MN) is a special case of INTERNAL NAME, guaranteed to contain elements from one and only one mechanism. Calls that are guaranteed to emit MNs, or that need MNs as input, are labeled that way in this specification πŸ’–
  • Contiguous string ("flat") form (called OCTET STRING in this document) comes with OID tags that say which namespace it belongs to. Depending on the tag value, a flat name might or might not be a printable string that users can type in or read πŸ‘€ The tags let GSS-API callers and mechanisms tell name types apart and check whether they can process a name's type. That stops a name of one type from being misread as another type, which would cause aliasing problems πŸ¦‹
  • The GSS-API Exported Name Object is a special kind of flat name, marked with a reserved OID value. It holds a canonicalized form of a name that's good for binary comparisons πŸ’œ

Besides tagging names with types, this spec defines primitives for a level of naming-environment independence, for callers who don't need to understand the internal syntax and semantics of names themselves 🌸 The basic services include name comparison (GSS_Compare_name()), human-readable display (GSS_Display_name()), input conversion (GSS_Import_name()), internal name deallocation (GSS_Release_name()), and internal name duplication (GSS_Duplicate_name()). (Expect many end systems to implement these on top of their own name-manipulation primitives already around. The point of putting them in the GSS-API is giving callers a portable way to do these operations on authenticated names, which is handy for authorization and audit needs πŸ“‹)

GSS_Import_name() implementations can, where it makes sense, support more than one printable syntax for a given namespace (for example, alternative printable representations for X.500 Distinguished Names) so callers can pick whichever representation they like πŸŽ€ GSS_Display_name() implementations output a printable syntax chosen to suit their operating environment. That choice is a local matter 🏠 If you want your code to be portable across different printable syntaxes, don't write comparisons based on printable name forms. Use GSS_Compare_name() instead to check whether one internal-format name matches another ✨

Large access control lists can make calling GSS_Import_name() and GSS_Compare_name() on every ACL entry too expensive 😭 So the GSS-API defines a special form of contiguous string name that you can compare directly (for example, with memcmp()). These comparable names are generated by GSS_Export_name(), which needs an MN as input. Exported names can be re-imported with GSS_Import_name(), and the resulting internal name will also be an MN. The symbolic constant GSS_C_NT_EXPORT_NAME identifies the "export name" type 🏷️ Structurally, an exported name object has a header with an OID identifying the mechanism that authenticated the name, plus a trailer with the name itself. The trailer's syntax is defined by each individual mechanism spec. The exact format of an exported name is defined in Section 3.2 of this specification πŸ’…

Heads up, because this is a super easy thing to mix up πŸ™ˆ the results from GSS_Compare_name() will generally be different from what you get by calling GSS_Canonicalize_name() and GSS_Export_name() and then comparing the exported names. The first set of operations checks whether two (unauthenticated) names identify the same principal. The second checks whether a particular mechanism would authenticate them as the same principal. These two operations only give the same results for MNs, in general 🧠

Quick reminder: the two checks answer different questions. "Same name?" and "would the mechanism say same principal?" are not the same question, bestie πŸ’€

Here's the intended dataflow among the name-related GSS-API processing routines, in diagram form:

                        GSS-API library defaults
                               |
                               |
                               V                         text, for
   text -------------->  internal_name (IN) -----------> display only
         import_name()          /          display_name()
                               /
                              /
                             /
    accept_sec_context()    /
          |                /
          |               /
          |              /  canonicalize_name()
          |             /
          |            /
          |           /
          |          /
          |         /
          |        |
          V        V     <---------------------
    single mechanism        import_name()         exported name: flat
    internal_name (MN)                            binary "blob" usable
                         ---------------------->  for access control
                            export_name()

1.1.6: Channel Bindings πŸ”

okay so GSS-API has this thing called caller-provided channel binding (chan_binding) info πŸŽ€ and it's lowkey the move for making peer authentication during context establishment way stronger. It limits where an intercepted context establishment token can get reused by an attacker 😈. Callers can bind a security context to stuff like addresses, transformed versions of encryption keys, the protection mechanisms on the communications channel, and application-specific data πŸ’….

The initiator has to work out the right channel binding values to pass into GSS_Init_sec_context(), and the target has to give consistent values to GSS_Accept_sec_context(). That way both peers' mechanisms can check that the tokens have the correct channel-related characteristics πŸ¦‹. Using the channel binding facility is totally the caller's choice. Mechanisms can operate with NULL channel bindings, and mechanism implementors are encouraged, but not required, to actually use caller-provided channel binding data in their mechanisms. Callers also shouldn't assume the underlying mechanisms give confidentiality protection for channel binding info πŸ™ˆ.

When non-NULL channel bindings are provided, some mechanisms can get extra security value by actually interpreting what's inside them (not just carrying them, or integrity check values computed on them, inside tokens). That means they need specific data in a defined format 🧠. So mechanism implementors are agreeing on conventional interpretations for the contents, including address specifiers for context initiators and acceptors (with the content depending on the communications protocol environment). These conventions are being added to GSS-API mechanism specs and to the GSS-API C language bindings spec too πŸ“š. For callers to be portable across mechanisms and get the full security functionality each mechanism can offer, it is strongly recommended that they provide channel bindings consistent with these conventions and with those of the networking environment they run in πŸ‘‘.


1.2: GSS-API Features and Issues ✨

This section covers aspects of GSS-API operations, the security services the GSS-API provides, and some commentary on design issues 🧚.

1.2.1: Status Reporting and Optional Service Support πŸ“

1.2.1.1: Status Reporting πŸ“Š

Every GSS-API call gives back two status return values. Major_status values give a mechanism-independent view of how the call went (like GSS_S_COMPLETE, GSS_S_FAILURE, or GSS_S_CONTINUE_NEEDED), which is enough for the caller to drive normal control flow in a generic way. Table 1 lists all the defined major_status return codes πŸ’–.

The sequencing-related informatory major_status codes (GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, and GSS_S_GAP_TOKEN) can show up together with either GSS_S_COMPLETE or GSS_S_FAILURE for GSS-API per-message calls. For context establishment calls it's different: these sequencing codes only come with GSS_S_FAILURE, never with GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED. So if they pop up during the context establishment phase, they always mean a fatal failure πŸ’€.

Table 1: GSS-API Major Status Codes

FATAL ERROR CODES

GSS_S_BAD_BINDINGS            channel binding mismatch
GSS_S_BAD_MECH                unsupported mechanism requested
GSS_S_BAD_NAME                invalid name provided
GSS_S_BAD_NAMETYPE            name of unsupported type provided
GSS_S_BAD_STATUS              invalid input status selector
GSS_S_BAD_SIG                 token had invalid integrity check
GSS_S_BAD_MIC                   preferred alias for GSS_S_BAD_SIG
GSS_S_CONTEXT_EXPIRED         specified security context expired
GSS_S_CREDENTIALS_EXPIRED     expired credentials detected
GSS_S_DEFECTIVE_CREDENTIAL    defective credential detected
GSS_S_DEFECTIVE_TOKEN         defective token detected
GSS_S_FAILURE                 failure, unspecified at GSS-API
                                level
GSS_S_NO_CONTEXT              no valid security context specified
GSS_S_NO_CRED                 no valid credentials provided
GSS_S_BAD_QOP                 unsupported QOP value
GSS_S_UNAUTHORIZED            operation unauthorized
GSS_S_UNAVAILABLE             operation unavailable
GSS_S_DUPLICATE_ELEMENT       duplicate credential element requested
GSS_S_NAME_NOT_MN             name contains multi-mechanism elements

INFORMATORY STATUS CODES

GSS_S_COMPLETE                normal completion
GSS_S_CONTINUE_NEEDED         continuation call to routine
                               required
GSS_S_DUPLICATE_TOKEN         duplicate per-message token
                               detected
GSS_S_OLD_TOKEN               timed-out per-message token
                               detected
GSS_S_UNSEQ_TOKEN             reordered (early) per-message token
                               detected
GSS_S_GAP_TOKEN               skipped predecessor token(s)
                               detected

Minor_status gives more detailed status information, which may include status codes specific to the underlying security mechanism πŸ”§. Minor_status values are not specified in this document.

GSS_S_CONTINUE_NEEDED major_status returns, along with optional message outputs, come back from GSS_Init_sec_context() and GSS_Accept_sec_context(). This means different mechanisms can use different numbers of messages in their authentication sequences without needing separate code paths in the calling application 🌈. Instead, those cases are handled with sequences of continuation calls to GSS_Init_sec_context() and GSS_Accept_sec_context(). The same facility is used to fold mutual authentication into the GSS-API's context initiation calls.

For mech_types that need to interact with third-party servers in order to establish a security context, the GSS-API context establishment calls may block until those third-party interactions finish. On the other hand, no GSS-API calls wait on serialized interactions with GSS-API peer entities. So local status returns can't reflect unpredictable or asynchronous exceptions happening at remote peers, and passing that information along is a caller responsibility outside the GSS-API 🫢.

1.2.1.2: Optional Service Support πŸŽ€

A context initiator can request various optional services at context establishment time. Each one gets requested by setting a flag in the req_flags input parameter to GSS_Init_sec_context() πŸ¦‹.

The optional services currently defined are:

  • Delegation - The (usually temporary) transfer of rights from initiator to acceptor, enabling the acceptor to authenticate itself as an agent of the initiator 🧳.
  • Mutual Authentication - In addition to the initiator authenticating its identity to the context acceptor, the context acceptor should also authenticate itself to the initiator 🀝.
  • Replay detection - In addition to providing message integrity services, GSS_GetMIC() and GSS_Wrap() should include message numbering information to enable GSS_VerifyMIC() and GSS_Unwrap() to detect if a message has been duplicated πŸ”.
  • Out-of-sequence detection - In addition to providing message integrity services, GSS_GetMIC() and GSS_Wrap() should include message sequencing information to enable GSS_VerifyMIC() and GSS_Unwrap() to detect if a message has been received out of sequence πŸŒ€.
  • Anonymous authentication - The establishment of the security context should not reveal the initiator's identity to the context acceptor πŸ₯·.
  • Available per-message confidentiality - Requests that per-message confidentiality services be available on the context πŸ”’.
  • Available per-message integrity - Requests that per-message integrity services be available on the context πŸ›‘οΈ.

Any currently undefined bits within such flag arguments should be ignored by GSS-API implementations when presented by an application, and should be set to zero when returned to the application by the GSS-API implementation 🧸.

Some mechanisms may not support all optional services, and some mechanisms may only support some services in conjunction with others. Both GSS_Init_sec_context() and GSS_Accept_sec_context() tell the applications which services will be available from the context once the establishment phase is complete, via the ret_flags output parameter πŸ”. In general, if the security mechanism is capable of providing a requested service, it should do so, even if additional services must be enabled in order to provide the requested service. If the mechanism is incapable of providing a requested service, it should proceed without the service, leaving the application to abort the context establishment process if it considers the requested service to be mandatory πŸ‘‘.

Some mechanisms may specify that support for some services is optional, and that implementors of the mechanism need not provide it. This is most commonly true of the confidentiality service, often because of legal restrictions on the use of data-encryption, but it may apply to any of the services 🌸. Such mechanisms are required to send at least one token from acceptor to initiator during context establishment when the initiator indicates a desire to use such a service. That way the initiating GSS-API can correctly indicate whether the service is supported by the acceptor's GSS-API πŸ’œ.

1.2.2: Per-Message Security Service Availability πŸ¦‹

okay so when a context gets established, you get back two flags that tell you which per-message protection services are actually on the table πŸ’…

  • integ_avail tells you whether per-message integrity and data origin authentication services are available πŸ”
  • conf_avail tells you whether per-message confidentiality services are available. It will never be TRUE unless integ_avail is also TRUE, so no exceptions bestie πŸ™…β€β™€οΈ

GSS-API callers who want per-message security services should check these flags when the context is set up. They must be aware that if integ_avail comes back FALSE, then calling GSS_GetMIC() or GSS_Wrap() on that context will apply no cryptographic protection to user data messages. That's a big deal, so don't skip it 😭

The per-message integrity and data origin authentication services give the receiving caller assurance that the message was protected by the caller's peer on the security context, which is the entity named at context initiation 🫢. The per-message confidentiality service gives the sending caller assurance that the message's content is protected from access by anyone other than the context's named peer πŸ”’βœ¨

The per-message protection primitives are, as the name says, built for protocol data units πŸŽ€. They do the crypto on those data units, carry the control info in tokens, and in the case of GSS_Wrap() they wrap up the protected data unit into a package. So these primitives aren't a great fit for efficient protection in stream-paradigm protocols like Telnet, at least not if the crypto has to happen octet by octet πŸ™ˆ

1.2.3: Per-Message Replay Detection and Sequencing πŸ”

Some underlying mech_types can detect replays and/or sequence the messages sent on the contexts they support 🧚 These are optional protection features, and they're separate from the replay and sequencing features used during the context establishment itself. Whether the context-level ones exist is totally up to the underlying mech_type's capabilities. The caller doesn't pick or skip them.

The initiating caller passes replay_det_req_flag and sequence_req_flag to say whether they want per-message replay detection and sequencing on the new context. The initiator's GSS-API implementation can figure out whether these features are supported (and whether they're optional) based on the chosen mechanism, so there's no need to negotiate with the target first πŸ’… Once they're on, recipients get indicators from GSS-API processing telling them whether a message looks like a duplicate or came out of sequence. Spotting a suspect message doesn't stop it from reaching the recipient. What to do about it is up to the caller's policy πŸ’–

Here's what those features mean across the GSS-API interface for clients:

When replay_det_state is TRUE, these are the possible major_status returns for well-formed and correctly signed messages:

  1. GSS_S_COMPLETE, with no GSS_S_DUPLICATE_TOKEN or GSS_S_OLD_TOKEN showing up alongside it, means the message was inside the window (of time or sequence space) where replays can be detected, and it wasn't a replay of a message already processed in that window βœ…
  2. GSS_S_DUPLICATE_TOKEN means the cryptographic checkvalue on the message was correct, but it's been recognised as a duplicate of a message that was already processed. This can flag duplicated tokens from the context's peer, and it can also catch reflected copies of tokens the local side generated. Mechanism designers are encouraged to build ways into their protocols to detect and report these tokens πŸͺž
  3. GSS_S_OLD_TOKEN means the cryptographic checkvalue was correct, but the message is too old to check for duplication πŸ•°οΈ

When sequence_state is TRUE, these are the possible major_status returns for well-formed and correctly signed messages:

  1. GSS_S_COMPLETE, with no GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, or GSS_S_GAP_TOKEN alongside it, means the message was inside the window (of time or sequence space) where replays can be detected, it wasn't a replay of a message already processed in that window, and no earlier sequenced messages are missing compared to the last received message (if there is one) that was processed on the context with a correct cryptographic checkvalue 🎯
  2. GSS_S_DUPLICATE_TOKEN means the integrity check value was correct, but the message was recognised as a duplicate of one already processed. Same deal as above: this covers duplicates from the peer and reflected copies of local tokens, and mechanism designers are encouraged to build ways to detect and report those πŸ”
  3. GSS_S_OLD_TOKEN means the integrity check value was correct, but the token is too old to check for duplication πŸ•°οΈ
  4. GSS_S_UNSEQ_TOKEN means the cryptographic checkvalue was correct, but the message comes earlier in a sequenced stream than one already processed on the context πŸŒ€ [Note: Some mechanisms can be designed to give a stricter sequencing service, where particular messages only get delivered to recipients after all their predecessors in an ordered stream have been delivered. That doesn't really fit the GSS-API model, where recipients get every message whether it's in order or not and hand them over one at a time, without any buffering inside GSS-API, for validation by GSS-API routines. GSS-API has helper functions that let clients reach strict message stream integrity efficiently alongside the sequencing built into their communication protocols, but the GSS-API doesn't offer that level of stream integrity by itself 🧩]
  5. GSS_S_GAP_TOKEN means the cryptographic checkvalue was correct, but one or more earlier sequenced messages haven't been successfully processed yet, compared to the last received message (if there is one) that was processed on the context with a correct cryptographic checkvalue πŸ•³οΈ

These message stream integrity features (especially sequencing) can mess with certain applications' intended communication style, and they take a lot of resources. So it's highly recommended that mech_types supporting them let them be turned on selectively when the initiator asks for it at context establishment πŸ™ The initiator and target each get a matching indicator (replay_det_state and sequence_state) that tells them whether these features are active on the context πŸ’œ

Here's an example of how a mech_type that supports per-message replay detection could do it when replay_det_state is TRUE. The underlying mechanism adds timestamps to the data elements output by GSS_GetMIC() and GSS_Wrap(). It also keeps a time-limited cache, qualified by originator-recipient pair, of the data elements that were processed by GSS_VerifyMIC() and GSS_Unwrap(). When this is active, GSS_VerifyMIC() or GSS_Unwrap() returns the exception statuses GSS_S_DUPLICATE_TOKEN or GSS_S_OLD_TOKEN when they get a message that's either a detected duplicate of a prior message or too old to validate against the cache of recently received messages 🌸

1.2.4: Quality of Protection πŸ’Ž

Some mech_types give users really fine-grained control over how per-message protection gets done πŸŽ›οΈ That lets callers trade off security processing overhead on the fly against what each particular message needs. A per-message quality-of-protection parameter (kind of like quality-of-service, or QOS) picks one of the different QOP options that the mechanism supports. When the context is established for a multi-QOP mech_type, the context-level data supplies what's needed for the range of protection qualities 🌈

Most callers won't want to pick mechanism-specific QOP settings themselves, so they'll usually ask for the default QOP ✨ The definitions of the non-default QOP values, and how to choose between them, are mechanism-specific. You can't assume any ordering of QOP values carries over between mechanisms. Using non-default QOP values well means knowing the QOP definitions of the underlying mechanism (or mechanisms), which makes it non-portable πŸ™ƒ The GSS_S_BAD_QOP major_status value exists to say that a provided QOP value isn't supported for a security context, most likely because the underlying mechanism doesn't recognise it 🚫

For interoperability's sake, mechanisms that allow optional support for particular QOP values shall satisfy one of the following conditions. Either:

  • (i) All implementations of the mechanism are required to be capable of processing messages protected using any QOP value, whether or not they can apply protection matching that QOP, or
  • (ii) The set of mutually-supported receiver QOP values must be determined during context establishment, and messages may be protected by either peer using only QOP values from that mutually-supported set 🀝

NOTE: (i) is just a special case of (ii), where implementations are required to support every QOP value on receipt πŸ’€

1.2.5: Anonymity Support πŸ¦‹

okay so sometimes an app wants to check that the other side is legit (authenticate a peer) and/or lock down its messages with the per-message services, but it doesn't want to tell anyone who it is 🫣 like, picture a research database that lets literally any requestor ask queries. a client might want to verify the service so it can trust what comes back, but it might not want to reveal its identity to the service for privacy reasons. valid, bestie πŸ”’

in normal GSS-API life, the context initiator's identity gets handed to the context acceptor during context establishment. so to make anonymity a thing, there's a facility (the input anon_req_flag to GSS_Init_sec_context()) where initiators can ask for their identity to be kept from the context acceptor. mechanisms are not required to honor this request, BUT the caller always gets told (through the returned anon_state indicator from GSS_Init_sec_context()) whether or not it was honored. also, being authenticated as the anonymous principal does not necessarily mean you can skip credentials when establishing a context πŸ’…

Section 4.5 of this document defines the Object Identifier value used to identify an anonymous principal ✨

there are four possible combinations of anon_state and mutual_state, and here's what each one means πŸ‘‘

  • anon_state == FALSE, mutual_state == FALSE: initiator authenticated to target.
  • anon_state == FALSE, mutual_state == TRUE: initiator authenticated to target, target authenticated to initiator.
  • anon_state == TRUE, mutual_state == FALSE: initiator authenticated as anonymous principal to target.
  • anon_state == TRUE, mutual_state == TRUE: initiator authenticated as anonymous principal to target, target authenticated to initiator.

1.2.6: Initialization 🌸

no init calls exist in GSS-API. nothing you have to call before using the other stuff πŸ™Œ (i.e., no calls that must be invoked before the other facilities in the interface). the fun implication is that GSS-API implementations must themselves be self-initializing. they've gotta handle their own setup, no babysitting required ✨

1.2.7: Per-Message Protection During Context Establishment 🧚

okay this one is so clever 😭 GSS-V2 has a facility that lets you protect and buffer data messages for later transfer while a security context is still in GSS_S_CONTINUE_NEEDED status. it's for when the caller already has the session key it needs to do this. the new bit is a state Boolean called prot_ready_state, and it's added to the info returned by GSS_Init_sec_context(), GSS_Accept_sec_context(), and GSS_Inquire_context().

for context establishment calls, this state Boolean is valid and interpretable when the associated major_status is either GSS_S_CONTINUE_NEEDED or GSS_S_COMPLETE. callers (both initiators and acceptors) can assume per-message protection (via GSS_Wrap(), GSS_Unwrap(), GSS_GetMIC(), and GSS_VerifyMIC()) is available and ready to use if either prot_ready_state == TRUE or major_status == GSS_S_COMPLETE. BUT mutual authentication (if requested) can't be guaranteed until GSS_S_COMPLETE gets returned 🫠 if you use per-message protection before GSS_S_COMPLETE, be aware that a later context establishment step might fail, and certain context data (e.g., mech_type) returned by later calls may change. it's giving "proceed with caution" 🚧

this approach gives full, transparent backward compatibility for GSS-API V1 callers. they don't even need to know prot_ready_state exists, and they'll get the expected behavior from GSS_S_COMPLETE. they just won't be able to use per-message protection before GSS_S_COMPLETE is returned.

it is not a requirement that GSS-V2 mechanisms ever return TRUE prot_ready_state before context establishment finishes (some mechanisms won't evolve usable message protection keys, especially at the context acceptor, until establishment is complete). it's expected but not required that GSS-V2 mechanisms return TRUE prot_ready_state upon completion of context establishment if they support per-message protection at all. however, GSS-V2 applications should not assume that TRUE prot_ready_state will always come back together with the GSS_S_COMPLETE major_status, since GSS-V2 implementations may keep supporting GSS-V1 mechanism code, which will never return TRUE prot_ready_state πŸ™ˆ

when prot_ready_state is returned TRUE, mechanisms shall also set the context service indicator flags (deleg_state, mutual_state, replay_det_state, sequence_state, anon_state, trans_state, conf_avail, integ_avail) that represent facilities confirmed, at that time, to be available on the context being established. if prot_ready_state comes back before GSS_S_COMPLETE, more facilities may get confirmed and indicated later, when GSS_S_COMPLETE is returned πŸ“

1.2.8: Implementation Robustness πŸ’–

this section recommends some implementation behavior for overall robustness. it's like the good manners section πŸŽ€

invocation of GSS-API calls is to incur no undocumented side effects visible at the GSS-API level. no sneaky stuff 🀫

if a token is presented for processing on a GSS-API security context and that token causes a fatal error in processing, or is otherwise determined to be invalid for that context, the context's state should not be disrupted for purposes of processing subsequent valid tokens. one bad token shouldn't wreck the whole vibe πŸ’…

certain local conditions at a GSS-API implementation (e.g., unavailability of memory) may temporarily or permanently preclude successfully processing tokens on a GSS-API security context. this typically generates GSS_S_FAILURE major_status returns along with locally-significant minor_status. for robust operation under these conditions, the following recommendations are made:

  • failing calls should free any memory they allocate, so callers can retry without causing further loss of resources.
  • failure of an individual call on an established context should not preclude subsequent calls from succeeding on the same context.
  • whenever possible, it should be possible for GSS_Delete_sec_context() calls to be successfully processed even if other calls cannot succeed, thereby enabling context-related resources to be released.

a failure of GSS_GetMIC() or GSS_Wrap() due to an attempt to use an unsupported QOP will not interfere with context validity. such a failure shall not impact the application's ability to later invoke GSS_GetMIC() or GSS_Wrap() using a supported QOP. any state information about sequencing of outgoing messages shall be unchanged by an unsuccessful call of GSS_GetMIC() or GSS_Wrap() 🧠✨

1.2.9: Delegation 🌈

the GSS-API lets the initiating application control delegation with a Boolean parameter to GSS_Init_sec_context(), the routine that establishes a security context. some mechanisms don't support delegation, and for those, attempts by an app to enable delegation get ignored πŸ€·β€β™€οΈ

the acceptor of a security context where the initiator enabled delegation gets a credential handle (via the delegated_cred_handle parameter of GSS_Accept_sec_context()) that contains the delegated identity. that handle can be used to start later GSS-API security contexts as an agent or delegate of the initiator. so if the original initiator's identity is "A" and the delegate's identity is "B", then depending on the underlying mechanism, the identity in the delegated credential may be either "A" or "B acting for A" πŸ‘‘

for many mechanisms that support delegation, a simple Boolean isn't enough control. other examples of delegation control a mechanism might offer an app are how long delegation lasts, which network addresses delegation is valid from, and what tasks a delegate may perform. those controls are currently outside the scope of the GSS-API. GSS-API implementations supporting mechanisms with extra controls should provide extension routines so those controls can be exercised (maybe by changing the initiator's GSS-API credential before it's used to establish a context) πŸ› οΈ

BUT the simple delegation control in GSS-API should always be able to override other mechanism-specific delegation controls. if the app tells GSS_Init_sec_context() that delegation is not desired, the implementation must not permit delegation to occur. this is an exception to the general rule that a mechanism may enable services even if they weren't requested. delegation may only be provided at the explicit request of the application 🚫

1.2.10: Interprocess Context Transfer πŸ¦‹

GSS-API V2 provides routines (GSS_Export_sec_context() and GSS_Import_sec_context()) that let a security context get transferred between processes on a single machine. the most common use is a client-server design where the server is a single process that accepts incoming security contexts, then launches child processes to handle the data on those contexts. in that setup, the child processes need access to the security context data structure the parent made with its call to GSS_Accept_sec_context(), so they can use per-message protection services and delete the context when the communication session ends πŸ’œ

since the security context data structure is expected to contain sequencing information, sharing a context between processes is generally impractical πŸ˜… so GSS-API gives you GSS_Export_sec_context(). the process that currently owns the context can call it to declare it has no intention of using the context anymore, and to create an inter-process token with the info the adopting process needs to import the context successfully. after that call succeeds, the original security context becomes inaccessible to the calling process via GSS-API, and any context handles referring to it are no longer valid. the originating process passes the inter-process token to the adopting process, which hands it to GSS_Import_sec_context(), and a fresh context handle gets created that is functionally identical to the original context ✨

the inter-process token may contain sensitive data from the original security context, including cryptographic keys. apps using inter-process tokens to transfer security contexts must take appropriate steps to protect these tokens in transit πŸ” implementations are not required to support interprocess transfer of security contexts. the ability to transfer a context is indicated when the context is created: GSS_Init_sec_context() or GSS_Accept_sec_context() returns a TRUE trans_state value to signal it πŸŽ€

2. Interface Descriptions ✨

okay so this section is the big map of the whole GSS-API πŸ—ΊοΈ it sorts every call into four groups. Credential management calls handle getting and letting go of credentials. Context-level calls set up and manage security contexts between principals 🀝. Per-message calls protect individual messages once a context exists πŸ’Œ. Support calls are the helpful extras that callers reach for along the way 🧰. Table 2 lays out all of them at a glance, so you can see the whole squad in one place πŸ’…

Table 2: GSS-API Calls

CREDENTIAL MANAGEMENT

GSS_Acquire_cred             acquire credentials for use
GSS_Release_cred             release credentials after use
GSS_Inquire_cred             display information about
                             credentials

GSS_Add_cred                 construct credentials incrementally
GSS_Inquire_cred_by_mech     display per-mechanism credential
                               information

CONTEXT-LEVEL CALLS

GSS_Init_sec_context         initiate outbound security context
GSS_Accept_sec_context       accept inbound security context
GSS_Delete_sec_context       flush context when no longer needed
GSS_Process_context_token    process received control token on
                               context
GSS_Context_time             indicate validity time remaining on
                                  context
GSS_Inquire_context          display information about context
GSS_Wrap_size_limit          determine GSS_Wrap token size limit
GSS_Export_sec_context       transfer context to other process
GSS_Import_sec_context       import transferred context

PER-MESSAGE CALLS

GSS_GetMIC                   apply integrity check, receive as
                               token separate from message
GSS_VerifyMIC                validate integrity check token
                               along with message
GSS_Wrap                     sign, optionally encrypt,
                             encapsulate
GSS_Unwrap                   decapsulate, decrypt if needed,
                             validate integrity check

SUPPORT CALLS

GSS_Display_status           translate status codes to printable
                               form
GSS_Indicate_mechs           indicate mech_types supported on
                               local system
GSS_Compare_name             compare two names for equality
GSS_Display_name             translate name to printable form
GSS_Import_name              convert printable name to
                             normalized form
GSS_Release_name             free storage of normalized-form
                             name
GSS_Release_buffer           free storage of general GSS-allocated
                               object
GSS_Release_OID_set          free storage of OID set object
GSS_Create_empty_OID_set     create empty OID set
GSS_Add_OID_set_member       add member to OID set
GSS_Test_OID_set_member      test if OID is member of OID set
GSS_Inquire_names_for_mech   indicate name types supported by

                               mechanism
GSS_Inquire_mechs_for_name   indicates mechanisms supporting name
                               type
GSS_Canonicalize_name        translate name to per-mechanism form
GSS_Export_name              externalize per-mechanism name
GSS_Duplicate_name           duplicate name object

2.1: Credential management calls πŸŽ€

these GSS-API calls are all about managing credentials πŸ”‘ whether a call can block while it waits on other network entities (think directories or authentication servers) depends partly on OS-specific, extra-GSS-API stuff, so this document doesn't pin that down ✨

GSS_Acquire_cred() exists so applications stay portable, and it's especially built for portable server applications πŸ–₯️ it's acknowledged that interactive users and server processes can be handled differently on some systems and mechanisms. When that happens, it's the GSS-API implementation's job to tell them apart, and how it does that is a local matter πŸ™ˆ GSS_Release_cred() lets callers tell the GSS-API they no longer need a credentials structure. GSS_Inquire_cred() lets callers ask what's inside a credentials structure πŸ‘€ GSS_Add_cred() lets callers tack more elements onto an existing structure, so you can build a multi-mechanism credential bit by bit 🧩 and GSS_Inquire_cred_by_mech() pulls out per-mechanism info about a credentials structure πŸ’œ

2.1.1: GSS_Acquire_cred call πŸ”₯

Inputs:

o  desired_name INTERNAL NAME, -- NULL requests locally-determined
   -- default

o  lifetime_req INTEGER, -- in seconds; 0 requests default

o  desired_mechs SET OF OBJECT IDENTIFIER, -- NULL requests
   -- system-selected default

o  cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
   -- 2=ACCEPT-ONLY

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  output_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
   -- caller must release with GSS_Release_cred()

o  actual_mechs SET OF OBJECT IDENTIFIER, -- if returned non-NULL,
   -- caller must release with GSS_Release_oid_set()

o  lifetime_rec INTEGER -- in seconds, or reserved value for
   -- INDEFINITE

Return major_status codes:

  • GSS_S_COMPLETE 🌸 means the credentials you asked for were successfully established, and they're good for the duration in lifetime_rec πŸ’– they work for the usage you requested in cred_usage 🎯 and for the set of mech_types listed in actual_mechs ✨ You can reference them later using the handle in output_cred_handle.
  • GSS_S_BAD_MECH πŸ’€ means you asked for a mech_type that this GSS-API implementation doesn't support, so the credential establishment failed.
  • GSS_S_BAD_NAMETYPE πŸ™ˆ means the desired_name you gave is either unreadable or of a name type the underlying mechanism(s) don't support. So no credentials could be made for that desired_name.
  • GSS_S_BAD_NAME 😭 means the desired_name is inconsistent with its own internal type info. Again, no credentials could be established for it.
  • GSS_S_CREDENTIALS_EXPIRED ⏰ means the underlying credential elements for the requested desired_name have expired, so the credentials you wanted couldn't be established.
  • GSS_S_NO_CRED 🚫 means no credential elements matching the requested desired_name and usage could be accessed, so the credentials couldn't be established. This status is the one to return for temporary, user-fixable problems that block credential establishment, and also when the caller isn't authorized to establish and use credentials for the identity named in the input desired_name argument.
  • GSS_S_FAILURE πŸ₯² means credential establishment failed for reasons the GSS-API doesn't specify.

GSS_Acquire_cred() is how a principal gets credentials, so it can (depending on the input cred_usage) initiate and/or accept security contexts under the identity in the desired_name input πŸͺͺ Once it succeeds, the output_cred_handle it returns is your handle for every later reference to those credentials 🎟️ Usually, single-user client processes that just want the default credential behavior for context establishment won't need to call this at all πŸ’β€β™€οΈ

A caller can pass NULL (GSS_C_NO_NAME) as desired_name. That gets interpreted as asking for a credential handle that will invoke default behavior when handed to GSS_Init_sec_context(), if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or to GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or GSS_C_BOTH. It's possible that several pre-established credentials exist for the same principal identity (say, from multiple user login sessions) when GSS_Acquire_cred() gets called πŸ‘― How a specific credential gets picked in those cases is a local matter. The input lifetime_req argument might give local GSS-API implementations useful hints for choosing in a way that best matches what the caller actually meant 🧠

This routine is mostly expected to be used by context acceptors 🫢 That's because implementations will probably offer mechanism-specific ways to get GSS-API initiator credentials from the system login process. So some implementations may not support acquiring GSS_C_INITIATE or GSS_C_BOTH credentials through GSS_Acquire_cred() for any name except GSS_C_NO_NAME. The exceptions are a name you get by applying GSS_Inquire_context() to an active context, or a name you get by applying GSS_Inquire_cred() to a credential handle that corresponds to default behavior. Heads up, though πŸ‘€ the explicit name you get from resolving a default reference can change over time, for example because of local credential element management happening outside the GSS-API. Once it's resolved, that explicit name stays constant ✨

The lifetime_rec result tells you how long the acquired credentials will be valid, as an offset from the present ⏳ A mechanism may return a reserved value meaning INDEFINITE if it doesn't impose any constraints on credential lifetime ♾️ A caller of GSS_Acquire_cred() can ask for a validity period starting from now (via the lifetime_req argument), or can ask for credentials with a default validity interval. (Postdated credentials aren't supported within the GSS-API, sorry bestie πŸ™…β€β™€οΈ) Some mechanisms and implementations may lock in credential validity period specifiers before GSS_Acquire_cred() is even invoked, for example during user login procedures. Because of that, callers asking for non-default lifetime_req values have to accept that those requests can't always be honored. They also have to be ready to use returned credentials with different lifetimes than they asked for, as shown in lifetime_rec 🫠

The caller of GSS_Acquire_cred() can explicitly name a set of mech_types to include in the returned credentials (through the desired_mechs argument), or can ask for credentials covering a system-defined default set of mech_types 🌈 Using the system-specified default set is recommended for the sake of application portability πŸ’– Afterward, the caller can look at the actual_mechs return value to figure out which mechanisms the returned credentials can be used with πŸ”

2.1.2: GSS_Release_cred call πŸ’…

Input:

  • cred_handle CREDENTIAL HANDLE: if GSS_C_NO_CREDENTIAL is specified, the call completes successfully but does nothing, so no credential elements get released 🫢

Outputs:

  • major_status INTEGER
  • minor_status INTEGER

Return major_status codes:

  • GSS_S_COMPLETE means the credentials referenced by the input cred_handle were released, so the caller can't access them going forward. What happens to other processes that are allowed shared access to those credentials is up to the local system 🌸
  • GSS_S_NO_CRED means no release happened. Either the input cred_handle wasn't valid, or the caller isn't authorized to access the credentials it points to πŸ™ˆ
  • GSS_S_FAILURE means the release failed for a reason that GSS-API doesn't spell out πŸ’€

This is the way a caller explicitly asks for credentials to be released once it doesn't need them anymore. System-level credential management also probably exists, though. That's how credentials shared between processes get cleaned up once every affected process has ended, even if nobody sent an explicit release request ✨ Also, multiple callers can be authorized to use the same credentials. So calling GSS_Release_cred() can't be counted on to delete a particular set of credentials across the whole system. Be careful with that one, bestie πŸ¦‹


2.1.3: GSS_Inquire_cred call πŸ”

Input:

  • cred_handle CREDENTIAL HANDLE: if GSS_C_NO_CREDENTIAL is specified, the default initiator credentials get queried 🧚

Outputs:

  • major_status INTEGER
  • minor_status INTEGER
  • cred_name INTERNAL NAME: the caller must release this with GSS_Release_name()
  • lifetime_rec INTEGER: in seconds, or a reserved value for INDEFINITE
  • cred_usage INTEGER: 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 2=ACCEPT-ONLY
  • mech_set SET OF OBJECT IDENTIFIER: the caller must release this with GSS_Release_oid_set()

Return major_status codes:

  • GSS_S_COMPLETE means the credentials referenced by the input cred_handle were valid. The output cred_name, lifetime_rec, and cred_usage values show the credentials' principal name, remaining lifetime, usable modes, and supported mechanism types πŸ’–
  • GSS_S_NO_CRED means no information could be returned about the referenced credentials. Either the input cred_handle was invalid, or the caller isn't authorized to access those credentials 😭
  • GSS_S_DEFECTIVE_CREDENTIAL means the referenced credentials are invalid πŸ₯€
  • GSS_S_CREDENTIALS_EXPIRED means the referenced credentials have expired ⏰
  • GSS_S_FAILURE means the operation failed for a reason GSS-API doesn't spell out πŸ’€

GSS_Inquire_cred() is mainly for callers who use default credential behavior, instead of getting credentials explicitly with GSS_Acquire_cred(). It lets you figure out a credential structure's principal name, how much validity time is left, whether it can be used to start or accept a security context (or both), and which mechanisms it supports. Very useful, honestly πŸŽ€

For a multi-mechanism credential, the lifetime value that comes back is the shortest lifetime of any mechanism element in the credential, whether that's for starting or accepting a context πŸ•°οΈ

GSS_Inquire_cred() should return INITIATE-AND-ACCEPT for cred_usage if both of these conditions hold:

  1. The credential contains an element that allows context initiation using some mechanism.
  2. The credential contains an element that allows context acceptance using some mechanism. This can be one of the same mechanisms that qualified for condition (1), but it doesn't have to be.

If condition (1) holds but not condition (2), GSS_Inquire_cred() should return INITIATE-ONLY for cred_usage. If condition (2) holds but not condition (1), it should return ACCEPT-ONLY for cred_usage. The logic is very clean, bestie πŸ‘‘

If you need finer detail on which lifetime, usage mode, and mechanism combinations are available, call the GSS_Inquire_cred_by_mech() routine. Pass it one of the mech OIDs that GSS_Inquire_cred() returned 🧠


2.1.4: GSS_Add_cred call βž•

Inputs:

  • input_cred_handle CREDENTIAL HANDLE: a handle to a credential structure that was created by a previous GSS_Acquire_cred() or GSS_Add_cred() call. See the text below for how it behaves when GSS_C_NO_CREDENTIAL is provided 🌈
  • desired_name INTERNAL NAME
  • initiator_time_req INTEGER: in seconds. 0 requests the default
  • acceptor_time_req INTEGER: in seconds. 0 requests the default
  • desired_mech OBJECT IDENTIFIER
  • cred_usage INTEGER: 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 2=ACCEPT-ONLY

Outputs:

  • major_status INTEGER
  • minor_status INTEGER
  • output_cred_handle CREDENTIAL HANDLE: NULL requests that credential elements be added "in place" to the credential structure identified by input_cred_handle. A non-NULL pointer requests that a new credential structure and handle be created. If a credential handle is returned, the caller must release it with GSS_Release_cred()
  • actual_mechs SET OF OBJECT IDENTIFIER: if returned, the caller must release it with GSS_Release_oid_set()
  • initiator_time_rec INTEGER: in seconds, or a reserved value for INDEFINITE
  • acceptor_time_rec INTEGER: in seconds, or a reserved value for INDEFINITE
  • cred_usage INTEGER: 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 2=ACCEPT-ONLY
  • mech_set SET OF OBJECT IDENTIFIER: the full set of mechanisms supported by the resulting credential

Return major_status codes:

  • GSS_S_COMPLETE means the credentials referenced by the input input_cred_handle were valid. The resulting credential from GSS_Add_cred() is valid for the durations shown in initiator_time_rec and acceptor_time_rec, works for the usage requested in cred_usage, and works for the mechanisms listed in actual_mechs πŸŽ‰
  • GSS_S_DUPLICATE_ELEMENT means the input desired_mech named a mechanism that the referenced credential already has an element for, with overlapping cred_usage and validity time settings πŸ‘―
  • GSS_S_BAD_MECH means the input desired_mech named a mechanism the GSS-API implementation doesn't support, so GSS_Add_cred() failed 🚫
  • GSS_S_BAD_NAMETYPE means the provided desired_name can't be interpreted, or it's a type the underlying GSS-API mechanism(s) don't support. So GSS_Add_cred() couldn't be done for that name 🀷
  • GSS_S_BAD_NAME means the provided desired_name doesn't match its own internal type specifier information. So GSS_Add_cred() couldn't be done for that name πŸ™ƒ
  • GSS_S_NO_CRED means the input input_cred_handle pointed to invalid or inaccessible credentials. This status should come back for temporary, user-fixable problems that stop credential establishment, or when the caller isn't authorized to establish or use credentials for the requested identity πŸ”
  • GSS_S_CREDENTIALS_EXPIRED means the referenced credential elements have expired, so GSS_Add_cred() couldn't be done πŸ₯€
  • GSS_S_FAILURE means the operation failed for a reason GSS-API doesn't spell out πŸ’€

GSS_Add_cred() lets callers build up credentials one step at a time by adding credential elements in separate operations, one per mechanism. This is super helpful in multi-mechanism setups, since each iteration's major_status and minor_status values are visible on their own and can be read clearly for each mechanism πŸ’… A credential element is identified by the name of the principal it belongs to.

GSS-API implementations must impose a local access control policy on callers of this routine, so unauthorized callers can't acquire credential elements they aren't entitled to. This is a serious one, so don't skip it 🚨

This routine is not meant to be a "login to the network" function. A function like that would create new mechanism-specific authentication data, instead of just getting a GSS-API handle to existing data. If you need that kind of function, it should be defined in implementation-specific extension routines 🧩

If getting a credential takes a long time for a mechanism, the mechanism can choose to delay the actual acquisition until the credential is needed, for example by GSS_Init_sec_context() or GSS_Accept_sec_context(). Those decisions should stay invisible to the calling application. So a call to GSS_Inquire_cred() right after GSS_Acquire_cred() must return valid credential data, even if that means paying the cost of the deferred acquisition πŸ•°οΈ

If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL output_cred_handle must be supplied. When GSS_C_NO_CREDENTIAL is the input, GSS_Add_cred() creates the credential referenced by its output_cred_handle using default behavior. In other words, the call has the same effect as this sequence: the caller first calls GSS_Acquire_cred() with the same usage and passes GSS_C_NO_NAME as the desired_name parameter (which gets an explicit credential handle for default behavior). Then it passes that handle to GSS_Add_cred(), and finally calls GSS_Release_cred() on the handle that came from GSS_Acquire_cred() ✨

This routine is mostly for context acceptors. Implementations usually have their own mechanism-specific ways to get GSS-API initiator credentials from the system login process. So some implementations might not support getting GSS_C_INITIATE or GSS_C_BOTH credentials through GSS_Acquire_cred() for any name except GSS_C_NO_NAME. The same goes for a name that comes from GSS_Inquire_context() on an active context, or a name from GSS_Inquire_cred() run against a credential handle for default behavior. It's important to know that the explicit name you get by resolving a default reference can change over time. For example, local credential element management outside GSS-API could change it. Once it's resolved, though, that explicit name stays constant 🌸

A caller can pass NULL (GSS_C_NO_NAME) as desired_name. This means "give me a credential handle that uses default behavior" when it's passed to GSS_Init_sec_context() (if cred_usage is GSS_C_INITIATE or GSS_C_BOTH) or to GSS_Accept_sec_context() (if cred_usage is GSS_C_ACCEPT or GSS_C_BOTH) 🧁

The same input desired_name, or default reference, should be used on all GSS_Acquire_cred() and GSS_Add_cred() calls for a particular credential. Keep it consistent, bestie 🫢

2.1.5. GSS_Inquire_cred_by_mech call ✨

Inputs:

  • cred_handle CREDENTIAL HANDLE: if GSS_C_NO_CREDENTIAL is specified, default initiator credentials are queried
  • mech_type OBJECT IDENTIFIER: the specific mechanism for which credentials are being queried

Outputs:

  • major_status INTEGER
  • minor_status INTEGER
  • cred_name INTERNAL NAME: guaranteed to be MN; caller must release with GSS_Release_name()
  • lifetime_rec_initiate INTEGER: in seconds, or reserved value for INDEFINITE
  • lifetime_rec_accept INTEGER: in seconds, or reserved value for INDEFINITE
  • cred_usage INTEGER: 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 2=ACCEPT-ONLY

Return major_status codes:

  • GSS_S_COMPLETE πŸ’– means the credentials referenced by the input cred_handle argument were valid, the mechanism indicated by the input mech_type was represented with elements within those credentials, and the output cred_name, lifetime_rec_initiate, lifetime_rec_accept, and cred_usage values represent, respectively, the credentials' associated principal name, remaining lifetimes, and suitable usage modes.
  • GSS_S_NO_CRED means no information could be returned about the referenced credentials, either because the input cred_handle was invalid or because the caller lacks authorization to access the referenced credentials.
  • GSS_S_DEFECTIVE_CREDENTIAL means the referenced credentials are invalid. πŸ’€
  • GSS_S_CREDENTIALS_EXPIRED means the referenced credentials have expired. ⏰
  • GSS_S_BAD_MECH means the referenced credentials do not contain elements for the requested mechanism.
  • GSS_S_FAILURE means the operation failed for reasons unspecified at the GSS-API level.

Okay so GSS_Inquire_cred_by_mech() is the call that's giving multi-mechanism energy πŸ¦‹. Callers in environments with more than one mechanism can use it to pull specific info about which combos of lifetimes, usage modes, and mechanisms live inside a credential structure. The lifetime_rec_initiate result tells you how long the credential is good for context initiation, and the lifetime_rec_accept result tells you how long it's good for context acceptance. Iconic, honestly πŸ‘‘.


2.2. Context-level calls 🌸

This group of calls is all about establishing and managing security contexts between peers 🫢. A context's initiator calls GSS_Init_sec_context(), which generates a token that the caller passes along to the target. At the target, that token goes into GSS_Accept_sec_context(). Depending on the underlying mech_type and the options you pick, there may be more token exchanges during context establishment. Those extra rounds are handled by GSS_S_CONTINUE_NEEDED status returns from GSS_Init_sec_context() and GSS_Accept_sec_context(). πŸ”„

Either party to an established context can invoke GSS_Delete_sec_context() to flush the context info once it's no longer needed 🧹. GSS_Process_context_token() is used to process received tokens that carry context-level control information. GSS_Context_time() lets a caller figure out how long an established context will stay valid ⏳.

GSS_Inquire_context() returns status info describing the context's characteristics πŸ”. GSS_Wrap_size_limit() lets a caller find out the size of a token that a GSS_Wrap() operation will generate πŸ“. And GSS_Export_sec_context() and GSS_Import_sec_context() are the pair that transfers active contexts between processes on an end system 🧚.


2.2.1. GSS_Init_sec_context call πŸ’…

Inputs:

  • claimant_cred_handle CREDENTIAL HANDLE: NULL specifies "use default"
  • input_context_handle CONTEXT HANDLE: 0 (GSS_C_NO_CONTEXT) specifies "none assigned yet"
  • targ_name INTERNAL NAME
  • mech_type OBJECT IDENTIFIER: NULL parameter specifies "use default"
  • deleg_req_flag BOOLEAN
  • mutual_req_flag BOOLEAN
  • replay_det_req_flag BOOLEAN
  • sequence_req_flag BOOLEAN
  • anon_req_flag BOOLEAN
  • conf_req_flag BOOLEAN
  • integ_req_flag BOOLEAN
  • lifetime_req INTEGER: 0 specifies default lifetime
  • chan_bindings OCTET STRING
  • input_token OCTET STRING: NULL, or a token received from the target

Outputs:

  • major_status INTEGER
  • minor_status INTEGER
  • output_context_handle CONTEXT HANDLE: once returned non-NULL, caller must release with GSS_Delete_sec_context()
  • mech_type OBJECT IDENTIFIER: the actual mechanism is always indicated and never NULL; caller should treat it as read-only and should not attempt to release it
  • output_token OCTET STRING: NULL, or a token to pass to the context target; caller must release with GSS_Release_buffer()
  • deleg_state BOOLEAN
  • mutual_state BOOLEAN
  • replay_det_state BOOLEAN
  • sequence_state BOOLEAN
  • anon_state BOOLEAN
  • trans_state BOOLEAN
  • prot_ready_state BOOLEAN: see Section 1.2.7
  • conf_avail BOOLEAN
  • integ_avail BOOLEAN
  • lifetime_rec INTEGER: in seconds, or reserved value for INDEFINITE

This call may block while waiting on network interactions 🌐. That happens for mech_types where an authentication server or some other network entity has to be consulted on behalf of the context initiator, so that an output_token suitable for presenting to a specified target can be generated.

Return major_status codes:

  • GSS_S_COMPLETE πŸŽ‰ means context-level info was successfully initialized, and the returned output_token will give the target enough info to do per-message processing on the newly established context.
  • GSS_S_CONTINUE_NEEDED πŸ” means the control info in the returned output_token must be sent to the target, and a reply must be received and passed as the input_token argument to a continuation call to GSS_Init_sec_context(), before per-message processing can happen with this context (unless prot_ready_state is concurrently returned TRUE).
  • GSS_S_DEFECTIVE_TOKEN means the consistency checks on the input_token failed, so no further processing based on that token can happen.
  • GSS_S_DEFECTIVE_CREDENTIAL means the consistency checks on the credential structure referenced by claimant_cred_handle failed, so that credential structure can't be used for further processing.
  • GSS_S_BAD_SIG (GSS_S_BAD_MIC) means the received input_token has an incorrect integrity check, so context setup can't be completed.
  • GSS_S_NO_CRED means no context was established. This could be because the input cred_handle was invalid, because the referenced credentials are only valid for context acceptor use, because the caller lacks authorization to access the referenced credentials, or because the resolution of default credentials failed.
  • GSS_S_CREDENTIALS_EXPIRED means the credentials supplied through the input claimant_cred_handle argument are no longer valid, so context establishment can't be completed. ⏰
  • GSS_S_BAD_BINDINGS 🚨 means a mismatch was detected between the caller-provided chan_bindings and the ones extracted from the input_token. That's a security-relevant event, and it prevents context establishment. (This result will be returned by GSS_Init_sec_context() only for contexts where mutual_state is TRUE.)
  • GSS_S_OLD_TOKEN means the input_token is too old to be checked for integrity. This is a fatal error during context establishment. ☠️
  • GSS_S_DUPLICATE_TOKEN means the input token has a correct integrity check but is a duplicate of a token that was already processed. This is also a fatal error during context establishment. πŸ™ˆ
  • GSS_S_NO_CONTEXT means no valid context was recognized for the input context_handle provided. This major status is only returned for successor calls following GSS_S_CONTINUE_NEEDED status returns.
  • GSS_S_BAD_NAMETYPE means the provided targ_name is of a type that's uninterpretable or unsupported by the applicable underlying GSS-API mechanism(s), so context establishment can't be completed.
  • GSS_S_BAD_NAME means the provided targ_name is inconsistent in terms of its internally-incorporated type specifier information, so context establishment can't be done.
  • GSS_S_BAD_MECH means a context establishment token or a caller request specified a mechanism that's unsupported by the local system or by the caller's active credentials.
  • GSS_S_FAILURE means context setup couldn't be done for reasons unspecified at the GSS-API level, and no interface-defined recovery action is available.

This routine is used by a context initiator, and it ordinarily emits an output_token suitable for use by the target within the selected mech_type's protocol πŸ“¦. For a multi-step exchange, this output_token is one in a series, with each one generated by a successive call. Using info from the credentials structure referenced by claimant_cred_handle, GSS_Init_sec_context() initializes the data structures needed to establish a security context with the target targ_name 🧩.

The targ_name can be any valid INTERNAL NAME. It doesn't have to be an MN. Besides supporting other name types, it is recommended (newly as of GSS-V2, Update 1) that mechanisms be able to accept GSS_C_NO_NAME as an input type for targ_name 🌈. Even though it's recommended, that support isn't required, and it's recognized that not every mechanism can build tokens without explicitly naming the context target, even when mutual authentication of the target isn't obtained. If you want to use this facility and you care about portability, know that support for GSS_C_NO_NAME as an input targ_name type is unlikely to show up in mechanism definitions written before GSS-V2, Update 1 πŸ“.

The claimant_cred_handle must correspond to the same valid credentials structure on the initial call to GSS_Init_sec_context() and on any successor calls resulting from GSS_S_CONTINUE_NEEDED status returns πŸ”. Different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED facility need access to credentials at different points in the context establishment sequence.

The caller-provided input_context_handle argument is to be 0 (GSS_C_NO_CONTEXT), meaning "not yet assigned," on the first GSS_Init_sec_context() call for a given context 🌱. If the call succeeds (meaning it comes with major_status GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if it succeeds, the initial GSS_Init_sec_context() call returns a non-zero output_context_handle for use in future references to this context. Once a non-zero output_context_handle has been returned, GSS-API callers should call GSS_Delete_sec_context() to release context-related resources if errors happen in later phases of context establishment, or when an established context is no longer needed πŸ—‘οΈ. If GSS_Init_sec_context() is passed the handle of a context that's already fully established, GSS_S_FAILURE status is returned.

When continuation attempts to GSS_Init_sec_context() are needed to finish context establishment, the previously returned non-zero handle value goes into the input_context_handle argument, and it gets echoed back in the returned output_context_handle argument πŸ”. On those continuation attempts (and only on continuation attempts), the input_token value is used to carry the token returned from the context's target πŸ’œ.

Okay bestie, chan_bindings is the caller's way of tying the security context to the channel's security stuff, like addresses and crypto keys πŸ”βœ¨ For more on how to use it, check Section 1.1.6 of this document πŸ’–

input_token is how the target's message gets back to us πŸ“¨ It only matters on a GSS_Init_sec_context() call that comes right after a previous return of GSS_S_CONTINUE_NEEDED major_status πŸ”

Now, the caller is the one in charge of setting up the comms path to the target πŸ›€οΈ and sending along any returned output_token, no matter what the accompanying major_status says 🫢 BUT, and this is a lowkey genius move 🧠, the output_token can also hitch a ride with the first app message you hand to GSS_GetMIC() or GSS_Wrap() on an established context πŸ¦‹ (Heads up: if prot_ready_state comes back TRUE, you can actually send a protected message before context establishment is finished πŸŽ€ See also Section 1.2.7 πŸ’…)

The initiator can ask for extra context-level stuff with input flags 🌸 deleg_req_flag asks for delegation of access rights, mutual_req_flag asks for mutual authentication, replay_det_req_flag asks that replay detection get applied to messages on the context, and sequence_req_flag asks that sequencing be enforced πŸ”₯ (See Section 1.2.3 for the deets on replay detection and sequencing πŸ™ˆ) And anon_req_flag asks that the initiator's identity NOT get sent inside tokens to the acceptor πŸ•ΆοΈ

conf_req_flag and integ_req_flag are informatory inputs for the GSS-API implementation, telling it whether per-message confidentiality and per-message integrity services will be needed on the context 🧁 This matters for negotiating mechanisms ✨ BUT here's the tea β˜•: these flags are brand new in GSS-V2, so they create a backward incompatibility with GSS-V1 callers, who never had them to begin with πŸ’€ Since no GSS-V1 caller would set them, even if they want per-message services, GSS-V2 mech implementations that only turn those services on based on the flags' values might not give them to GSS-V1 contexts 😭 So in certain situations, it may be appropriate for those implementations to infer the flags as set when they know the caller is GSS-V1 🫠

Not every optional feature is available in every mech_type, so don't assume you're getting everything you asked for πŸ‘€

The return state values deleg_state, mutual_state, replay_det_state, and sequence_state tell you which features are actually active on the context, based on the mech_type's abilities and the initiator's input flags 🧚 And trans_state tells you if the context can be moved to other processes using GSS_Export_sec_context() 🚚 These indicators are undefined unless the major_status is GSS_S_COMPLETE, or prot_ready_state comes back TRUE alongside GSS_S_CONTINUE_NEEDED 🌈 In that second case, extra features that weren't confirmed yet might get confirmed and indicated when GSS_S_COMPLETE comes back later πŸ“

anon_state and prot_ready_state matter for both GSS_S_COMPLETE and GSS_S_CONTINUE_NEEDED returns from GSS_Init_sec_context() πŸ’œ When anon_state is TRUE, that means neither the current token nor any of its predecessors delivers, or has delivered, the initiator's identity πŸ™ˆ So if you only want to set up a context when anonymity is supported, only send a returned token to the peer if it comes with a TRUE anon_state πŸŽ€ When prot_ready_state is TRUE alongside GSS_S_CONTINUE_NEEDED, per-message protection operations can be applied on the context πŸ” Check Section 1.2.7 for more on that facility πŸ’–

Not getting the exact feature set you asked for does NOT make context establishment fail πŸ™…β€β™€οΈ It's the caller's call (literally their prerogative πŸ‘‘) to delete the context if the feature set isn't suitable for what they're doing πŸ—‘οΈ

The returned mech_type value tells you which specific mechanism got used on the context, and it will never be the value for "default" 🧩 A valid mech_type has to come back with a GSS_S_COMPLETE status return βœ… GSS-API implementations can also return mech_type with earlier GSS_S_CONTINUE_NEEDED calls or, if the mechanism can be figured out, with fatal error cases, but they aren't required to πŸ€·β€β™€οΈ For mechanisms that do their own negotiation, the returned mech_type might be a different OID from the one passed in the input mech_type argument, and it can change between successive GSS_S_CONTINUE_NEEDED calls and the final GSS_S_COMPLETE call πŸ¦‹ Main character plot twist, iykyk 😭

The conf_avail return value tells you whether the context supports per-message confidentiality services, so you know if your conf_req_flag request for encryption through GSS_Wrap() can actually be honored πŸ”’ Similarly, integ_avail tells you whether per-message integrity services are available, through either GSS_GetMIC() or GSS_Wrap(), on the established context 🧾 These are undefined unless the major_status is GSS_S_COMPLETE, or prot_ready_state comes back TRUE with GSS_S_CONTINUE_NEEDED 🌸

The lifetime_req input is your wish list for how long the context should last, as an upper bound πŸ•°οΈ Put 0 in there to ask for a default lifetime ✨ The lifetime_rec return value tells you how long the context will actually be valid, as an offset from now ⏳ It might not match what you asked for, since it depends on mechanism capabilities, credential lifetimes, and local policy 😬 If there are no constraints on context lifetime at all, it can come back as a reserved value that represents INDEFINITE lifetime_req ♾️ The lifetime_rec value is undefined unless the major_status is GSS_S_COMPLETE πŸ’…

Last but not least, if mutual_state is TRUE, that gets reflected in the output_token 🫢 A call to GSS_Accept_sec_context() at the target, on a context like this, returns a token. That token gets processed by a continuation call to GSS_Init_sec_context() to finish up mutual authentication πŸ”₯✨

2.2.2. GSS_Accept_sec_context call ✨

okay bestie, this is the acceptor side, the one that receives the handshake 🫢 It's giving the other half of the context dance, and it's literally iconic.

Inputs:

   o  acceptor_cred_handle CREDENTIAL HANDLE, -- NULL specifies
   -- "use default"

   o  input_context_handle CONTEXT HANDLE, -- 0
   -- (GSS_C_NO_CONTEXT) specifies "not yet assigned"

   o  chan_bindings OCTET STRING,

   o  input_token OCTET STRING

Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  src_name INTERNAL NAME, -- guaranteed to be MN
   -- once returned, caller must release with GSS_Release_name()

   o  mech_type OBJECT IDENTIFIER, -- caller should treat as
   -- read-only; does not need to be released

   o  output_context_handle CONTEXT HANDLE, -- once returned
   -- non-NULL in context establishment sequence, caller
   -- must release with GSS_Delete_sec_context()

   o  deleg_state BOOLEAN,

   o  mutual_state BOOLEAN,

   o  replay_det_state BOOLEAN,

   o  sequence_state BOOLEAN,

   o  anon_state BOOLEAN,

   o  trans_state BOOLEAN,

   o  prot_ready_state BOOLEAN, -- see Section 1.2.7 for discussion

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,
   o  lifetime_rec INTEGER, -- in seconds, or reserved value for
   -- INDEFINITE

   o  delegated_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
   -- caller must release with GSS_Release_cred()

   o  output_token OCTET STRING -- NULL or token to pass to context
   -- initiator; if returned non-NULL, caller must release with
   -- GSS_Release_buffer()

This call may block pending network interactions for those mech_types in which a directory service or other network entity must be consulted on behalf of a context acceptor in order to validate a received input_token. πŸ•°οΈ

Return major_status codes: these are the vibes check, so read them carefully πŸ‘€

  • GSS_S_COMPLETE: context-level data structures were successfully initialized, and per-message processing can now be performed in conjunction with this context. βœ…
  • GSS_S_CONTINUE_NEEDED: control information in the returned output_token must be sent to the initiator, and a response must be received and passed as the input_token argument to a continuation call to GSS_Accept_sec_context(), before per-message processing can be performed in conjunction with this context. πŸ”
  • GSS_S_DEFECTIVE_TOKEN: consistency checks performed on the input_token failed, so no further processing based on that token can happen. πŸ’€
  • GSS_S_DEFECTIVE_CREDENTIAL: consistency checks on the credential structure referenced by acceptor_cred_handle failed, so no further processing using that structure can happen. πŸ’€
  • GSS_S_BAD_SIG (GSS_S_BAD_MIC): the received input_token has an incorrect integrity check, so context setup cannot be accomplished. 🚫
  • GSS_S_DUPLICATE_TOKEN: the integrity check on the received input_token was correct, but the token was recognized as a duplicate of one already processed. No new context is established. πŸ‘―
  • GSS_S_OLD_TOKEN: the integrity check was correct, but the input_token is too old to be checked for duplication against previously-processed tokens. No new context is established. πŸ•ΈοΈ
  • GSS_S_NO_CRED: no context was established, either because the input cred_handle was invalid, because the referenced credentials are valid for context initiator use only, because the caller lacks authorization to access them, or because the default credential resolution procedure failed. πŸ”‘
  • GSS_S_CREDENTIALS_EXPIRED: the credentials provided through the input acceptor_cred_handle argument are no longer valid, so context establishment cannot be completed. βŒ›
  • GSS_S_BAD_BINDINGS: a mismatch between the caller-provided chan_bindings and those extracted from the input_token was detected. That's a security-relevant event, and it prevents context establishment. 🚨
  • GSS_S_NO_CONTEXT: no valid context was recognized for the input context_handle provided. This status is returned only for successor calls following GSS_S_CONTINUE_NEEDED status returns. 🧩
  • GSS_S_BAD_MECH: a context establishment token was received that specifies a mechanism unsupported by the local system or with the caller's active credentials. πŸ™…β€β™€οΈ
  • GSS_S_FAILURE: context setup could not be accomplished for reasons unspecified at the GSS-API level, and no interface-defined recovery action is available. 😭

The GSS_Accept_sec_context() routine is used by a context target. 🎯 Using the information in the credentials structure referenced by the input acceptor_cred_handle, it verifies the incoming input_token and, following the successful completion of a context establishment sequence, returns the authenticated src_name and the mech_type used. The returned src_name is guaranteed to be an MN, processed by the mechanism under which the context was established. πŸͺͺ The acceptor_cred_handle must correspond to the same valid credentials structure on the initial call to GSS_Accept_sec_context() and on any successor calls resulting from GSS_S_CONTINUE_NEEDED status returns. Different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED mechanism will need access to credentials at different points in the context establishment sequence, so this matters a lot πŸ”

The caller-provided input_context_handle argument is to be 0 (GSS_C_NO_CONTEXT), meaning "not yet assigned," on the first GSS_Accept_sec_context() call relating to a given context. If the call is successful (meaning it comes back with major_status GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only then, the initial call returns a non-zero output_context_handle for use in future references to this context. 🎟️ Once a non-zero output_context_handle has been returned, GSS-API callers should call GSS_Delete_sec_context() to release context-related resources if errors occur in later phases of context establishment, or when an established context is no longer required. 🧹 If GSS_Accept_sec_context() is passed the handle of a context that is already fully established, GSS_S_FAILURE status is returned. πŸ™ƒ

The chan_bindings argument is used by the caller to provide information binding the security context to security-related characteristics (for example, addresses or cryptographic keys) of the underlying communications channel. πŸ”— See Section 1.1.6 of this document for more discussion of how this argument is used. πŸ“–

The returned state results (deleg_state, mutual_state, replay_det_state, sequence_state, anon_state, trans_state, and prot_ready_state) reflect the same information described for GSS_Init_sec_context(), and their values are significant under the same return state conditions. 🧠

The conf_avail return value indicates whether the context supports per-message confidentiality services. It tells the caller whether a request for encryption through the conf_req_flag input to GSS_Wrap() can be honored. πŸ” In a similar way, the integ_avail return value indicates whether per-message integrity services are available (through either GSS_GetMIC() or GSS_Wrap()) on the established context. πŸ›‘οΈ These values are significant under the same return state conditions as described under GSS_Init_sec_context().

The lifetime_rec return value is significant only in conjunction with GSS_S_COMPLETE major_status. It indicates the length of time for which the context will be valid, expressed as an offset from the present. ⏳

The returned mech_type value indicates the specific mechanism employed on the context. It will never indicate the value for "default". πŸ™…β€β™€οΈ A valid mech_type result must be returned whenever GSS_S_COMPLETE status is indicated. GSS-API implementations may (but are not required to) also return mech_type along with predecessor calls indicating GSS_S_CONTINUE_NEEDED status or, if a mechanism is determinable, in conjunction with fatal error cases. 🧾 For mechanisms that perform their own negotiation, the returned mech_type result may indicate selection of a mechanism identified by an OID different from the one passed in the input mech_type argument. The returned value may also change between successive calls returning GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE. πŸ¦‹

The delegated_cred_handle result is significant only when deleg_state is TRUE, and it gives the target a way to reference the delegated credentials. πŸŽ€ The output_token result, when non-NULL, provides a context-level token to be returned to the context initiator so that a multi-step context establishment sequence can continue. 🧡 As noted with GSS_Init_sec_context(), any returned token should be transferred to the context's peer (in this case, the context initiator), regardless of the value of the accompanying returned major_status. πŸ“¬

Note: A target must be able to tell apart a context-level input_token, which is passed to GSS_Accept_sec_context(), from the per-message data elements passed to GSS_VerifyMIC() or GSS_Unwrap(). These data elements may arrive in a single application message, and GSS_Accept_sec_context() must be performed before per-message processing can be performed successfully. πŸ‘€ This is the kind of detail that's easy to miss and really important, so don't skip it, bestie πŸ’–

2.2.3: GSS_Delete_sec_context call 🧹

Okay so this one is the cleanup crew 🧹✨ GSS_Delete_sec_context() is how you flush a context once you're done with it, or when something goes sideways during setup. Either peer can call it, and it wipes out the context-specific info on their side. Iconic.

Inputs and outputs:

  • context_handle CONTEXT HANDLE
  • major_status INTEGER,
  • minor_status INTEGER,
  • output_context_token OCTET STRING

Return major_status codes:

  • GSS_S_COMPLETE means the context was recognized and the relevant context-specific info got flushed πŸ’–. If the caller gives a non-null buffer to receive an output_context_token, and the mechanism returns a non-NULL token into it, that output_context_token is ready to be sent to the context's peer πŸŽ€.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the context_handle you gave, so no deletion happened πŸ™ˆ.
  • GSS_S_FAILURE means the context is recognized, but GSS_Delete_sec_context() couldn't be performed for reasons that aren't specified at the GSS-API level 😭.

This call can be made by either peer in a security context to flush context-specific information πŸ’…. Once a non-zero output_context_handle has been returned by context establishment calls, GSS-API callers should call GSS_Delete_sec_context() to release context-related resources if errors occur in later phases of context establishment, or when an established context is no longer required 🌸. This call may block pending network interactions for mech_types in which active notification must be made to a central server when a security context is to be deleted 🧚.

If a non-null output_context_token parameter is provided by the caller, an output_context_token may be returned to the caller πŸ¦‹. If one is handed back, it can be passed to the context's peer so the peer's GSS-API implementation knows its matching context information can be flushed too πŸ‘‘. (Once a context is established, the peers involved are expected to retain cached credential and context-related information until the information's expiration time is reached, or until a GSS_Delete_sec_context() call is made πŸ“.)

The facility for context_token usage to signal context deletion is retained for compatibility with GSS-API Version 1 πŸ•°οΈ. For current usage, it is recommended that both peers to a context invoke GSS_Delete_sec_context() independently, passing a null output_context_token buffer to indicate that no context_token is required ✨. Implementations of GSS_Delete_sec_context() should delete relevant locally-stored context information 🧼.

Attempts to perform per-message processing on a deleted context will result in error returns. Don't be that person πŸ™ˆπŸ’€

2.2.4: GSS_Process_context_token call πŸ“¨

Okay this is the inbox call πŸ“¨πŸ«Ά GSS_Process_context_token() handles context_tokens that come in from your peer after a context is already established, and it updates the context-level state to match.

Inputs:

  • context_handle CONTEXT HANDLE,
  • input_context_token OCTET STRING

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,

Return major_status codes:

  • GSS_S_COMPLETE means the input_context_token was successfully processed in conjunction with the context referenced by context_handle πŸ’–.
  • GSS_S_DEFECTIVE_TOKEN means the consistency checks on the received context_token failed, so no further processing can happen with that token πŸ’€.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the context_handle you provided πŸ™ˆ.
  • GSS_S_FAILURE means the context is recognized, but GSS_Process_context_token() couldn't be performed for reasons that aren't specified at the GSS-API level 😭.

One big use for this is processing the context_tokens that GSS_Delete_sec_context() generates 🧹. GSS_Process_context_token() will not block pending network interactions for that purpose, which is very much a vibe 🌈. The other use is processing tokens that tell you about remote-peer context establishment failures, even after your local GSS-API has already said GSS_S_COMPLETE πŸ‘‘.


2.2.5: GSS_Context_time call ⏰

Lowkey the countdown timer πŸ¦‹β° GSS_Context_time() tells you how long a context you already have is going to stay valid.

Input:

  • context_handle CONTEXT HANDLE,

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • lifetime_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE

Return major_status codes:

  • GSS_S_COMPLETE means the referenced context is valid and will stay valid for the amount of time shown in lifetime_rec ✨.
  • GSS_S_CONTEXT_EXPIRED means data items related to the referenced context have expired πŸ’”.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the context_handle you gave πŸ™ˆ.
  • GSS_S_FAILURE means the requested operation failed for reasons that aren't specified at the GSS-API level 😭.

This call is used to figure out how much longer a currently established context will remain valid 🌸⏳. Main character energy for your timers πŸ’…πŸŽ€

2.2.6: GSS_Inquire_context call ✨

okay bestie, this call is basically you handing over a context handle and asking "tell me everything about yourself" πŸ” and the context spills all its tea. Here's the input and output list πŸ’…

Input:

   o  context_handle CONTEXT HANDLE,

Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  src_name INTERNAL NAME,  -- name of context initiator,
   -- guaranteed to be MN;
   -- caller must release with GSS_Release_name() if returned

   o  targ_name INTERNAL NAME,  -- name of context target,
   -- guaranteed to be MN;
   -- caller must release with GSS_Release_name() if returned

   o  lifetime_rec INTEGER -- in seconds, or reserved value for
   -- INDEFINITE or EXPIRED

   o  mech_type OBJECT IDENTIFIER, -- the mechanism supporting this
   -- security context; caller should treat as read-only and not
   -- attempt to release

   o  deleg_state BOOLEAN,

   o  mutual_state BOOLEAN,

   o  replay_det_state BOOLEAN,

   o  sequence_state BOOLEAN,

   o  anon_state BOOLEAN,
   o  trans_state BOOLEAN,

   o  prot_ready_state BOOLEAN,

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,

   o  locally_initiated BOOLEAN, -- TRUE if initiator, FALSE if acceptor

   o  open BOOLEAN, -- TRUE if context fully established, FALSE
   -- if partly established (in CONTINUE_NEEDED state)

Here are the major_status codes you can get back, and what each one means πŸŽ€

  • GSS_S_COMPLETE means the referenced context is valid, and that deleg_state, mutual_state, replay_det_state, sequence_state, anon_state, trans_state, prot_ready_state, conf_avail, integ_avail, locally_initiated, and open return values describe the matching characteristics of the context. If open is TRUE, lifetime_rec is also returned. If open is TRUE and the context peer's name is known, src_name and targ_name are valid too, on top of everything listed above. The mech_type value must be returned for contexts where open is TRUE, and may be returned for contexts where open is FALSE.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the context_handle you gave. Return values other than major_status and minor_status are undefined πŸ™ˆ
  • GSS_S_FAILURE means the operation failed for reasons not specified at the GSS-API level. Return values other than major_status and minor_status are undefined.

This call is how you pull out the characteristics of a security context πŸ¦‹ ngl the detail to remember is that GSS-API implementations are expected to keep inquirable context data until the caller releases the context, even after it has expired. The underlying cryptographic data elements may get deleted after expiration, though, to limit their exposure πŸ”’


2.2.7: GSS_Wrap_size_limit call 🧚

Here's what you feed in: 🌸

Inputs:

   o  context_handle CONTEXT HANDLE,

   o  conf_req_flag BOOLEAN,
   o  qop INTEGER,

   o  output_size INTEGER

Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  max_input_size INTEGER

And the major_status codes πŸ’–

  • GSS_S_COMPLETE means the token size was determined successfully. An input message whose length in octets equals the returned max_input_size value will, when passed to GSS_Wrap() on the context identified by context_handle, with the confidentiality request state given in conf_req_flag and the quality of protection specifier given in qop, yield an output token no larger than the provided output_size. Main character energy, honestly πŸ‘‘
  • GSS_S_CONTEXT_EXPIRED means the input context_handle is recognized, but the referenced context has expired. Return values other than major_status and minor_status are undefined.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the input context_handle. Return values other than major_status and minor_status are undefined.
  • GSS_S_BAD_QOP means the provided QOP value is not recognized or supported for the context.
  • GSS_S_FAILURE means the operation failed for reasons not specified at the GSS-API level. Return values other than major_status and minor_status are undefined.

This call figures out the biggest input datum you can pass to GSS_Wrap() without the output token going over a size you choose πŸ“


2.2.8: GSS_Export_sec_context call πŸ¦‹

Input, and what comes back: πŸ’œ

Inputs:

   o  context_handle CONTEXT HANDLE

Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  interprocess_token OCTET STRING  -- caller must release
   -- with GSS_Release_buffer()

The major_status codes, served fresh πŸ”₯

  • GSS_S_COMPLETE means the referenced context has been successfully exported to a representation in interprocess_token, and is no longer available for use by the caller.
  • GSS_S_UNAVAILABLE means the context export facility is not available for use on the referenced context. (This status should occur only for contexts for which the trans_state value is FALSE.) Return values other than major_status and minor_status are undefined.
  • GSS_S_CONTEXT_EXPIRED means the input context_handle is recognized, but the referenced context has expired. Return values other than major_status and minor_status are undefined.
  • GSS_S_NO_CONTEXT means no valid context was recognized for the input context_handle. Return values other than major_status and minor_status are undefined.
  • GSS_S_FAILURE means the operation failed for reasons not specified at the GSS-API level. Return values other than major_status and minor_status are undefined.

This call makes an interprocess token so you can hand a security context to another process on the same end system 🧚 The receiving process calls GSS_Import_sec_context() to accept it. GSS_Export_sec_context() is only defined for contexts that are fully and successfully established, meaning the ones where GSS_Init_sec_context() and GSS_Accept_sec_context() have returned a GSS_S_COMPLETE major_status.

A successful GSS_Export_sec_context() deactivates the security context for the calling process. In that case the GSS-API implementation shall deallocate all process-wide resources associated with the security context, and shall set the context_handle to GSS_C_NO_CONTEXT. If an error makes it impossible to finish exporting the context, the GSS-API implementation must not return an interprocess token, and should strive to leave the security context referenced by context_handle untouched. If that is impossible, the implementation may delete the security context, as long as it also sets the context_handle parameter to GSS_C_NO_CONTEXT.

Portable callers must not assume that a given interprocess token can be imported by GSS_Import_sec_context() more than once, which would create multiple instantiations of a single context πŸ™ˆ GSS-API implementations may detect and reject repeat imports, but they are not required to do so.

The internal representation inside the interprocess token is an implementation-defined local matter. Interprocess tokens cannot be assumed to transfer across different GSS-API implementations, so don't count on it πŸ’€

It is recommended that GSS-API implementations adopt policies that suit their operating environments, to define which processes are eligible to import a context. The specific constraints here are local matters. Candidate examples include transfers between processes running on behalf of the same user identity, or processes that are part of a common job. However, it may be impossible to enforce such policies in some implementations.

To support the goals above, implementations may protect the transferred context data with cryptography inside the interprocess token. They may also use interprocess tokens as a way to reference local interprocess communication facilities, which are protected by other means, instead of storing the context data directly in the token πŸ”

Transferring an open context may, for certain mechanisms and implementations, reveal data about the credential that was used to establish the context. So callers should be cautious about how trustworthy the processes are that they transfer contexts to 😭 The GSS-API implementation may provide its own protections over the exported context, but the caller is responsible for protecting the interprocess token from disclosure, and for making sure the context goes to an appropriate destination process. Dramatic? Yes. Necessary? Also yes.

2.2.9: GSS_Import_sec_context call 🌈

Here's what goes in and what comes out ✨

Inputs:

   o  interprocess_token OCTET STRING

Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  context_handle CONTEXT HANDLE  -- if successfully returned,
   -- caller must release with GSS_Delete_sec_context()

Now the major_status codes πŸ‘‘

  • GSS_S_COMPLETE means the context represented by the input interprocess_token has been successfully transferred to the caller, and is available for future use through the output context_handle.
  • GSS_S_NO_CONTEXT means the context represented by the input interprocess_token was invalid. Return values other than major_status and minor_status are undefined.
  • GSS_S_DEFECTIVE_TOKEN means the input interprocess_token was defective. Return values other than major_status and minor_status are undefined.
  • GSS_S_UNAVAILABLE means the context import facility is not available for use on the referenced context. Return values other than major_status and minor_status are undefined.
  • GSS_S_UNAUTHORIZED means the context represented by the input interprocess_token is not authorized for transfer to the caller. Return values other than major_status and minor_status are undefined.
  • GSS_S_FAILURE means the operation failed for reasons not specified at the GSS-API level. Return values other than major_status and minor_status are undefined.

This call processes an interprocess token generated by GSS_Export_sec_context(), and makes the transferred context available to the caller πŸ¦‹ Once GSS_Import_sec_context() succeeds, the imported context is available for use by the importing process. It can be used for all per-message operations, and its importer may delete it or export it. The inability to receive delegated credentials through gss_import_sec_context() rules out establishing new contexts based on information delegated to the importer's end system within the context being imported. The exception is when those delegated credentials are obtained through separate routines (for example, XGSS-API calls) outside the GSS-V2 definition πŸŽ€

For further discussion of the security and authorization issues around this call, please see the discussion in Section 2.2.8 🫢

2.3. Per-message calls ✨

okay bestie, this group is where the per-message protection magic happens 🫢 These calls work on a security context that's already established, and none of them block while waiting on the network πŸ’… Both the context's initiator and its target can call them. The four calls come in two pairs: whatever GSS_GetMIC() outputs is exactly what GSS_VerifyMIC() takes in, and whatever GSS_Wrap() outputs is exactly what GSS_Unwrap() takes in πŸŽ€

GSS_GetMIC() and GSS_VerifyMIC() handle data origin authentication and data integrity πŸ” When GSS_GetMIC() runs on an input message, it makes a per-message token with data items that let the underlying mechanisms provide those security services. The original message and the token go to the remote peer, and GSS_VerifyMIC() checks the message against that separate token πŸ¦‹

GSS_Wrap() and GSS_Unwrap() do everything GSS_GetMIC() and GSS_VerifyMIC() do, plus caller-requested confidentiality 🌸 GSS_Wrap() gives back one data element that wraps up the user data (optionally encrypted) along with the token data items. That element goes to the peer, where GSS_Unwrap() decrypts it if needed and then checks the authentication and integrity data πŸ”“

Zero-length tokens never get sent to a context's peer by GSS calls, but a caller can hand a zero-length object to GSS_Wrap(). The peer that calls GSS_Unwrap() on that token gets a zero-length object back πŸ™ˆ Similarly, GSS_GetMIC() can run on an empty object and produce a MIC that GSS_VerifyMIC() will successfully verify against the active security context together with a zero-length object ✨

2.3.1. GSS_GetMIC call

Note: This call does the same job as the GSS_Sign call from earlier versions of this spec πŸ“ For backward compatibility, implementations are recommended to support this function under both names for now. Future references to it as GSS_Sign are deprecated.

Inputs:

o  context_handle CONTEXT HANDLE,

o  qop_req INTEGER, -- 0 specifies default QOP

o  message OCTET STRING

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  per_msg_token OCTET STRING  -- caller must release
-- with GSS_Release_buffer()

Return major_status codes:

  • GSS_S_COMPLETE means an integrity check suitable for an established security context was applied successfully, and the message and its matching per_msg_token are ready to send πŸŽ‰
  • GSS_S_CONTEXT_EXPIRED means the context-related data items have expired, so the requested operation can't be performed 😭
  • GSS_S_NO_CONTEXT means no context was recognized for the input context_handle πŸ€·β€β™€οΈ
  • GSS_S_BAD_QOP means the QOP value provided isn't recognized or supported for this context πŸ’€
  • GSS_S_FAILURE means the context is recognized, but the operation couldn't be performed for reasons not specified at the GSS-API level πŸ₯²

Using the security context referenced by context_handle, the call applies an integrity check to the input message. That check also includes timestamps and/or other data that supports mech_type-specific mechanisms. If the status is GSS_S_COMPLETE, the result goes into per_msg_token. The qop_req parameter controls quality of protection, and Section 1.2.4 explains how it's interpreted πŸ’… The caller then passes both the message and the per_msg_token to the target πŸ’–

GSS_GetMIC() finishes before the message and per_msg_token are sent to the peer. Successfully running GSS_GetMIC() doesn't guarantee that GSS_VerifyMIC() will (or can necessarily) succeed when the message reaches its destination πŸ‘€

Mechanisms that don't support per-message protection services should return GSS_S_FAILURE if this routine is called.

2.3.2. GSS_VerifyMIC call

Note: This call does the same job as the GSS_Verify call from earlier versions of this spec 🧚 For backward compatibility, implementations are recommended to support this function under both names for now. Future references to it as GSS_Verify are deprecated.

Inputs:

o  context_handle CONTEXT HANDLE,

o  message OCTET STRING,

o  per_msg_token OCTET STRING

Outputs:

o  qop_state INTEGER,

o  major_status INTEGER,

o  minor_status INTEGER,

Return major_status codes:

  • GSS_S_COMPLETE means the message was verified successfully βœ…
  • GSS_S_DEFECTIVE_TOKEN means the consistency checks on the received per_msg_token failed, so no further processing can happen with that token 🚫
  • GSS_S_BAD_SIG (GSS_S_BAD_MIC) means the received per_msg_token has an incorrect integrity check for the message 😀
  • GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, and GSS_S_GAP_TOKEN show up alongside the optional per-message replay detection features in Section 1.2.3. Their meanings are explained in that section πŸ”
  • GSS_S_CONTEXT_EXPIRED means the context-related data items have expired, so the requested operation can't be performed 😭
  • GSS_S_NO_CONTEXT means no context was recognized for the input context_handle πŸ€·β€β™€οΈ
  • GSS_S_FAILURE means the context is recognized, but the GSS_VerifyMIC() operation couldn't be performed for reasons not specified at the GSS-API level πŸ₯²

Using the security context referenced by context_handle, the call checks that the input per_msg_token has an appropriate integrity check for the input message. It also applies any active replay detection or sequencing features. The quality of protection that was applied to the processed message comes back in the qop_state result πŸ’œ

Mechanisms that don't support per-message protection services should return GSS_S_FAILURE if this routine is called.

2.3.3. GSS_Wrap call

Note: This call does the same job as the GSS_Seal call from earlier versions of this spec 🌈 For backward compatibility, implementations are recommended to support this function under both names for now. Future references to it as GSS_Seal are deprecated.

Inputs:

o  context_handle CONTEXT HANDLE,

o  conf_req_flag BOOLEAN,

o  qop_req INTEGER, -- 0 specifies default QOP

o  input_message OCTET STRING

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,
o  conf_state BOOLEAN,

o  output_message OCTET STRING  -- caller must release with
-- GSS_Release_buffer()

Return major_status codes:

  • GSS_S_COMPLETE means the input_message was processed successfully and the output_message is ready to send 🎁
  • GSS_S_CONTEXT_EXPIRED means the context-related data items have expired, so the requested operation can't be performed 😭
  • GSS_S_NO_CONTEXT means no context was recognized for the input context_handle πŸ€·β€β™€οΈ
  • GSS_S_BAD_QOP means the QOP value provided isn't recognized or supported for this context πŸ’€
  • GSS_S_FAILURE means the context is recognized, but the GSS_Wrap() operation couldn't be performed for reasons not specified at the GSS-API level πŸ₯²

This call does the data origin authentication and data integrity work of GSS_GetMIC() πŸ’– If conf_req_flag comes in as TRUE, it asks for confidentiality to be applied to the input_message. Confidentiality might not be supported by every mech_type or every implementation, so the returned conf_state flag tells you whether confidentiality was actually provided for the input_message πŸ” The qop_req parameter controls quality of protection, and Section 1.2.4 explains how it's interpreted ✨

When GSS_S_COMPLETE comes back, GSS_Wrap() gives you one output_message data element. It holds the user data (optionally encrypted) plus control information πŸŽ€

Mechanisms that don't support per-message protection services should return GSS_S_FAILURE if this routine is called.

2.3.4. GSS_Unwrap call

Note: This call does the same job as the GSS_Unseal call from earlier versions of this spec πŸ‘ For backward compatibility, implementations are recommended to support this function under both names for now. Future references to it as GSS_Unseal are deprecated.

Inputs:

o  context_handle CONTEXT HANDLE,

o  input_message OCTET STRING

Outputs:

o  conf_state BOOLEAN,

o  qop_state INTEGER,

o  major_status INTEGER,

o  minor_status INTEGER,

o  output_message OCTET STRING  -- caller must release with
-- GSS_Release_buffer()

Return major_status codes:

  • GSS_S_COMPLETE means the input_message was processed successfully and the resulting output_message is available πŸŽ‰
  • GSS_S_DEFECTIVE_TOKEN means the consistency checks on the per_msg_token pulled out of the input_message failed, so no further processing can happen 🚫
  • GSS_S_BAD_SIG (GSS_S_BAD_MIC) means an incorrect integrity check was found for the message 😀
  • GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN, and GSS_S_GAP_TOKEN show up alongside the optional per-message replay detection features in Section 1.2.3. Their meanings are explained in that section πŸ”
  • GSS_S_CONTEXT_EXPIRED means the context-related data items have expired, so the requested operation can't be performed 😭
  • GSS_S_NO_CONTEXT means no context was recognized for the input context_handle πŸ€·β€β™€οΈ
  • GSS_S_FAILURE means the context is recognized, but the GSS_Unwrap() operation couldn't be performed for reasons not specified at the GSS-API level πŸ₯²

This call processes a data element that GSS_Wrap() generated (and optionally encrypted), which you pass in as input_message πŸ”“ The returned conf_state value tells you whether confidentiality was applied to the input_message. If conf_state is TRUE, GSS_Unwrap() has decrypted the input_message. The quality of protection applied to the processed message comes back in the qop_state result πŸ’… GSS_Unwrap() also runs the data integrity and data origin authentication checks from GSS_VerifyMIC() on the plaintext data, and that plaintext is returned in output_message πŸ¦‹

Mechanisms that don't support per-message protection services should return GSS_S_FAILURE if this routine is called.

2.4. Support calls 🧚

This group has the support functions that GSS-API callers can use no matter what state their established contexts are in 🫢 The spec doesn't say whether these calls block on network interactions. ✨

2.4.1: GSS_Display_status call ✨

Okay so bestie, this call is basically a decoder ring πŸ’ for the major and minor status codes GSS-API hands back. You give it a status value, and it gives you a printable string you can actually read. ngl, every error-handling person needs this one πŸ™ˆ

Inputs:

  • status_value INTEGER, -- GSS-API major_status or minor_status -- return value
  • status_type INTEGER, -- 1 if major_status, 2 if minor_status
  • mech_type OBJECT IDENTIFIER -- mech_type to be used for minor_status translation

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • status_string_set SET OF OCTET STRING -- required calls for release by caller are specific to language bindings

Return major_status codes:

  • GSS_S_COMPLETE means a valid printable status representation (possibly covering more than one status event packed into the status_value) is ready to go in the returned status_string_set. πŸ’–
  • GSS_S_BAD_MECH means you asked for translation under a mech_type that isn't supported, so the translation couldn't happen. πŸ’€
  • GSS_S_BAD_STATUS means the input status_value was invalid, or the status_type was something other than 1 or 2, so no translation for you. πŸ™…β€β™€οΈ
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. Rough day 😭

This call gives callers a way to turn the major and minor status codes that GSS-API returns into printable strings. Quick heads up: some language bindings might loop through the status components one at a time. That's totally fine, but it's not required for conformance with the current spec πŸ¦‹

Now here's some tea β˜•. Even though [RFC-2078] never planned for it, some existing GSS-API implementations return GSS_S_CONTINUE_NEEDED while you're iterating through the messages from GSS_Display_status(). This behavior is deprecated, so it's a no-go going forward. GSS_S_CONTINUE_NEEDED should only come back from GSS_Init_sec_context() and GSS_Accept_sec_context(). For maximal portability, though, it's recommended that defensive callers can accept and ignore GSS_S_CONTINUE_NEEDED if GSS_Display_status() or any other call besides GSS_Init_sec_context() or GSS_Accept_sec_context() sends it back. Be defensive, bestie πŸ›‘οΈβœ¨


2.4.2: GSS_Indicate_mechs call 🌸

This one's giving "what do I have to work with?" energy. 🧚

Input:

  • (none)

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • mech_set SET OF OBJECT IDENTIFIER -- caller must release with GSS_Release_oid_set()

Return major_status codes:

  • GSS_S_COMPLETE means a set of available mechanisms has been returned in mech_set. πŸ‘‘
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. πŸ’…

This call lets callers figure out which mechanism types are available on the local system. It's mostly for specialized callers who want non-default mech_type sets to pass into GSS-API calls that accept mechanism type specifiers. Niche, but iconic when you need it πŸ“


2.4.3: GSS_Compare_name call πŸŽ€

Okay, this is the "are these two names the same person?" call πŸ‘€

Inputs:

  • name1 INTERNAL NAME,
  • name2 INTERNAL NAME

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • name_equal BOOLEAN

Return major_status codes:

  • GSS_S_COMPLETE means name1 and name2 were comparable, and the name_equal result tells you whether they represent the same entity. ✨
  • GSS_S_BAD_NAMETYPE means the two input names have different types and can't be compared, so the comparison couldn't be completed. πŸ™ƒ
  • GSS_S_BAD_NAME means one or both input names were ill-formed in terms of their internal type specifier, so again, no comparison. πŸ’€
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. 😭

This call lets callers compare two internal name representations to find out whether they point at the same entity. If either name passed to GSS_Compare_name() is an anonymous principal, GSS_Compare_name() shall indicate FALSE. Ate, no notes πŸ’… It isn't required that name1 and name2 both be MNs. For some implementations and cases, GSS_S_BAD_NAMETYPE may come back, which signals that the names are incomparable, in the case where neither input name is an MN. Plot twist, but a valid one 🌈


2.4.4: GSS_Display_name call πŸ’œ

This call takes an internal name and turns it into something human-readable, along with its namespace type descriptor. πŸ¦‹

Inputs:

  • name INTERNAL NAME

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • name_string OCTET STRING -- caller must release with GSS_Release_buffer()
  • name_type OBJECT IDENTIFIER -- caller should treat as read-only; does not need to be released

Return major_status codes:

  • GSS_S_COMPLETE means a valid printable name representation is available in the returned name_string. πŸŽ‰
  • GSS_S_BAD_NAME means the contents of the name didn't match its internally indicated name type, so there was no printable version to make. 😡
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. πŸ₯²

The printable form's syntax is a local matter, so each implementation gets to decide how it looks 🌸. If the input name represents an anonymous identity, a reserved value, GSS_C_NT_ANONYMOUS, shall be returned for name_type. ✨

Here's the tricky bit πŸ™ˆ: the GSS_C_NO_OID name type should only come back when the internal name was created through an import with GSS_C_NO_OID. It's fine for mechanisms to normalize names imported with GSS_C_NO_OID into other supported types, so they might display with types other than GSS_C_NO_OID. Main character energy, but make sure you know your types πŸ‘‘


2.4.5: GSS_Import_name call πŸ§šβ€β™€οΈ

Import is where you hand GSS-API a name as a plain octet string and tell it what namespace to parse it in. ✨

Inputs:

  • input_name_string OCTET STRING,
  • input_name_type OBJECT IDENTIFIER

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER,
  • output_name INTERNAL NAME -- caller must release with GSS_Release_name()

Return major_status codes:

  • GSS_S_COMPLETE means a valid name representation is output in output_name and is described by the type value in output_name_type. πŸ’–
  • GSS_S_BAD_NAMETYPE means the input_name_type isn't supported by the applicable underlying GSS-API mechanism(s), so the import couldn't be completed. πŸ™…β€β™€οΈ
  • GSS_S_BAD_NAME means the input_name_string is ill-formed in terms of the input_name_type, so the import couldn't be completed. πŸ’€
  • GSS_S_BAD_MECH means the input was an exported name object whose enclosed mechanism type wasn't recognized, or wasn't supported by the GSS-API implementation. 😬
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. 😭

This call lets callers hand over a name as a contiguous octet string, say which namespace it should be parsed in, and convert it into an internal form that other GSS-API routines can use. The syntax of input_name_string is defined alongside its name type. Depending on the input_name_type, the input_name_string may or may not be a printable string. πŸŽ€

If input_name_type is GSS_C_NO_OID, a mechanism-specific default printable syntax is assumed for input_name_string. That syntax shall be specified in the corresponding GSS-V2 mechanism specification. Other input_name_type values, as registered by GSS-API implementations, can be used to indicate specific non-default name syntaxes. Note: input_name_type only describes and qualifies how to interpret input_name_string. It does not specify the data type of the returned output_name. Don't mix those up, bestie 🫢

If a mechanism claims support for a particular name type, its GSS_Import_name() operation shall be able to accept every possible value that conforms to the external name syntax for that name type. These imported values may correspond to:

  • (1) locally registered entities (for which credentials may be acquired),
  • (2) non-local entities (for which local credentials cannot be acquired, but which may be referenced as targets of initiated security contexts or initiators of accepted security contexts), or
  • (3) neither of the above.

Whether a particular name falls into class (1), (2), or (3) is not guaranteed to be determined by the GSS_Import_name() function. πŸ€·β€β™€οΈ

The internal name generated by GSS_Import_name() may be a single-mechanism MN. It's likely to be an MN within a single-mechanism implementation, but portable callers must not depend on this property. So they must not assume that the output of GSS_Import_name() can be passed straight to GSS_Export_name() without first going through GSS_Canonicalize_name(). Don't skip the canonicalize step, bestie, it's the whole vibe πŸ’…


2.4.6: GSS_Release_name call πŸƒ

Time to clean up. This call frees the storage behind an internal name. 🧹

Inputs:

  • name INTERNAL NAME

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER

Return major_status codes:

  • GSS_S_COMPLETE means the storage tied to the input name was successfully released. 🫧
  • GSS_S_BAD_NAME means the input name argument didn't contain a valid name. πŸ™ˆ
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. 😭

How this call behaves depends on the language and programming environment the GSS-API implementation runs in, so the details live in the applicable bindings specifications. In particular, calling this may be superfluous (and can be left out) in bindings where memory management is automatic. Lowkey relieving 🌷


2.4.7: GSS_Release_buffer call πŸŒ™

This is the cleanup crew for OCTET STRING buffers that another GSS-API call allocated. 🧽

Inputs:

  • buffer OCTET STRING

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER

Return major_status codes:

  • GSS_S_COMPLETE means the storage tied to the input buffer was successfully released. ✨
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. 😭

It lets callers release the storage behind an OCTET STRING buffer that some other GSS-API call allocated. Just like the release call before it, the specifics depend on the language and programming environment, so they're detailed in the applicable bindings specifications. Implementing and invoking this call may be superfluous (and can be omitted) in bindings where memory management is automatic. Same energy as before, iykyk 🍰


2.4.8: GSS_Release_OID_set call πŸ¦„

Last one in this batch, and it's the cleanup for OID sets 🧼

Inputs:

  • buffer SET OF OBJECT IDENTIFIER

Outputs:

  • major_status INTEGER,
  • minor_status INTEGER

Return major_status codes:

  • GSS_S_COMPLETE means the storage tied to the input object identifier set was successfully released. πŸ’œ
  • GSS_S_FAILURE means the operation failed for reasons that aren't specified at the GSS-API level. πŸ’€

This call lets callers release the storage behind an object identifier set that another GSS-API call allocated. As with the other release calls, its exact behavior depends on the language and programming environment, so the bindings specifications have the details. Implementing and invoking it may be superfluous (and can be omitted) in bindings where memory management is automatic. It's giving tidy 🫢

2.4.9: GSS_Create_empty_OID_set call 🌸

Okay so this one is giving empty gift box 🎁. It makes an OID set with zero OIDs in it, and you can add stuff to it later with GSS_Add_OID_set_member(). These are meant for building lists of mechanism OIDs to hand to GSS_Acquire_cred() πŸ’…

Inputs:

o  (none)

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  oid_set SET OF OBJECT IDENTIFIER  -- caller must release
-- with GSS_Release_oid_set()

Return major_status codes:

  • GSS_S_COMPLETE indicates successful completion ✨
  • GSS_S_FAILURE indicates that the operation failed πŸ’€

Creates an object identifier set containing no object identifiers, to which members may be subsequently added using the GSS_Add_OID_set_member() routine. These routines are intended to be used to construct sets of mechanism object identifiers, for input to GSS_Acquire_cred().

2.4.10: GSS_Add_OID_set_member call πŸ¦‹

Now we're adding people to the guest list 🫢 This adds an OID to an OID set. It's meant to go hand in hand with GSS_Create_empty_OID_set() when you're putting together a set of mechanism OIDs for GSS_Acquire_cred().

Inputs:

o  member_oid OBJECT IDENTIFIER,

o  oid_set SET OF OBJECT IDENTIFIER

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

Return major_status codes:

  • GSS_S_COMPLETE indicates successful completion ✨
  • GSS_S_FAILURE indicates that the operation failed πŸ’€

Adds an Object Identifier to an Object Identifier set. This routine is intended for use in conjunction with GSS_Create_empty_OID_set() when constructing a set of mechanism OIDs for input to GSS_Acquire_cred().

2.4.11: GSS_Test_OID_set_member call πŸ”

This is the bouncer πŸ•Ί It checks whether a given OID is already in an OID set. It's meant to be used with OID sets you got back from GSS_Indicate_mechs(), GSS_Acquire_cred(), or GSS_Inquire_cred().

Inputs:

o  member OBJECT IDENTIFIER,

o  set SET OF OBJECT IDENTIFIER

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  present BOOLEAN

Return major_status codes:

  • GSS_S_COMPLETE indicates successful completion ✨
  • GSS_S_FAILURE indicates that the operation failed πŸ’€

Interrogates an Object Identifier set to determine whether a specified Object Identifier is a member. This routine is intended to be used with OID sets returned by GSS_Indicate_mechs(), GSS_Acquire_cred(), and GSS_Inquire_cred().

2.4.12: GSS_Inquire_names_for_mech call 🧚

Ask this one which name types a mechanism actually supports πŸ‘€ It hands back a set of name types that the local mechanism can handle.

Input:

o  input_mech_type OBJECT IDENTIFIER, -- mechanism type

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  name_type_set SET OF OBJECT IDENTIFIER -- caller must release
-- with GSS_Release_oid_set()

Return major_status codes:

  • GSS_S_COMPLETE indicates that the output name_type_set contains a list of name types which are supported by the locally available mechanism identified by input_mech_type. πŸŽ€
  • GSS_S_BAD_MECH indicates that the mechanism identified by input_mech_type was unsupported within the local implementation, causing the query to fail. πŸ™ˆ
  • GSS_S_FAILURE indicates that the requested operation could not be performed for reasons unspecified at the GSS-API level. πŸ’€

Allows callers to determine the set of name types which are supportable by a specific locally-available mechanism.

2.4.13: GSS_Inquire_mechs_for_name call 🌈

This is the matchmaker πŸ’˜ Give it a name and it tells you which mechanisms can process that name.

Inputs:

o  input_name INTERNAL NAME,

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  mech_types SET OF OBJECT IDENTIFIER  -- caller must release
-- with GSS_Release_oid_set()

Return major_status codes:

  • GSS_S_COMPLETE indicates that a set of object identifiers, corresponding to the set of mechanisms suitable for processing the input_name, is available in mech_types. ✨
  • GSS_S_BAD_NAME indicates that the input_name was ill-formed and could not be processed. 😭
  • GSS_S_BAD_NAMETYPE indicates that the input_name parameter contained an invalid name type or a name type unsupported by the GSS-API implementation. πŸ™…
  • GSS_S_FAILURE indicates that the requested operation could not be performed for reasons unspecified at the GSS-API level. πŸ’€

This routine returns the mechanism set with which the input_name may be processed.

Each mechanism returned will recognize at least one element within the name. It is permissible for this routine to be implemented within a mechanism-independent GSS-API layer, using the type information contained within the presented name, and based on registration information provided by individual mechanism implementations. This means that the returned mech_types result may indicate that a particular mechanism will understand a particular name when in fact it would refuse to accept that name as input to GSS_Canonicalize_name(), GSS_Init_sec_context(), GSS_Acquire_cred(), or GSS_Add_cred(), due to some property of the particular name rather than a property of the name type. Thus, this routine should be used only as a pre-filter for a call to a subsequent mechanism-specific routine.

Lowkey the most important part: a mechanism showing up in this list does not guarantee it'll accept your name. It's just a pre-filter, bestie. Double-check later 🫢

2.4.14: GSS_Canonicalize_name call πŸ’…

This one glow-ups a name πŸ’– It takes a GSS-API internal name, which might have bits for lots of mechanisms, and reduces it down to a mechanism-specific Mechanism Name (MN) using the mech you pick.

Inputs:

o  input_name INTERNAL NAME,

o  mech_type OBJECT IDENTIFIER  -- must be explicit mechanism,
-- not "default" specifier or identifier of negotiating mechanism

Outputs:

o  major_status INTEGER,
o  minor_status INTEGER,

o  output_name INTERNAL NAME  -- caller must release with
-- GSS_Release_name()

Return major_status codes:

  • GSS_S_COMPLETE indicates that a mechanism-specific reduction of the input_name, as processed by the mechanism identified by mech_type, is available in output_name. ✨
  • GSS_S_BAD_MECH indicates that the identified mechanism is unsupported for this operation; this may correspond either to a mechanism wholly unsupported by the local GSS-API implementation or to a negotiating mechanism with which the canonicalization operation cannot be performed. πŸ™ˆ
  • GSS_S_BAD_NAMETYPE indicates that the input name does not contain an element with suitable type for processing by the identified mechanism. πŸ™…
  • GSS_S_BAD_NAME indicates that the input name contains an element with suitable type for processing by the identified mechanism, but that this element could not be processed successfully. 😭
  • GSS_S_FAILURE indicates that the requested operation could not be performed for reasons unspecified at the GSS-API level. πŸ’€

This routine reduces a GSS-API internal name input_name, which may in general contain elements corresponding to multiple mechanisms, to a mechanism-specific Mechanism Name (MN) output_name by applying the translations corresponding to the mechanism identified by mech_type. The contents of input_name are unaffected by the GSS_Canonicalize_name() operation. References to output_name will remain valid until output_name is released, independent of whether or not input_name is subsequently released.

2.4.15: GSS_Export_name call πŸ¦‹

Exporting is basically packing your name into a flat little suitcase 🧳 The result works for bytewise comparison, or you can feed it back into GSS_Import_name() with the reserved GSS-API Exported Name Object OID.

Inputs:

o  input_name INTERNAL NAME, -- required to be MN

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  output_name OCTET STRING  -- caller must release
-- with GSS_Release_buffer()

Return major_status codes:

  • GSS_S_COMPLETE indicates that a flat representation of the input name is available in output_name. ✨
  • GSS_S_NAME_NOT_MN indicates that the input name contained elements corresponding to multiple mechanisms, so cannot be exported into a single-mechanism flat form. πŸ™ˆ
  • GSS_S_BAD_NAME indicates that the input name was an MN, but could not be processed. 😭
  • GSS_S_BAD_NAMETYPE indicates that the input name was an MN, but that its type is unsupported by the GSS-API implementation. πŸ™…
  • GSS_S_FAILURE indicates that the requested operation could not be performed for reasons unspecified at the GSS-API level. πŸ’€

This routine creates a flat name representation, suitable for bytewise comparison or for input to GSS_Import_name() in conjunction with the reserved GSS-API Exported Name Object OID, from a internal-form Mechanism Name (MN) as emitted, e.g., by GSS_Canonicalize_name() or GSS_Accept_sec_context().

The emitted GSS-API Exported Name Object is self-describing; no associated parameter-level OID need be emitted by this call. This flat representation consists of a mechanism-independent wrapper layer, defined in Section 3.2 of this document, enclosing a mechanism-defined name representation.

In all cases, the flat name output by GSS_Export_name() to correspond to a particular input MN must be invariant over time within a particular installation.

The GSS_S_NAME_NOT_MN status code is provided to enable implementations to reject input names which are not MNs. It is not, however, required for purposes of conformance to this specification that all non-MN input names must necessarily be rejected.

2.4.16: GSS_Duplicate_name call πŸ‘―

This is the copy-paste of names, but make it sparkly ✨ It gives you a second reference to the same internal name, so the copy still works even if the original gets freed.

Inputs:

o  src_name INTERNAL NAME

Outputs:

o  major_status INTEGER,

o  minor_status INTEGER,

o  dest_name INTERNAL NAME  -- caller must release
-- with GSS_Release_name()

Return major_status codes:

  • GSS_S_COMPLETE indicates that dest_name references an internal name object containing the same name as passed to src_name. ✨
  • GSS_S_BAD_NAME indicates that the input name was invalid. 😭
  • GSS_S_FAILURE indicates that the requested operation could not be performed for reasons unspecified at the GSS-API level. πŸ’€

This routine takes input internal name src_name, and returns another reference (dest_name) to that name which can be used even if src_name is later freed. (Note: This may be implemented by copying or through use of reference counts.)


3: Data Structure Definitions for GSS-V2 Usage πŸŽ€

Okay so this whole section is the official dress code πŸ‘— The subsections here define certain data structures so that everyone's implementations can talk to each other, no drama, for interoperability and portability with GSS-V2. πŸ’œ

3.1. Mechanism-Independent Token Format ✨

Okay bestie, this is the wrapper around the very first token of a GSS-API context establishment sequence πŸŽ€. It's mechanism-independent, and it carries an identifier for the mechanism type used on that context, so GSS-API peers can read the token without any guessing πŸ’…. Using this format is REQUIRED for initial context establishment tokens of Internet standards-track GSS-API mechanisms. Using it in non-initial tokens is OPTIONAL.

The encoding is ASN.1 and DER flavoured πŸ¦‹ (there's an illustrative ASN.1 picture further down), but the actual bytes are spelled out directly in octets. That means you don't need general ASN.1 processing code to build it, which is honestly iconic of them. The token tag has these elements, in order:

  1. 0x60 is the tag for [APPLICATION 0] SEQUENCE. It means constructed form, with a definite length encoding following.
  2. Token length octets say how long the subsequent data is. That's the summed lengths of elements 3-5 in this list, plus the mechanism-defined token object after the tag. This element can be a variable number of octets:
    • 2a. If the value is less than 128, it's one octet with bit 8 (high order) set to "0", and the remaining bits hold the value.
    • 2b. If the value is 128 or more, it's two or more octets. Bit 8 of the first octet is set to "1", and the remaining bits of that first octet give the number of additional octets. The subsequent octets carry the value, 8 bits per octet, most significant digit first. The minimum number of octets SHALL be used to encode the length, so no octets representing leading zeros SHALL be included in the length encoding.
  3. 0x06 is the tag for OBJECT IDENTIFIER.
  4. Object identifier length is the length (number of octets) of the encoded object identifier in element 5, encoded per the rules in 2a. and 2b. above.
  5. Object identifier octets are a variable number of octets, encoded per ASN.1 BER rules:
    • 5a. The first octet is the sum of two values: (1) the top-level object identifier component, multiplied by 40 (decimal), and (2) the second-level object identifier component. This is the only point in an object identifier encoding where a single octet represents contents of more than one component. 🀯
    • 5b. Subsequent octets, if required, encode successively-lower components in the represented object identifier. A component's encoding may span multiple octets, encoding 7 bits per octet (most significant bits first), with bit 8 set to "1" on all but the final octet in the component's encoding. The minimum number of octets SHALL be used to encode each component, so no octets representing leading zeros SHALL be included within a component's encoding.

(Note: In many implementations, elements 3-5 MAY be stored and referenced as a contiguous string constant.)

The token tag is immediately followed by a mechanism-defined token object. There's no independent size specifier between the object identifier value and that token object, so the size isn't flagged separately. ASN.1 usage inside mechanism-defined tokens is permitted, but there is no requirement that the mechanism-specific innerContextToken, innerMsgToken, and sealedUserData data elements MUST employ ASN.1 BER/DER encoding conventions.

The ASN.1 syntax below is just there for descriptive purposes 🧚, to show how the token and tag objects relate to each other. For interoperability, token and tag encoding SHALL be performed using the concrete encoding procedures described earlier in this subsection.

      GSS-API DEFINITIONS ::=

      BEGIN

      MechType ::= OBJECT IDENTIFIER
      -- data structure definitions
      -- callers must be able to distinguish among
      -- InitialContextToken, SubsequentContextToken,
      -- PerMsgToken, and SealedMessage data elements
      -- based on the usage in which they occur

      InitialContextToken ::=
      -- option indication (delegation, etc.) indicated within
      -- mechanism-specific token
      [APPLICATION 0] IMPLICIT SEQUENCE {
              thisMech MechType,
              innerContextToken ANY DEFINED BY thisMech
                 -- contents mechanism-specific
                 -- ASN.1 structure not required
              }

      SubsequentContextToken ::= innerContextToken ANY
      -- interpretation based on predecessor InitialContextToken
      -- ASN.1 structure not required

      PerMsgToken ::=
      -- as emitted by GSS_GetMIC and processed by GSS_VerifyMIC
      -- ASN.1 structure not required
              innerMsgToken ANY

      SealedMessage ::=
      -- as emitted by GSS_Wrap and processed by GSS_Unwrap
      -- includes internal, mechanism-defined indicator
      -- of whether or not encrypted
      -- ASN.1 structure not required
              sealedUserData ANY

      END

3.2. Mechanism-Independent Exported Name Object Format πŸŽ€

This section is the mechanism-independent wrapper for names exported via GSS_Export_name(). It includes an object identifier for the exporting mechanism πŸ’–. The format of the names wrapped this way SHALL be defined within individual mechanism drafts. The Object Identifier value for names of this type is defined in Section 4.7 of this document.

No name type OID is included at this mechanism-independent level, because (depending on the mechanism specification) the enclosed name may be implicitly typed, or may be explicitly typed using something other than OID encoding.

The bytes within MECH_OID_LEN and NAME_LEN elements are represented most significant byte first (equivalently, in IP network byte order).

        Length    Name          Description

        2               TOK_ID          Token Identifier
                                        For exported name objects, this
                                        must be hex 04 01.
        2               MECH_OID_LEN    Length of the Mechanism OID
        MECH_OID_LEN    MECH_OID        Mechanism OID, in DER
        4               NAME_LEN        Length of name
        NAME_LEN        NAME            Exported name; format defined in
                                        applicable mechanism draft.

Here's a concrete example of an exported name object, taken from the Kerberos Version 5 mechanism 🌈:

   04 01 00 0B 06 09 2A 86 48 86 F7 12 01 02 02 hx xx xx xl pp qq ... zz

   04 01        mandatory token identifier

   00 0B        2-byte length of the immediately following DER-encoded
                ASN.1 value of type OID, most significant octet first

   06 09 2A 86 48 86 F7 12 01 02 02    DER-encoded ASN.1 value
                                       of type OID; Kerberos V5
                                       mechanism OID indicates
                                       Kerberos V5 exported name

          in Detail:      06                  Identifier octet (6=OID)
                          09                           Length octet(s)
                          2A 86 48 86 F7 12 01 02 02   Content octet(s)

   hx xx xx xl   4-byte length of the immediately following exported
                 name blob, most significant octet first

   pp qq ... zz  exported name blob of specified length,
                 bits and bytes specified in the
                 (Kerberos 5) GSS-API v2 mechanism spec

4. Name Type Definitions 🌈

This section has the definitions for name types and their syntaxes that are defined in a mechanism-independent way at the GSS-API level πŸ‘‘. They aren't defined in individual mechanism specifications, which is what makes them special.

4.1. Host-Based Service Name Form 🧚

This name form SHALL be represented by the Object Identifier:

   {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
   "gssapi(2) generic(1) service_name(4)}.

The recommended symbolic name for this type is "GSS_C_NT_HOSTBASED_SERVICE".

For compatibility with existing implementations, it is RECOMMENDED that this OID be used rather than the alternate value included in [RFC-2078]:

   {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
   2(gss-host-based-services)}

While it is NOT RECOMMENDED that this alternate value be emitted on output by GSS implementations, it is RECOMMENDED that it be accepted on input as equivalent to the recommended value. ✨

This name type is used to represent services associated with host computers 🏠. Support for this name form is RECOMMENDED to mechanism designers in the interests of portability, but it is not mandated by this specification. The name form is built from two elements, "service" and "hostname", like so:

   service@hostname

When a reference to a name of this type is resolved, the "hostname" MAY (as an example implementation strategy) be canonicalized by attempting a DNS lookup and using the fully-qualified domain name that comes back, or by using the "hostname" as provided if the DNS lookup fails. The canonicalization operation also maps the host's name into lower-case characters.

The "hostname" element MAY be omitted. If no "@" separator is included, the entire name is interpreted as the service specifier, with the "hostname" defaulted to the canonicalized name of the local host.

Documents that specify how GSS is integrated into a particular protocol SHOULD state either:

  • (a) that a specific IANA-registered name associated with that protocol SHALL be used for the "service" element (this admits, if needed, the possibility that a single name can be registered and shared among a related set of protocols), or
  • (b) that the generic name "host" SHALL be used for the "service" element, or
  • (c) that, for that protocol, fallback in specified order (a, then b) or (b, then a) SHALL be applied.

IANA registration of specific names per (a) SHOULD be handled in accordance with the "Specification Required" assignment policy, defined by BCP 26, RFC 2434 as follows: "Values and their meaning must be documented in an RFC or other available reference, in sufficient detail so that interoperability between independent implementations is possible."

4.2. User Name Form 🌸

This name form SHALL be represented by the Object Identifier {iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) generic(1) user_name(1)}. The recommended mechanism-independent symbolic name for this type is "GSS_C_NT_USER_NAME". (Note: the same name form and OID is defined within the Kerberos V5 GSS-API mechanism, but the symbolic name recommended there begins with a "GSS_KRB5_NT_" prefix. πŸ’…)

This name type is used to indicate a named user on a local system. Its syntax and interpretation MAY be OS-specific. The name form is constructed as:

   username

4.3. Machine UID Form ✨

okay so this name form shall be represented by the Object Identifier πŸ”’

{iso(1)
member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
generic(1) machine_uid_name(2)}

the recommended mechanism-independent symbolic name for this type is "GSS_C_NT_MACHINE_UID_NAME" πŸ’– (heads up: the same name form and OID is defined in the Kerberos V5 GSS-API mechanism too, but over there the symbolic name starts with "GSS_KRB5_NT_" instead πŸŽ€)

this name type is used to point at a numeric user identifier for a user on a local system 🧚 what that number means is OS-specific, so it's not the same everywhere. the gss_buffer_desc holding a name of this type should contain a locally-significant user ID, written in host byte order πŸ¦‹ then GSS_Import_name() turns that uid into a username, and that username gets treated as the User Name Form (section 4.2) ✨

4.4. String UID Form 🌸

this name form shall be represented by the Object Identifier 🫢

{iso(1)
member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
generic(1) string_uid_name(3)}

the recommended symbolic name for this type is "GSS_C_NT_STRING_UID_NAME" πŸ’… (same deal as before: the Kerberos V5 mechanism defines the same name form and OID, but its symbolic name begins with "GSS_KRB5_NT_")

this name type is used to indicate a string of digits that represents the numeric user identifier of a user on a local system πŸ”₯ its interpretation is OS-specific. it's basically the Machine UID Form's cousin, except the buffer holds a string representing the user ID instead of the number itself πŸ“

4.5. Anonymous Nametype πŸ™ˆ

the following Object Identifier value exists so you can identify anonymous names πŸ‘€ you can compare against it to figure out, in a mechanism-independent way, whether a name refers to an anonymous principal:

{1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
3(gss-anonymous-name)}

the recommended symbolic name for this is GSS_C_NT_ANONYMOUS 🌈

4.6. GSS_C_NO_OID 🧚

the recommended symbolic name GSS_C_NO_OID corresponds to a null input value instead of an actual object identifier 🫧 where it's specified, it means the associated name gets interpreted using a mechanism-specific default printable syntax πŸ’œ

4.7. Exported Name Object πŸ“¦

name objects of the Mechanism-Independent Exported Name Object type, as defined in Section 3.2 of this document, get identified with the following Object Identifier πŸŽ€

{1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
4(gss-api-exported-name)}

the recommended symbolic name for this is GSS_C_NT_EXPORT_NAME ✨

4.8. GSS_C_NO_NAME πŸ«₯

the recommended symbolic name GSS_C_NO_NAME means that no name is being passed in a particular parameter value that's used to transfer names. quick note: GSS_C_NO_NAME is not an actual name type, and it doesn't have an OID πŸ™…β€β™€οΈ it's only acceptable in place of a real name for specific calls (GSS_Acquire_cred(), GSS_Add_cred(), and GSS_Init_sec_context()), with the usages this spec lists πŸ’…


5. Mechanism-Specific Example Scenarios 🎬

okay this section is basically illustrative overviews of how different candidate mechanism types can support the GSS-API πŸ¦‹ it's mostly for readers who already know specific security tech, showing how GSS-API functions can be used and implemented by those underlying mechanisms. they shouldn't be treated as constrictive to implementations, or as the only way GSS-API functions can be realized with a particular underlying technology πŸ™ƒ and they don't show off every GSS-API feature with each technology either 🌸

5.1. Kerberos V5, single-TGT 🎫

OS-specific login functions give you a TGT from the local realm Kerberos server πŸ”‘ that TGT gets placed in a credentials structure for the client. then the client calls GSS_Acquire_cred() to get a cred_handle, so it can reference those credentials when establishing security contexts πŸ’–

next, the client calls GSS_Init_sec_context(). if the requested service lives in a different realm, GSS_Init_sec_context() grabs the TGT/key pairs needed to travel the path from the local realm to the target realm πŸ—ΊοΈ that data goes into the owner's TGT cache. after any needed remote realm resolution, GSS_Init_sec_context() gets a service ticket for the requested service, plus a matching session key 🎟️ those get stored along with the context. the GSS-API code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP response(s) in the successful case, or a KRB_ERROR 😭

assuming all goes well, GSS_Init_sec_context() builds a Kerberos-formatted KRB_AP_REQ message and returns it in output_token πŸŽ€ the client then sends that output_token to the service πŸ’Œ

the service passes the received token as the input_token argument to GSS_Accept_sec_context() ✨ that call verifies the authenticator, gives the service the client's authenticated name, and returns an output_context_handle πŸ‘‘

now both parties hold the session key tied to the service ticket, and they can use it in later GSS_GetMIC(), GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() operations 🫢

5.2. Kerberos V5, double-TGT 🌈

TGT acquisition works just like above πŸ”

Note: to avoid unnecessary, frequent invocations of error paths when implementing the GSS-API atop Kerberos V5, it seems appropriate to represent "single-TGT K-V5" and "double-TGT K-V5" with separate mech_types, and this discussion makes that assumption. 🧠

based on the (specified or defaulted) mech_type, GSS_Init_sec_context() figures out that the double-TGT protocol should be used for the specified target πŸ’… it returns a GSS_S_CONTINUE_NEEDED major_status, and its returned output_token holds a request asking the service for the service's TGT. (if a service TGT with a suitably long remaining lifetime already sits in a cache, it might be usable, so this step could be skipped πŸ™ˆ) the client passes the output_token to the service.

Note: this scenario shows a different use for the GSS_S_CONTINUE_NEEDED status return facility than the one used for supporting mutual authentication πŸ€“ both uses can coexist as successive operations inside a single context establishment operation.

the service passes the received token as the input_token argument to GSS_Accept_sec_context(), which recognizes it as a request for a TGT πŸ₯Ί (fun fact: current Kerberos V5 defines no intra-protocol mechanism to represent such a request πŸ’€) then GSS_Accept_sec_context() returns a GSS_S_CONTINUE_NEEDED major_status and provides the service's TGT in its output_token 🎁 the service sends that output_token to the client.

the client passes the received token as the input_token argument to a continuation of GSS_Init_sec_context(). that call caches the received service TGT and uses it as part of a service ticket request to the Kerberos authentication server 🎫 it stores the returned service ticket and session key along with the context. then GSS_Init_sec_context() builds a Kerberos-formatted authenticator, returns it in output_token alongside a GSS_S_COMPLETE return major_status ✨ the client sends that output_token to the service.

the service passes the received token as the input_token argument to a continuation call to GSS_Accept_sec_context() πŸ’– that verifies the authenticator, gives the service the client's authenticated name, and returns major_status GSS_S_COMPLETE πŸŽ‰

GSS_GetMIC(), GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap() work just like above 🫧

5.3. X.509 Authentication Framework πŸ”

this example shows how the GSS-API gets used alongside public-key mechanisms, consistent with the X.509 Directory Authentication Framework 🌸

the GSS_Acquire_cred() call sets up a credentials structure, which makes the client's private key accessible for use on the client's behalf πŸ”‘

the client calls GSS_Init_sec_context(), which interrogates the Directory to acquire (and validate) a chain of public-key certificates. that's how it collects the service's public key πŸ•΅οΈβ€β™€οΈ the certificate validation step determines that suitable integrity checks were applied by trusted authorities and that the certificates haven't expired ⏳ then GSS_Init_sec_context() generates a secret key for per-message protection operations on the context, and enciphers that secret key under the service's public key 🀫

the enciphered secret key, along with an authenticator quantity signed with the client's private key, gets included in the output_token from GSS_Init_sec_context() πŸ’Œ the output_token also carries a certification path, which is a certificate chain leading from the service to the client. a variant approach would instead defer this path resolution to the service, rather than having the client assert it πŸ¦‹ the client application sends the output_token to the service.

the service passes the received token as the input_token argument to GSS_Accept_sec_context(). that call validates the certification path and, as a result, determines a certified binding between the client's distinguished name and the client's public key πŸ“œ with that public key in hand, GSS_Accept_sec_context() can process the input_token's authenticator quantity and verify that the client's private key was used to sign the input_token βœ… at this point the client is authenticated to the service πŸŽ€ the service uses its private key to decipher the enciphered secret key it was given for per-message protection operations on the context πŸ—οΈ

the client calls GSS_GetMIC() or GSS_Wrap() on a data message, which causes per-message authentication, integrity, and (optional) confidentiality facilities to be applied to that message πŸ’œ the service uses the context's shared secret key to perform the matching GSS_VerifyMIC() and GSS_Unwrap() calls 🫢


6. Security Considerations 🚨

this document specifies a service interface for security facilities and services, so security considerations come up all throughout the spec πŸ‘€ still, it's worth summarizing certain specific points that matter for GSS-API implementors and calling applications πŸ’…

using the GSS-API interface doesn't, on its own, provide security services or assurance 😀 those attributes depend on the underlying mechanism(s) that support a GSS-API implementation. callers have to pay close attention to the requests they make to GSS-API calls, and to the status indicators GSS-API returns, because those specify the security service characteristics that GSS-API will provide πŸ”

when the interprocess context transfer facility is used, appropriate local controls should be applied to constrain access to interprocess tokens and to the sensitive data they contain 🚨 this one is serious, bestie, so lock those tokens down πŸ”’

in order to implement the GSS-API atop existing, emerging, and future security mechanisms, a few things need to happen πŸ“‹

  • object identifiers must be assigned to candidate GSS-API mechanisms and to the name types they support πŸ”’
  • concrete data element formats and processing procedures must be defined for candidate mechanisms 🧩

calling applications must implement formatting conventions that let them tell GSS-API tokens apart from other data carried in their application protocols 🏷️

concrete language bindings are required for the programming environments where the GSS-API is going to be employed πŸ’» as [RFC-1509] defines for the C programming language and GSS-V1, and C language bindings for GSS-V2 are defined in [RFC-2744] 🌈

8. Referenced Documents πŸ“šβœ¨

okay bestie, here's every doc this spec is built on, so you can go read the source if you want the full tea 🫢

[ISO-7498-2] International Standard ISO 7498-2-1988(E), Security Architecture.

[ISOIEC-8824] ISO/IEC 8824, "Specification of Abstract Syntax Notation One (ASN.1)".

[ISOIEC-8825] ISO/IEC 8825, "Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1)".)

[RFC-1507]: Kaufman, C., "DASS: Distributed Authentication Security Service", RFC 1507, September 1993.

[RFC-1508]: Linn, J., "Generic Security Service Application Program Interface", RFC 1508, September 1993.

[RFC-1509]: Wray, J., "Generic Security Service API: C-bindings", RFC 1509, September 1993.

[RFC-1964]: Linn, J., "The Kerberos Version 5 GSS-API Mechanism", RFC 1964, June 1996.

[RFC-2025]: Adams, C., "The Simple Public-Key GSS-API Mechanism (SPKM)", RFC 2025, October 1996.

[RFC-2078]: Linn, J., "Generic Security Service Application Program Interface, Version 2", RFC 2078, January 1997.

[RFC-2203]: Eisler, M., Chiu, A. and L. Ling, "RPCSEC_GSS Protocol Specification", RFC 2203, September 1997.

[RFC-2744]: Wray, J., "Generic Security Service API Version 2 : C-bindings", RFC 2744, January 2000.


Appendix A. Mechanism Design Constraints πŸ’…

okay so these are the constraints on GSS-API mechanism designs πŸŽ€ they got added because callers kept showing up with the same needs, and the plan is that future standards-track mechanism specs follow them 🌈

it is strongly recommended that mechanisms offering per-message protection services also offer at least one of the replay detection and sequencing services πŸ”₯ the reason is literally that mechanisms offering neither of those will fail to meet recognized requirements of certain candidate caller protocols πŸ’€


Appendix B. Compatibility with GSS-V1 πŸ¦‹

the whole point of this doc is to keep GSS-V1 [RFC-1508] callers and GSS-V2 providers compatible with each other 🫢 every GSS-V1 call is preserved, and GSS-V1 callers were always meant to be able to run on top of GSS-V2 providers ✨ there are some detailed changes, summarized in this section, that got made to fix omissions found in GSS-V1 πŸ”§

these GSS-V1 constructs are still supported in GSS-V2, but they're deprecated πŸ₯€

  • Names for per-message processing routines: GSS_Seal() deprecated in favor of GSS_Wrap(); GSS_Sign() deprecated in favor of GSS_GetMIC(); GSS_Unseal() deprecated in favor of GSS_Unwrap(); GSS_Verify() deprecated in favor of GSS_VerifyMIC().
  • GSS_Delete_sec_context() facility for context_token usage, allowing mechanisms to signal context deletion, is retained for compatibility with GSS-V1. For current usage, it is recommended that both peers to a context invoke GSS_Delete_sec_context() independently, passing a null output_context_token buffer to indicate that no context_token is required. Implementations of GSS_Delete_sec_context() should delete relevant locally-stored context information.

this GSS-V2 spec adds these calls that weren't in GSS-V1 🌸

  • Credential management calls: GSS_Add_cred(), GSS_Inquire_cred_by_mech().
  • Context-level calls: GSS_Inquire_context(), GSS_Wrap_size_limit(), GSS_Export_sec_context(), GSS_Import_sec_context().
  • Per-message calls: No new calls. Existing calls have been renamed.
  • Support calls: GSS_Create_empty_OID_set(), GSS_Add_OID_set_member(), GSS_Test_OID_set_member(), GSS_Inquire_names_for_mech(), GSS_Inquire_mechs_for_name(), GSS_Canonicalize_name(), GSS_Export_name(), GSS_Duplicate_name().

this spec also introduces three new facilities for security contexts 🧚 they're indicated with these context state values, which GSS-V1 doesn't have:

  • anon_state, set TRUE to indicate that a context's initiator is anonymous from the viewpoint of the target. Section 1.2.5 of this specification provides a summary description of the GSS-V2 anonymity support facility, support and use of which is optional.
  • prot_ready_state, set TRUE to indicate that a context may be used for per-message protection before final completion of context establishment. Section 1.2.7 of this specification provides a summary description of the GSS-V2 facility enabling mechanisms to selectively permit per-message protection during context establishment, support and use of which is optional.
  • trans_state, set TRUE to indicate that a context is transferable to another process using the GSS-V2 GSS_Export_sec_context() facility.

at the C bindings level, these state values live in bit vector positions that GSS-V1 doesn't use, so GSS-V1 callers can safely ignore them πŸ™ˆ

new conf_req_flag and integ_req_flag inputs are defined for GSS_Init_sec_context(), mainly to give info to negotiating mechanisms ✨ this creates a compatibility issue with GSS-V1 callers, which is discussed in section 2.2.1 of this specification πŸ‘€

compared to GSS-V1, GSS-V2 gives GSS-API implementors extra guidance in these areas: implementation robustness, credential management, behavior in multi-mechanism configurations, naming support, and inclusion of optional sequencing services πŸ’– the token tagging facility in GSS-V2, Section 3.1, is now described directly in terms of octets, so you can build interoperable implementations without general ASN.1 processing code πŸŽ€ the matching ASN.1 syntax is still included for descriptive purposes, and it's unchanged from GSS-V1 🧁 for the new naming support, there's a new Exported Name Object construct, and more name types show up in Section 4 🌈

this GSS-V2 spec adds these major_status values that GSS-V1 doesn't define πŸ‘‘

     GSS_S_BAD_QOP                 unsupported QOP value
     GSS_S_UNAUTHORIZED            operation unauthorized
     GSS_S_UNAVAILABLE             operation unavailable
     GSS_S_DUPLICATE_ELEMENT       duplicate credential element
                                     requested
     GSS_S_NAME_NOT_MN                   name contains multi-mechanism
                                     elements
     GSS_S_GAP_TOKEN               skipped predecessor token(s)
                                     detected

out of those added status codes, only two can be returned by calls that already exist in GSS-V1: GSS_S_BAD_QOP (returnable by GSS_GetMIC() and GSS_Wrap()), and GSS_S_GAP_TOKEN (returnable by GSS_VerifyMIC() and GSS_Unwrap()) 🫢

also, GSS-V2 descriptions of some GSS-V1 calls now allow more major_status values from the GSS-V1 set to be returned πŸ’… GSS_Inquire_cred() can now return GSS_S_DEFECTIVE_CREDENTIAL and GSS_S_CREDENTIALS_EXPIRED, GSS_Init_sec_context() can now return GSS_S_OLD_TOKEN, GSS_S_DUPLICATE_TOKEN, and GSS_S_BAD_MECH, and GSS_Accept_sec_context() can now return GSS_S_BAD_MECH ✨


Appendix C 🌸

CHANGES RELATIVE TO RFC-2078 πŸŽ€

okay bestie, this is the glow-up recap πŸ’… it's basically a list of everything that got changed from RFC-2078, mostly because people actually built stuff and hit problems. it also lines things up with the GSS-V2 C bindings doc and adds some extra clarifying info. let's gooo 🧚

General

  • Clarified how object release routines get used, and added a note that some of them can be left out in certain operating environments 🫢
  • Removed the GSS_Release_OID, GSS_OID_to_str(), and GSS_Str_to_OID() routines πŸ’€
  • Clarified when zero-length tokens can validly show up as inputs and outputs to and from GSS-API calls 🌸
  • Added the GSS_S_BAD_MIC status code as an alias for GSS_S_BAD_SIG ✨
  • For GSS_Display_status(), the choice between returning multiple status values in parallel or through iteration got handed off to the language bindings. Also added commentary deprecating the return of GSS_S_CONTINUE_NEEDED πŸ™ˆ
  • Adapted and added clarifying material on optional service support, delegation, and interprocess context transfer, borrowed from the C bindings doc πŸ’œ
  • Added and updated references to related documents, plus the current status of the cited Kerberos mechanism OID πŸ“š
  • Added a general statement that GSS-API calls have no side effects visible at the GSS-API level πŸ¦‹
  • Clarified GSS_Delete_sec_context() usage for partially-established contexts πŸ“
  • Added clarification on GSS_Export_sec_context() and GSS_Import_sec_context() behavior, and on context usage following an export-import sequence πŸ”₯
  • Added informatory conf_req_flag and integ_req_flag inputs to GSS_Init_sec_context(). Heads up, this facility introduces a backward incompatibility with GSS-V1 callers, which is discussed in Section 2.2.1. The working group saw this implication and accepted it πŸ‘‘
  • Stated that GSS_S_FAILURE is to be returned if GSS_Init_sec_context() or GSS_Accept_sec_context() gets passed the handle of a context that's already fully established 🌈
  • For GSS_Inquire_sec_context(), stated that src_name and targ_name aren't returned until GSS_S_COMPLETE status is reached. Removed the GSS_S_CONTEXT_EXPIRED status code (replaced by the EXPIRED lifetime return value). Stated the requirement to keep inquirable data around until the caller releases the context. Added a result value that says whether or not the context is fully open ⭐
  • Added discussion of interoperability conditions for mechanisms that permit optional support of QOPs. Removed the reference to structured QOP elements in GSS_Verify_MIC() 🫢
  • Added discussion of using GSS_S_DUPLICATE_TOKEN to flag reflected per-message tokens πŸ™ˆ
  • Clarified how informational sequencing codes from per-message protection calls work alongside GSS_S_COMPLETE and GSS_S_FAILURE major_status returns, and adjusted the status code descriptions to match πŸ¦‹
  • Added specific statements about how GSS_GetMIC() and GSS_Wrap() failures affect context state information. Also generalized the existing statements about how processing failures affect received per-message tokens πŸ’…
  • For GSS_Init_sec_context() and GSS_Accept_sec_context(), the returned mech_type is now allowed to be valid before GSS_S_COMPLETE, since it may change across successive continuation calls in the negotiated mechanism case 🌸
  • Deleted the GSS_S_CONTEXT_EXPIRED status from GSS_Import_sec_context() πŸ’€
  • Added a conf_req_flag input to GSS_Wrap_size_limit() ✨
  • Stated the requirement that mechanisms' per-message protection services must be usable concurrently in both directions on a context πŸ”₯
  • For GSS_Acquire_cred() and GSS_Add_cred(), aligned with the C bindings statement that INITIATE or BOTH credentials likely won't be supported if the input name is neither empty nor a name resulting from applying GSS_Inquire_cred() against the default credential. Also stated that an explicit name returned by GSS_Inquire_context() should be accepted too. Added commentary about how default resolution results can change over time, and what that means 🧚
  • Aligned with the C bindings for what happens when GSS_C_NO_NAME is provided for desired_name. In GSS_Acquire_cred(), stated that NULL, not an empty OID set, should be used for desired_mechs when you want the default mechanism set πŸŽ€
  • Added GSS_S_CREDENTIALS_EXPIRED as a returnable major_status for GSS_Acquire_cred() and GSS_Add_cred(). Also specified GSS_S_NO_CRED as the right return for temporary credential unavailability that the user can fix. GSS_Acquire_cred() and GSS_Add_cred() also return GSS_S_NO_CRED if an authorization failure happens during credential acquisition πŸ”₯
  • Removed the GSS_S_CREDENTIALS_EXPIRED status return from per-message protection, GSS_Context_time(), and GSS_Inquire_context() calls πŸ™ˆ
  • For GSS_Add_cred(), aligned with the C bindings' description of what happens when adding elements to the default credential is requested πŸ‘‘
  • Upgraded the recommended default credential resolution algorithm to the status of a requirement for initiator credentials πŸ’œ
  • For GSS_Release_cred(), GSS_Inquire_cred(), and GSS_Inquire_cred_by_mech(), clarified the behavior for input GSS_C_NO_CREDENTIAL πŸ“
  • Aligned the GSS_Inquire_mechs_for_name() description with the C bindings 🌈
  • Removed the GSS_S_BAD_NAMETYPE status return from GSS_Duplicate_name() and GSS_Display_name(), and constrained its applicability for GSS_Compare_name() ⭐
  • Aligned with the C bindings statement about GSS_Import_name() behavior with a GSS_C_NO_OID input name type. Stated that GSS-V2 mechanism specifications are to define the processing procedures that apply to their mechanisms. Also clarified GSS_C_NO_OID usage with GSS_Display_name() πŸ¦‹
  • Downgraded the reference to name canonicalization via DNS lookup to an example 🫢
  • For GSS_Canonicalize_name(), stated that neither negotiated mechanisms nor the default mechanism are supported input mech_types for this operation, and specified that GSS_S_BAD_MECH is returned in this case. Clarified that GSS_Canonicalize_name() is non-destructive to its input name 🧚
  • Clarified the semantics of the GSS_C_NT_USER_NAME name type πŸ’…
  • Added descriptions of additional name types. Also added discussion of GSS_C_NO_NAME and its constrained usage with specific GSS calls ✨
  • Adapted and added C bindings discussion about name comparisons with exported name objects 🌸
  • Added a recommendation to mechanism designers for supporting the host-based service name type, leaving any requirement statement to individual mechanism specifications. Also added discussion of the host-based service's service name element and the proposed approach for IANA registration policy for it πŸŽ€
  • Clarified the byte ordering within an exported name object. Stated that GSS_S_BAD_MECH is to be returned if, while trying to import an exported name object, the name object's enclosed mechanism type is unrecognized or unsupported πŸ”₯
  • Stated that mechanisms may optionally accept GSS_C_NO_NAME as an input target name to GSS_Init_sec_context(). Added a comment that such support is unlikely within mechanisms predating GSS-V2, Update 1 🌈

AUTHOR'S ADDRESS πŸ¦‹

John Linn
RSA Laboratories
20 Crosby Drive
Bedford, MA  01730 USA

Phone: +1 781.687.7817
EMail: jlinn@rsasecurity.com

Copyright (C) The Internet Society (2000). All Rights Reserved.

This document and translations of it may be copied and furnished to others. Derivative works that comment on or explain it, or help with its implementation, may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind. The one condition is that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations. The exception is when it's needed for developing Internet standards, in which case the procedures for copyrights defined in the Internet Standards process must be followed. Translating it into languages other than English is also allowed.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. πŸ’€


Acknowledgement πŸ’–

Funding for the RFC Editor function is currently provided by the Internet Society. 🫢

πŸ“¦ where this page comes from