Warning: This HTML rendition of the RFC is experimental. It is programmatically generated, and small parts may be missing, damaged, or badly formatted. However, it is much more convenient to read via web browsers, however. Refer to the PostScript or text renditions for the ultimate authority.

OSF DCE SIG J. Wray (DEC)
Request For Comments: 5.2 March 1994

GSS-API EXTENSIONS FOR DCE

INTRODUCTION AND CONTEXT

Several standards activities based on the Generic Security Service Application Program Interface (GSS-API) are currently underway or under consideration:

  1. Within the IETF, the GSS-API specifications have now advanced to Proposed Standard RFC status as RFC 1508 (high-level specification, [GSSAPI]) and RFC 1509 (C-Bindings, [GSSAPI-C]).
  2. Derived UK Expert contribution ("GSAI") by Nick Pope, consultant to ICL, to ISO SC21/WG6.
  3. Adoption by X/Open Security Working Group, and possible liaison between that group and IETF-CAT.
  4. Consideration by POSIX Distributed Security committee.

There appears to be relatively general acceptance of GSS-API within its present scope of establishing security contexts, performing peer-entity authentication, and yielding shared keys for use in integrity and confidentiality protection of data messages. Many of the activities listed above desire extensions to support authorization features (e.g., indication of group affiliations or other attributes) over and above pure authentication of principal names. We expect to proceed with standards advancement of the current specification, and to position added authorization features as optional extensions for certain environments.

DCE EXTENSIONS

This section defines the specific GSS-API extensions being proposed to OSF for implementation and incorporation within DCE V1.1. In addition to the routines described herein, the complete base GSS-API, as defined in Internet RFCs 1508 and 1509, will be implemented. Specific issues to be resolved in the course of implementing GSS-API over the DCE security mechanism are also identified.

The DCE GSS-API is oriented to the DCE 1.1 operational paradigm in which credentials (represented by chained EPACs) are opaque objects from the viewpoint of applications, and their contents are interpreted within ACL managers which access the data stored within credentials through the new sec_cred_* interrogation interface.

The goal of the DCE GSS-API is to provide non-RPC applications operating within a DCE environment the ability to use the DCE Shared-Secret authentication protocol (and, in future, other authentication protocols) via the GSS-API, and to make use of the DCE Authorization protocol in addition to Name-Based Authorization as supported through the existing GSS-API. This support is intended to afford such applications security features and integration paradigms which are analagous to those which DCE currently affords to RPC-based applications. There is no intent that DCE RPC runtimes will be restructured so as to layer atop GSS-API. Applications making use of the proposed extension will not be portable to non-DCE authorization support environments; received DCE credentials are not assumed to be interpretable by arbitrary non-DCE ACL managers.

This work does not extend the scope of GSS-API to incorporate login functions; currently specified DCE 1.1 "sec_login_*" primitives remain unchanged. This group of DCE primitives includes functions which create a login context, allow a variant login context to be created designating a subset of group memberships or other permissible registry attributes, to annotate login contexts with delegation restrictions, and to import and export login contexts among processes.

DCE login contexts correspond roughly to GSS-API INITIATE-type credentials, and should not be confused with GSS-API security contexts which are pairwise security associations between peers. Conceptually, credentials structures are paired with corresponding login contexts, so that, e.g., a modification to a DCE login context will affect subsequent references to the associated GSS-API credentials. Caller references to default GSS-API credentials for security-context initiation will correspond to the current DCE login context; a gssdce_login_context_to_cred() call is defined for use by those callers (probably to be in the minority) which need to select among alternative credentials sets. Further, already-defined GSS-API per-message primitives can enable applications to protect their transferred data with integrity and confidentiality services.

In use, the GSS-API routines themselves do not generate network traffic (or interprocess communication of any sort) between communicating peer applications. It is true that GSS-API routines typically do generate some network traffic in order to acquire authentication tokens to return to their calling application, but such network traffic is targeted to some sort of "token authority" (depending on the implementation), not to the calling application's communicating peer. It is the responsibility of the calling application itself to encapsulate the returned tokens within a communications protocol, and transfer them to the communicating peer.

In the case of DCE, the token authority from which authentication tokens are acquired is DCE's authentication service (working in concert with DCE's privilege and registry services), as embodied in the DCE security daemon ("secd"). Therefore, the DCE 1.1 GSS-API implementation will acquire its tokens using the existing DCE RPC interfaces to secd.

Note that token acquisition is not the only place that GSS-API might generate network traffic (for example, to translate between names and UUID's, or to create security contexts). The exact places network traffic will get generated can be a bit unpredictable, since both the GSS-API implementation and DCE security use a fair amount of caching. In any case, wherever such network traffic is generated by the DCE GSS-API implementation, it will be done via existing DCE RPC interfaces.

Extension Definition

This subsection defines the extension GSS-API primitives to be added for DCE support. These routines will be provided in addition to all routines defined in the GSS-API base specification (Internet RFCs 1508 and 1509).

gssdce_extract_creds_from_sec_context

This routine is used by a context acceptor to extract the client DCE credentials (if any) representing the privilege attributes of the security context's initiator. The security context's initiator may be acting on its own behalf, or it may be acting as a delegate for a third party. Credentials will be transferred as elements of the context establishment tokens; the gssdce_extract_creds_from_sec_context() primitive should not be invoked until context establishment is complete.

Inputs:

  1. context_handle INTEGER -- GSS-API security context handle

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. output_creds OCTET STRING

Return major_status codes:

  1. GSS_COMPLETE indicates that the returned output_creds result carries a DCE credentials handle.
  2. GSS_NO_CONTEXT indicates that no valid context was recognized for the input context_handle provided.
  3. GSS_FAILURE indicates that the operation failed for reasons unspecified at the GSS-API level.

gssdce_extract_creds_from_cred

This routine is used by a context peer to extract the DCE credentials (if any) representing the privilege attributes of the original intiator of a GSSAPI credentials structure. It is typically used in a delegation environment by a context acceptor wishing to determine the identity of the client on whose behalf the acceptor would authenticate were the GSSAPI credential used to initiate a security context. It can also be used to obtain the identity and rights of the originator principal of any credential suitable for initiating security contexts.

Inputs:

  1. cred_handle OCTET STRING -- GSS-API credential handle, NULL specifies default credentials

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. output_creds OCTET STRING

Return major_status codes:

  1. GSS_COMPLETE indicates that the returned output_creds result carries an DCE credentials object.
  2. GSS_NO_CRED indicates that it was not possible to determine or indicate whether or not DCE credentials were associated with the specified credential structure, because the input cred_handle was either invalid or denotes a credential suitable only for accepting security contexts.
  3. GSS_FAILURE indicates that the credentials extraction operation failed for reasons unspecified at the GSS-API level.

gssdce_login_context_to_cred

This call, a variant of the GSS-API gss_acquire_cred() call, is provided for use by those callers who need, through an explicit GSS-API credential handle, to make use of GSS-API credentials sets corresponding to other than their current DCE login context. gss_acquire_cred cannot be used in a DCE environment to create INITIATE-type credentials for any identity other than that associated with the process' default login context, since DCE provides no way for GSS-API to search a process' available login-contexts by principal name.

The desired_mechs input parameter allows callers to request credentials suitable for use with a Kerberos V5 mechanism as well as with the DCE Security mechanism.

Inputs:

  1. login_context OCTET STRING
  2. lifetime_req INTEGER -- in seconds; 0 requests default
  3. desired_mechs SET OF OBJECT IDENTIFIER -- empty set requests default
  4. cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, 2=ACCEPT-ONLY

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. output_cred_handle OCTET STRING
  4. lifetime_rec INTEGER -- in seconds, or reserved value for INDEFINITE

Return major_status codes:

  1. GSS_COMPLETE indicates that requested credentials were successfully established, for the duration indicated in lifetime_rec, suitable for the usage requested in cred_usage, and for all or a subset of the requested mech_types, and that those credentials can be referenced for subsequent use with the handle returned in output_cred_handle.
  2. GSS_BAD_MECH indicates that a mech_type unsupported by the GSS-API implementation was requested, causing the credential establishment operation to fail.
  3. GSS_FAILURE indicates that credential establishment failed for other reasons not distinguished at the GSS-API level.

gssdce_cred_to_login_context

This routine makes it possible to obtain a reference to the DCE login context on which a GSS-API credential, suitable for initiating security contexts, is based. The primary use of this call will be to enable the recipients of delegations via GSS-API to make use of the delegated rights in subsequent operations (e.g., DCE RPC) which are based on login contexts rather than credential handles, to add further delegation restrictions to a delegated login-context, or for interrogation using the sec_cred_ primitives.

Inputs:

  1. input_cred_handle OCTET STRING

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. login_context OCTET STRING

Return major_status codes:

  1. GSS_COMPLETE indicates that the requested login context was successfully established base on the input credentials.
  2. GSS_FAILURE indicates that no login context could be established, for other reasons undistinguished at the GSS-API level.

gssdce_register_acceptor_identity

This routine corresponds to the rpc_server_register_auth_info routine (and is in fact merely a jacket to that routine). It allows a GSS-API context-acceptor to specify the use of alternate keytables for constructing credentials suitable for accepting security contexts, or for expanding the scope of the default acceptor credential.

Inputs:

  1. server_principal_name OCTET STRING
  2. get_key_fn ADDRESS
  3. arg ADDRESS

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER

Return major_status codes:

  1. GSS_COMPLETE indicates that GSS-API will obtain keys for the specified principal using the specified key retrieval function and parameter. DCE RPC documentation describes these parameters in detail.
  2. GSS_FAILURE indicates that the principal name could not be registered for reasons undistinguished at the GSS-API level.

gssdce_release_oid

This is a convenience routine for deallocating memory associated with ISO Object Identifier (OID) values. GSS-API uses OID values for naming security mechanisms and name-types. This routine deallocates (via free()) the storage associated with such OIDs, except for those OID values that are supplied as constants with the GSS-API implementation (for which it becomes a no-op). Thus an application may safely mix its own OID values with the constant OIDs supplied by GSS-API.

Inputs:

  1. OID OBJECT IDENTIFIER

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER

Return major_status codes:

  1. GSS_COMPLETE indicates that storage associated with the OID has been released, or that the OID was one of the GSS-API constant OIDs.
  2. GSS_FAILURE indicates that the OID could not be released for reasons undistinguished at the GSS-API level.

gssdce_create_empty_oid_set

This is a convenience routine that creates an empty set of Object Identifiers. Object Identifier sets are used by GSS-API to name sets of security mechanisms. This routine is intended to be used in conjunction with the gssdce_add_oid_set_member routine, to construct sets of desired security mechanisms for input to gss_acquire_cred or gssdce_login_context_to_cred.

Inputs: none.

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. OID_set SET of OBJECT IDENTIFIER

Return major_status codes:

  1. GSS_COMPLETE indicates that the OID_set argument contains an empty OID set.
  2. GSS_FAILURE indicates that an OID set could not be created for reasons undistinguished at the GSS-API level.

gssdce_add_oid_set_member

This is a convenience routine that adds a specified Object Identifier to a set of object identifiers. Object Identifier sets are used by GSS-API to name sets of security mechanisms. This routine is intended to be used in conjunction with the gssdce_create_empty_oid_set routine, to construct sets of desired security mechanisms for input to gss_acquire_cred or gssdce_login_context_to_cred.

Inputs:

  1. OID_set SET of OBJECT IDENTIFIER
  2. Member_OID OBJECT IDENTIFIER

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. OID_set SET of OBJECT IDENTIFIER

Return major_status codes:

  1. GSS_COMPLETE indicates that the OID_set argument holds an OID set containing the specified Member_OID in addition to all the members of the original OID set.
  2. GSS_FAILURE indicates that the OID set could not be extended for reasons undistinguished at the GSS-API level.

gssdce_test_oid_set_member

This is a convenience routine that determines whether a specified Object Identifier is a member of a set of Object Identifiers. Object Identifier sets are used by GSS-API to name sets of security mechanisms. This routine is may be used after the gss_acquire_cred or gss_login_context_to_cred routines have been called, to determine which security mechanisms are supported by the resultant credential.

Inputs:

  1. OID_set SET of OBJECT IDENTIFIER
  2. Member_OID OBJECT IDENTIFIER

Outputs:

  1. major_status INTEGER
  2. minor_status INTEGER
  3. OID_present INTEGER

Return major_status codes:

  1. GSS_COMPLETE indicates that the OID_present argument contains 1 if the Member_OID parameter named an Object Identifier that was present in the Object Identifier set specified by the OID_Set parameter, and 0 if not.
  2. GSS_FAILURE indicates that the OID set could not be interrogated for reasons undistinguished at the GSS-API level.

C LANGUAGE BINDINGS FOR GSS-API DCE EXTENSION ROUTINES

This section lists the functions performed by each of the GSS-API DCE extension routines and discusses their major parameters, describing how they are to be passed to the routines. The routines are listed below:

  1. gssdce_extract_creds_from_sec_context

    Extract a DCE credentials object from a GSS-API security context.

  2. gssdce_extract_creds_from_cred

    Extract DCE credentials from a GSS-API credential.

  3. gssdce_login_context_to_cred

    Construct a GSS-API credential from a DCE login context.

  4. gssdce_cred_to_login_context

    Construct a DCE login context from a GSS-API credential.

  5. gssdce_register_acceptor_identity

    Specify a DCE keytable to be used for accepting contexts under a specified name.

  6. gssdce_release_oid

    Convenience routine. Deallocate storage associated with an Object Identifer.

  7. gssdce_create_empty_oid_set

    Convenience routine. Create an Object Identifier set containing no elements.

  8. gssdce_add_oid_set_member

    Convenience routine. Add a specified Object Identifier to a set of Object Identifiers.

  9. gssdce_test_oid_set_member

    Convenience routine. Determine whether a specified Object Identifier is contained in a set.

Data Types and Calling Conventions

The same conventions are adopted by the extension routines as are used by the base GSS-API routines. These conventions are discussed in [GSSAPI-C]. The only point of note here is that the IETF C bindings specify 32-bit unsigned data using the OM_uint32 datatype, defined by the X/Open Object Management header file, whereas the DCE convention is to use the unsigned32 datatype. Since the two types are equivalent, the DCE GSS-API bindings follow the IETF convention. Similarly, the IETF GSS-API bindings use OM_uint32 to represent mechanism-specific status codes, whereas DCE convention is to use the error_status_t type. Again, since error_status_t is equivalent to unsigned32, the DCE GSS-API may follow the IETF specification, while remaining compatible with DCE conventions. The actual values of DCE GSS-API status codes are generated by the SMS message utility.

The following OID shall be used to represent the GSS-API mechanism-type "DCE-security with Kerberos V5 with DES":

    GSSDCE_C_OID_DCE_KRBV5_DES

This shall also be the default mechanism-type.

Additionally, the following OID shall represent the GSS-API mechanism-type "Kerberos V5 with DES":

    GSSDCE_C_OID_KRBV5_DES

The actual value of this OID will be the same as the OID already assigned to indicate GSS-API over Kerberos V5. The OID represents the value:

    { iso(1) org(3) dod(5) internet(1) security(5) KerberosV5(2) }

The following OIDs shall be used to represent the GSS-API name-type "DCE principal name":

    GSSDCE_C_OID_DCENAME

This shall also be the default name-type; no other name-types will be supported.

GSS-API Routine Descriptions

gssdce_extract_creds_from_sec_context

Purpose: Extract DCE credentials from a GSS-API security context. This call is intended for use by a context acceptor, and the returned credentials object contains the privilege attibutes of the context initiator and delegation chain (if any). If the context was established using the Kerberos mechanism type, this call will return a major status of GSS_FAILURE and a minor status indicating no credentials are available.

Synopsis:

OM_uint32
gssdce_extract_creds_from_sec_context (
    OM_uint32                   *minor_status,
    gss_ctx_id_t                context_handle,
    rpc_authz_cred_handle_t     *output_creds );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. context_handle /* opaque ctx_id_t, read */ Handle of context to be interrogated.
  3. output_creds /* rpc_authz_cred_handle_t, modify */

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.
  2. GSS_S_NO_CONTEXT Context could not be accessed.
  3. GSS_S_CONTEXT_EXPIRED The security context has expired.

gssdce_extract_creds_from_cred

Purpose: Extract DCE credentials from a GSS-API credential. This call extracts privilege attribute information concerning the originator principal described by the credential. Since an initiating process may obtain its own DCE credentials from its login context (via the sec_login_cred_get_initiator routine), this call is primarily intended to be invoked by context acceptors wishing to determine the originator principal of a delegated credential.

Synopsis:

OM_uint32
gssdce_extract_creds_from_cred (
    OM_uint32                   *minor_status,
    gss_cred_id_t               cred_handle,
    sec_cred_pa_handle_t        *output_creds );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. cred_handle /* opaque cred_id_t, read */ Handle for GSSAPI credential to be interrogated.
  3. output_creds /* sec_cred_pa_handle_t, modify */

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.
  2. GSS_S_NO_CRED Credentials could not be accessed.
  3. GSS_S_CREDENTIALS_EXPIRED The credentials have expired.
  4. GSS_S_DEFECTIVE_CREDENTIAL The credential is defective in some way.

gssdce_login_context_to_cred

Purpose: Create a GSS-API credential handle from a DCE login context. This routine will always create a credential suitable for initiating a security context. If a credential of usage-type "ACCEPT" or "BOTH" is desired, it may be created by a call to gssdce_register_acceptor_identity (not required if the key is stored in the default keytable), followed by a call to gss_acquire_cred to convert the key into a GSS-API credential.

Synopsis:

OM_uint32
gssdce_login_context_to_cred (
    OM_uint32                   *minor_status,
    sec_login_handle_t          login_context,
    OM_uint32                   lifetime_req,
    gss_OID_set                 desired_mechs,
    gss_cred_id_t               *output_cred_handle,
    gss_OID_set                 *actual_mechs,
    OM_uint32                   lifetime_rec );

Parameters:

  1. minor_status /* integer, modify */ Mechanism-specific status code.
  2. login_context /* sec_login_handle_t, read */ DCE login context handle. NULL is interpreted as a request to use the default DCE login context.
  3. lifetime_req /* integer, read */ Number of seconds the credential should remain valid.
  4. desired_mechs /* OID_set, read */ Mechanisms that credential should be usable with.
  5. output_cred_handle /* Credential-handle, modify */ Resultant credential handle.
  6. actual_mechs /* OID_set, modify */ Mechanisms that credential may be used with.
  7. lifetime_rec /* integer, modify */ Actual number of seconds that credential will remain valid.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.
  2. GSS_S_DEFECTIVE_CREDENTIALS The credentials were defective.
  3. GSS_S_NO_CRED Use of default login context was requested, but no default login context was available.
  4. GSS_S_FAILURE Minor status describes other problems with login context.

gssdce_cred_to_login_context

Purpose: Obtain the DCE login context associated with a GSS-API credential.

Synopsis:

OM_uint32
gssdce_cred_to_login_context (
    OM_uint32                   *minor_status,
    gss_cred_id_t               cred_handle,
    sec_login_handle_t          *output_login_context );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. cred_handle /* gss_cred_id_t, read */
  3. output_login_context /* sec_login_handle_t, modify */ The login context associated with the credential. Only credentials of usage-type "INIT" or "BOTH" have associated login contexts.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.
  2. GSS_S_NO_CRED Credentials could not be accessed.
  3. GSS_S_CREDENTIALS_EXPIRED The credentials have expired.
  4. GSS_S_DEFECTIVE_CREDENTIAL The credential cannot be used to create a login context (e.g., it was created by the GSS-API for the Kerberos V5 mech-type, not DCE, or it was a credential of usage-type "ACCEPT").

gssdce_register_acceptor_identity

Purpose: Associate a keytable with a context-acceptor principal name.

Synopsis:

OM_uint32
gssdce_register_acceptor_identity (
    OM_uint32                   *minor_status,
    gss_name_t                  server_principal_name,
    rpc_auth_key_retrieval_fn_t get_key_fn,
    void                        *arg );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. server_principal_name /* gss_buffer_t, read */ The DCE principal name that is being registered.
  3. get_key_fn /* routine address, read */ The address of a key retrieval routine. For further details, see the documentation for rpc_server_register_auth_info.
  4. arg /* pointer, read */ Argument to be passed to get_key_fn. For further details, see documentation for rpc_server_register_auth_info.
Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.

gssdce_release_oid

Purpose: Discard storage associated with an OID, unless the OID is one of the supplied GSS-API constant OIDs.

Synopsis:

OM_int32
gssdce_release_oid (
    OM_uint3                    *minor_status,
    gss_OID                     *oid );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. oid /* Object Identifier, read/modify */ The OID to be released.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.

gssdce_create_empty_oid_set

Purpose: Create an OID set with no members.

Synopsis:

OM_uint32
gssdce_create_empty_oid_set (
    OM_uint32                   *minor_status,
    gss_OID_set                 *OID_set );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. OID_set /* set of Object Identifier, modify */ The returned empty OID set.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.

gssdce_add_oid_set_member

Purpose: Add an OID value to an OID set.

Synopsis:

OM_uint32
gssdce_add_oid_set_member (
    OM_uint32                   *minor_status,
    gss_OID                     member_OID,
    gss_OID_set                 *OID_set );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. member_OID /* Object Identifier, read */ The OID to be added to the set.
  3. OID_set /* set of Object Identifier, read/modify */ The OID set into which member_OID will be inserted.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.

gssdce_test_oid_set_member

Purpose: Determine whether a specified OID is a member of an OID set.

Synopsis:

OM_uint32
gssdce_test_oid_set_member (
    OM_uint32                   *minor_status,
    gss_OID                     member_OID,
    gss_OID_set                 OID_set,
    int                         *present );

Parameters:

  1. minor_status /* integer, modify */ Mechanism specific status code.
  2. member_OID /* Object Identifier, read */ The OID whose presence is being determined.
  3. OID_set /* set of Object Identifier, read */ The set of OIDs that is being interrogated.
  4. present /* Boolean, modify */ Returns true if member_OID is a member of OID_set, false if not.

Function value (GSS status code):

  1. GSS_S_COMPLETE Successful completion.

REFERENCES

[GSSAPI]
J. Linn, Generic Security Service Application Program Interface, Internet RFC 1508.
[GSSAPI-C]
J. Wray, GSS-API -- Overview and C Bindings, Internet RFC 1509.

AUTHOR'S ADDRESS

John Wray Internet email: wray@tuxedo.enet.dec.com
Digital Equipment Corporation Telephone: +1-508-486-5210
550 King Street, LKG2-2/Z7
Littleton, MA 01460
USA