RFC 5588
Generic Security Service Application Program Interface (GSS-API) Extension for Storing Delegated Credentials
RFC 5588 π GSS-API Extension for Storing Delegated Credentials
Okay bestie, here's the vibe check π This is RFC 5588, written by Nicolas Williams at Sun, in July 2009. It's a Standards Track document β¨ The title block doesn't list anything it obsoletes or updates, so it's standing completely on its own π
Abstract β¨
So this doc adds a brand new function to the GSS-API (Generic Security Service Application Program Interface) π¦ It lets apps store delegated (and other) credentials in the implicit GSS-API credential store. Why? Because GSS-API apps need to use delegated credentials the same way they'd use any other credentials. It's giving main character energy π
Status of This Memo πΈ
This document is a Internet standards track protocol for the Internet community, and it asks for discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited π«Ά
Copyright Notice π
Copyright (c) 2009 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 in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document.
Table of Contents π§
1. Introduction ....................................................2
2. Conventions Used in This Document ...............................3
3. GSS_Store_cred() ................................................3
4. C-Bindings ......................................................5
5. Examples ........................................................6
6. Security Considerations .........................................6
7. Normative References ............................................7
1. Introduction π
Okay so the GSS-API [RFC2743] basically assumes credentials live in an implicit store, where they can be grabbed with GSS_Acquire_cred() and GSS_Add_cred() or through the default credential π§ A host can have multiple credential stores, but only one store can be accessed by GSS_Acquire_cred() and GSS_Add_cred() at any given time.
You can see this assumption in Sections 1.1.1.2 and 1.1.1.3 of [RFC2743], and also in Section 3.5 of [RFC2744] π
Apps might be able to switch which credential store they grab credentials from, either by changing user contexts (if they have the privilege to do so) or by other means (where a user may have multiple credential stores) π
Some GSS-API acceptor apps always change user contexts after accepting a GSS-API security context and doing the appropriate authorization checks. They switch to the user context matching the initiator principal name, or to a context the initiator asked for β¨ How credential stores get managed is generally beyond the scope of the GSS-API, so that's not this doc's problem π
Now here's the tea π« Delegated credential handles do not live in the acceptor's credential store, or in the credential stores of the user contexts the acceptor might switch to. The GSS-API doesn't give any way to make delegated credential handles available for acquisition through GSS_Acquire_cred()/GSS_Add_cred(). It also doesn't provide any credential import/export interfaces like the GSS-API context import/export interfaces π
So acceptors are stuck with only making direct use of delegated credential handles, and only with GSS_Init_sec_context(), GSS_Inquire_cred*(), and GSS_Release_cred(). This is extra painful on Unix systems, where a call to exec() to replace the process image wipes out any delegated credentials handle that process had π
To make delegated credentials as useful as the ones you can get with GSS_Acquire_cred() and GSS_Add_cred(), we need a primitive that lets you store credentials in the implicit credential store. We're calling this primitive "GSS_Store_cred()" π¦
2. Conventions Used in This Document π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] π
3. GSS_Store_cred() π
Here's the rundown on the inputs and outputs:
Inputs:
o input_cred_handle CREDENTIAL HANDLE, -- credential to store; MUST
NOT be GSS_C_NO_CREDENTIAL.
o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
2=ACCEPT-ONLY.
o desired_mech_element OBJECT IDENTIFIER, -- if GSS_C_NULL_OID, then
store all the elements of the input_cred_handle, otherwise, store
only the element of the corresponding mechanism.
o overwrite_cred BOOLEAN, -- if TRUE, replace any credential for the
same principal in the credential store.
o default_cred BOOLEAN -- advisory input; if TRUE, make the stored
credential available as the default credential (for acquisition
with GSS_C_NO_NAME as the desired name or for use as
GSS_C_NO_CREDENTIAL).
Outputs:
o major_status INTEGER.
o minor_status INTEGER.
o mech_elements_stored SET OF OBJECT IDENTIFIER, -- the set of
mechanism OIDs for which credential elements were successfully
stored.
o cred_usage_stored INTEGER -- like cred_usage, but indicates what
kind of credential was stored (useful when the cred_usage input
parameter is set to INITIATE-AND-ACCEPT).
And here are the return major_status codes π¬
GSS_S_COMPLETEindicates that the credentials were successfully stored.GSS_S_CREDENTIALS_EXPIREDindicates that the input credentials had expired or expired before they could be stored.GSS_S_NO_CREDindicates that no input credentials were given.GSS_S_UNAVAILABLEindicates that the credential store is not available.GSS_S_DUPLICATE_ELEMENTindicates that an element of the input credential could not be stored because a credential for the same principal exists in the current credential store and theoverwrite_credinput argument was FALSE.GSS_S_FAILUREindicates that the credential could not be stored for some other reason. The minor status code may provide more information if a non-GSS_C_NULL_OIDdesired_mech_elementwas given.
GSS_Store_cred() is used to store, in the current credential store, a given credential that was either acquired from a different credential store or accepted as a delegated credential π«Ά
You can store specific mechanism elements of a credential one at a time by giving a non-GSS_C_NULL_OID mechanism OID as the desired_mech_element input argument. In that case, the minor status output SHOULD have a mechanism-specific value when the major status is not GSS_S_COMPLETE π₯
The initiator, acceptor, or both usages of the input credential may be stored, as per the cred_usage input argument π
When the major status is GSS_S_COMPLETE, the credential elements that were actually stored are shown through the cred_usage_stored and mech_elements_stored function outputs β¨
If credentials already exist in the current store for the principal of the input_cred_handle, those credentials are not replaced with the input credentials unless the overwrite_cred input argument is TRUE π
In the GSS-API, the default credential can be used by passing GSS_C_NO_CREDENTIAL, or a CREDENTIAL handle acquired by calling GSS_Acquire_cred() or GSS_Add_cred() with the desired_name input set to GSS_C_NO_NAME π§
If the default_cred input argument is TRUE, and the input credential can be successfully stored, then the input credential SHOULD be stored as the default credential (see above) π
If the current credential store has no default credential (see above), then the implementation MAY make the stored credentials available as the default credential, no matter what the default_cred input argument says π
4. C-Bindings π¦
The C-Bindings for GSS_Store_cred() make use of types from and are designed based on the style of the GSS-APIv2 C-Bindings [RFC2744].
OM_uint32 gss_store_cred(
OM_uint32 *minor_status,
gss_cred_id_t input_cred_handle,
gss_cred_usage_t cred_usage,
const gss_OID desired_mech,
OM_uint32 overwrite_cred,
OM_uint32 default_cred,
gss_OID_set *elements_stored,
gss_cred_usage_t *cred_usage_stored)
Figure 1
The two boolean arguments, 'overwrite_cred' and 'default_cred', are typed as OM_uint32. 0 corresponds to FALSE, and non-zero values correspond to TRUE π
5. Examples πΈ
The intended use of GSS_Store_cred() is to make delegated credentials available to child processes of GSS-API acceptor applications. Here's some example pseudo-code π§
/*
* <GSS_Accept_sec_context() loop resulting in GSS_S_COMPLETE,
* an initiator name (hereafter, "src_name") and a delegated
* credential handle (hereafter "deleg_cred").>
*
* <"requested_username" is a username derived from the
* initiator name or explicitly requested by the initiator
* application.>
*/
...
if (authorize_gss_client(src_name, requested_username)) {
/*
* For Unix-type platforms this may mean calling setuid() and
* it may or may not also mean setting/unsetting such
* environment variables as KRB5CCNAME and what not -- all
* OS-specific details.
*/
if (change_user_context(requested_username))
(void) gss_store_cred(&minor_status, deleg_cred,
GSS_C_INITIATE, actual_mech,
0, 1, NULL, NULL);
}
else ...
}
else ...
6. Security Considerations π¨
Real talk, this section is serious. Acceptor applications MUST only store delegated credentials into appropriate credential stores, and only after proper authorization of the authenticated initiator principal to the requested service(s) π
Acceptor applications that have no use for delegated credentials MUST release them. (Acceptor applications that use the GSS-API C-Bindings may simply provide a NULL value for the delegated_cred_handle argument to gss_accept_sec_context().) π«
7. Normative References π
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2743] Linn, J., "Generic Security Service Application Program
Interface Version 2, Update 1", RFC 2743, January 2000.
[RFC2744] Wray, J., "Generic Security Service API Version 2 :
C-bindings", RFC 2744, January 2000.
Author's Address π
Nicolas Williams
Sun Microsystems
5300 Riata Trace Ct
Austin, TX 78727
US
EMail: Nicolas.Williams@sun.com
π¦ where this page comes from
- ietf: rfc5588 2009-07
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms