Internet Engineering Task Force (IETF) S. Josefsson Request for Comments: 6339 SJD AB Category: Standards Track L. Hornquist Astrand ISSN: 2070-1721 Apple, Inc. August 2011
Context Token Encapsulate/Decapsulate and OID Comparison Functions for the Generic Security Service Application Program Interface (GSS-API)
This document describes three abstract Generic Security Service Application Program Interface (GSS-API) interfaces used to encapsulate/decapsulate context tokens and compare OIDs. This document also specifies C bindings for the abstract interfaces.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The Generic Security Service Application Program Interface (GSS-API) [RFC2743] is a framework that provides security services to applications using a variety of authentication mechanisms. There are widely implemented C bindings [RFC2744] for the abstract interface.
For initial context tokens, a mechanism-independent token format may be used (see Section 3.1 of [RFC2743]). Some protocols, e.g., Simple Authentication and Security Layer (SASL) GS2 [RFC5801], need the ability to add and remove this token header, which contains some ASN.1 tags, a length, and the mechanism OID to and from context tokens. This document adds two GSS-API interfaces (GSS_Encapsulate_token and GSS_Decapsulate_token) so that GSS-API libraries can provide this functionality.
Being able to compare OIDs is useful, for example, when validating that a negotiated mechanism matches the requested one. This document adds one GSS-API interface (GSS_OID_equal) for this purpose.
Text from this specification can be used as implementation documentation, and for this reason, Sections 3, 4, 5, 6, and 8 should be considered code components.
The document uses terms from, and is structured in a similar way as, [RFC2743] and [RFC2744]. The normative reference to [RFC5587] is for the C types "gss_const_buffer_t" and "gss_const_OID"; nothing else from that document is required to implement this document.
For the GSS_Encapsulate_token function, if the "input_token" buffer is the 3-byte octet sequence "foo" and the "token_oid" OID is 1.2.840.113518.104.22.168, which encoded corresponds to the 9-byte-long octet sequence (using C notation) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02", the output should be the 16-byte-long octet sequence (again in C notation) "\x60\x0e\x06\x09\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x66\x6f\x6f". These values may also be used to test the GSS_Decapsulate_token interface.
Greg Hudson pointed out the 'const' problem with the C bindings in earlier versions of this document, and Luke Howard suggested to resolve it by using the [RFC5587] types. Stephen Farrell suggested several editorial improvements and the security consideration regarding absent security features of the encapsulation function. Chris Lonvick suggested some improvements.
The security considerations of the base GSS-API specification ([RFC2743]) and the base C bindings ([RFC2744]) are inherited.
Encapsulation of data does not provide any kind of integrity or confidentiality.
Implementations need to treat input as potentially untrustworthy for purposes of dereferencing memory objects to avoid security vulnerabilities. In particular, ASN.1 DER length fields are a common source of mistakes.
[RFC5801] Josefsson, S. and N. Williams, "Using Generic Security Service Application Program Interface (GSS-API) Mechanisms in Simple Authentication and Security Layer (SASL): The GS2 Mechanism Family", RFC 5801, July 2010.
Simon Josefsson SJD AB Hagagatan 24 Stockholm 113 47 SE