o sequence_req_flag BOOLEAN,
o lifetime_req INTEGER,-0 specifies default lifetime
o chan_bindings OCTET STRING,
o input_token OCTET STRING-NULL or token received from target
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o output_context_handle INTEGER,
o mech_type OBJECT IDENTIFIER, -actual mechanism always
indicated, never NULL
o output_token OCTET STRING, -NULL or token to pass to context
target
o deleg_state BOOLEAN,
o mutual_state BOOLEAN,
o replay_det_state BOOLEAN,
o sequence_state BOOLEAN,
o conf_avail BOOLEAN,
o integ_avail BOOLEAN,
o lifetime_rec INTEGER - in seconds, or reserved value for
INDEFINITE
This call may block pending network interactions for those mech_types
in which an authentication server or other network entity must be
consulted on behalf of a context initiator in order to generate an
output_token suitable for presentation to a specified target.
Return major_status codes:
o GSS_COMPLETE indicates that context-level information was
successfully initialized, and that the returned output_token will
provide sufficient information for the target to perform per-
message processing on the newly-established context.
o GSS_CONTINUE_NEEDED indicates that control information in the
returned output_token must be sent to the target, and that 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 be performed in conjunction with this context.
o GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
the input_token failed, preventing further processing from being
performed based on that token.
o GSS_DEFECTIVE_CREDENTIAL indicates that consistency checks
performed on the credential structure referenced by
claimant_cred_handle failed, preventing further processing from
being performed using that credential structure.
o GSS_BAD_SIG indicates that the received input_token contains an
incorrect signature, so context setup cannot be accomplished.
o GSS_NO_CRED indicates that no context was established, either
because the input cred_handle was invalid, because the referenced
credentials are valid for context acceptor use only, or because
the caller lacks authorization to access the referenced
credentials.
o GSS_CREDENTIALS_EXPIRED indicates that the credentials provided
through the input claimant_cred_handle argument are no longer
valid, so context establishment cannot be completed.
o GSS_BAD_BINDINGS indicates that a mismatch between the caller-
provided chan_bindings and those extracted from the input_token
was detected, signifying a security-relevant event and preventing
context establishment. (This result will be returned by
GSS_Init_sec_context only for contexts where mutual_state is
TRUE.)
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided; this major status will be
returned only for successor calls following GSS_CONTINUE_NEEDED
status returns.
o GSS_BAD_NAMETYPE indicates that the provided targ_name is of a
type uninterpretable or unsupported by the supporting GSS-API
implementation, so context establishment cannot be completed.
o GSS_BAD_NAME indicates that the provided targ_name is inconsistent
in terms of internally-incorporated type specifier information, so
context establishment cannot be accomplished.
o GSS_FAILURE indicates that context setup could not be accomplished
for reasons unspecified at the GSS-API level, and that no
interface-defined recovery action is available.
This routine is used by a context initiator, and ordinarily emits one
(or, for the case of a multi-step exchange, more than one)
output_token suitable for use by the target within the selected
mech_type's protocol. Using information in the credentials structure
referenced by claimant_cred_handle, GSS_Init_sec_context()
initializes the data structures required to establish a security
context with target targ_name. 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_CONTINUE_NEEDED status returns; different protocol sequences
modeled by the GSS_CONTINUE_NEEDED mechanism will require access to
credentials at different points in the context establishment
sequence.
The input_context_handle argument is 0, specifying "not yet
assigned", on the first GSS_Init_sec_context() call relating to a
given context. That call returns an output_context_handle for future
references to this context. When continuation attempts to
GSS_Init_sec_context() are needed to perform context establishment,
the previously-returned non-zero handle value is entered into the
input_context_handle argument and will be echoed in the returned
output_context_handle argument. On such continuation attempts (and
only on continuation attempts) the input_token value is used, to
provide the token returned from the context's target.
The chan_bindings argument is used by the caller to provide
information binding the security context to security-related
characteristics (e.g., addresses, cryptographic keys) of the
underlying communications channel. See Section 1.1.6 of this document
for more discussion of this argument's usage.
The input_token argument contains a message received from the target,
and is significant only on a call to GSS_Init_sec_context() which
follows a previous return indicating GSS_CONTINUE_NEEDED
major_status.
It is the caller's responsibility to establish a communications path
to the target, and to transmit any returned output_token (independent
of the accompanying returned major_status value) to the target over
that path. The output_token can, however, be transmitted along with
the first application-provided input message to be processed by
GSS_Sign() or GSS_Seal() in conjunction with a successfully-
established context.
The initiator may request various context-level functions through
input flags: the deleg_req_flag requests delegation of access rights,
the mutual_req_flag requests mutual authentication, the
replay_det_req_flag requests that replay detection features be
applied to messages transferred on the established context, and the
sequence_req_flag requests that sequencing be enforced. (See Section
1.2.3 for more information on replay detection and sequencing
features.)
Not all of the optionally-requestable features will be available in
all underlying mech_types; the corresponding return state values
(deleg_state, mutual_state, replay_det_state, sequence_state)
indicate, as a function of mech_type processing capabilities and
initiator-provided input flags, the set of features which will be
active on the context. These state indicators' values are undefined
unless the routine's major_status indicates COMPLETE. Failure to
provide the precise set of features requested by the caller does not
cause context establishment to fail; it is the caller's prerogative
to delete the context if the feature set provided is unsuitable for
the caller's use. The returned mech_type value indicates the
specific mechanism employed on the context, and will never indicate
the value for "default".
The conf_avail return value indicates whether the context supports
per-message confidentiality services, and so informs the caller
whether or not a request for encryption through the conf_req_flag
input to GSS_Seal() can be honored. In similar fashion, the
integ_avail return value indicates whether per-message integrity
services are available (through either GSS_Sign() or GSS_Seal()) on
the established context.
The lifetime_req input specifies a desired upper bound for the
lifetime of the context to be established, with a value of 0 used to
request a default lifetime. The lifetime_rec return value indicates
the length of time for which the context will be valid, expressed as
an offset from the present; depending on mechanism capabilities,
credential lifetimes, and local policy, it may not correspond to the
value requested in lifetime_req. If no constraints on context
lifetime are imposed, this may be indicated by returning a reserved
value representing INDEFINITE lifetime_req. The values of conf_avail,
integ_avail, and lifetime_rec are undefined unless the routine's
major_status indicates COMPLETE.
If the mutual_state is TRUE, this fact will be reflected within the
output_token. A call to GSS_Accept_sec_context() at the target in
conjunction with such a context will return a token, to be processed
by a continuation call to GSS_Init_sec_context(), in order to achieve
mutual authentication.
2.2.2. GSS_Accept_sec_context call
Inputs:
o acceptor_cred_handle OCTET STRING,-NULL specifies "use
default"
o input_context_handle INTEGER, -0 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,
o mech_type OBJECT IDENTIFIER,
o output_context_handle INTEGER,
o deleg_state BOOLEAN,
o mutual_state BOOLEAN,
o replay_det_state BOOLEAN,
o sequence_state BOOLEAN,
o conf_avail BOOLEAN,
o integ_avail BOOLEAN,
o lifetime_rec INTEGER, - in seconds, or reserved value for
INDEFINITE
o delegated_cred_handle OCTET STRING,
o output_token OCTET STRING -NULL or token to pass to context
initiator
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:
o GSS_COMPLETE indicates that context-level data structures were
successfully initialized, and that per-message processing can now
be performed in conjunction with this context.
o GSS_CONTINUE_NEEDED indicates that control information in the
returned output_token must be sent to the initiator, and that 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.
o GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
the input_token failed, preventing further processing from being
performed based on that token.
o GSS_DEFECTIVE_CREDENTIAL indicates that consistency checks
performed on the credential structure referenced by
acceptor_cred_handle failed, preventing further processing from
being performed using that credential structure.
o GSS_BAD_SIG indicates that the received input_token contains an
incorrect signature, so context setup cannot be accomplished.
o GSS_DUPLICATE_TOKEN indicates that the signature on the received
input_token was correct, but that the input_token was recognized
as a duplicate of an input_token already processed. No new context
is established.
o GSS_OLD_TOKEN indicates that the signature on the received
input_token was correct, but that the input_token is too old to be
checked for duplication against previously-processed input_tokens.
No new context is established.
o GSS_NO_CRED indicates that no context was established, either
because the input cred_handle was invalid, because the referenced
credentials are valid for context initiator use only, or because
the caller lacks authorization to access the referenced
credentials.
o GSS_CREDENTIALS_EXPIRED indicates that the credentials provided
through the input acceptor_cred_handle argument are no longer
valid, so context establishment cannot be completed.
o GSS_BAD_BINDINGS indicates that a mismatch between the caller-
provided chan_bindings and those extracted from the input_token
was detected, signifying a security-relevant event and preventing
context establishment.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided; this major status will be
returned only for successor calls following GSS_CONTINUE_NEEDED
status returns.
o GSS_FAILURE indicates that context setup could not be accomplished
for reasons unspecified at the GSS-API level, and that no
interface-defined recovery action is available.
The GSS_Accept_sec_context() routine is used by a context target.
Using 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 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_CONTINUE_NEEDED status
returns; different protocol sequences modeled by the
GSS_CONTINUE_NEEDED mechanism will require access to credentials at
different points in the context establishment sequence.
The input_context_handle argument is 0, specifying "not yet
assigned", on the first GSS_Accept_sec_context() call relating to a
given context. That call returns an output_context_handle for future
references to this context; when continuation attempts to
GSS_Accept_sec_context() are needed to perform context
establishment, that handle value will be entered into the
input_context_handle argument.
The chan_bindings argument is used by the caller to provide
information binding the security context to security-related
characteristics (e.g., addresses, cryptographic keys) of the
underlying communications channel. See Section 1.1.6 of this document
for more discussion of this argument's usage.
The returned state results (deleg_state, mutual_state,
replay_det_state, and sequence_state) reflect the same context state
values as returned to GSS_Init_sec_context()'s caller at the
initiator system.
The conf_avail return value indicates whether the context supports
per-message confidentiality services, and so informs the caller
whether or not a request for encryption through the conf_req_flag
input to GSS_Seal() can be honored. In similar fashion, the
integ_avail return value indicates whether per-message integrity
services are available (through either GSS_Sign() or GSS_Seal()) on
the established context.
The lifetime_rec return value indicates the length of time for which
the context will be valid, expressed as an offset from the present.
The values of deleg_state, mutual_state, replay_det_state,
sequence_state, conf_avail, integ_avail, and lifetime_rec are
undefined unless the accompanying major_status indicates COMPLETE.
The delegated_cred_handle result is significant only when deleg_state
is TRUE, and provides a means for the target to reference the
delegated credentials. The output_token result, when non-NULL,
provides a context-level token to be returned to the context
initiator to continue a multi-step context establishment sequence. As
noted with GSS_Init_sec_context(), any returned token should be
transferred to the context's peer (in this case, the context
initiator), independent of the value of the accompanying returned
major_status.
Note: A target must be able to distinguish a context-level
input_token, which is passed to GSS_Accept_sec_context(), from the
per-message data elements passed to GSS_Verify() or GSS_Unseal().
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.
2.2.3. GSS_Delete_sec_context call
Input:
o context_handle INTEGER
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o output_context_token OCTET STRING
Return major_status codes:
o GSS_COMPLETE indicates that the context was recognized, that
relevant context-specific information was flushed, and that the
returned output_context_token is ready for transfer to the
context's peer.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provide, so no deletion was performed.
o GSS_FAILURE indicates that the context is recognized, but that the
GSS_Delete_sec_context() operation could not be performed for
reasons unspecified at the GSS-API level.
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.
This call can be made by either peer in a security context, to flush
context-specific information and to return an output_context_token
which can be passed to the context's peer informing it that the
peer's corresponding context information can also be flushed. (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.) Attempts to perform per-
message processing on a deleted context will result in error returns.
2.2.4. GSS_Process_context_token call
Inputs:
o context_handle INTEGER,
o input_context_token OCTET STRING
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
Return major_status codes:
o GSS_COMPLETE indicates that the input_context_token was
successfully processed in conjunction with the context referenced
by context_handle.
o GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
the received context_token failed, preventing further processing
from being performed with that token.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the context is recognized, but that the
GSS_Process_context_token() operation could not be performed for
reasons unspecified at the GSS-API level.
This call is used to process context_tokens received from a peer once
a context has been established, with corresponding impact on
context-level state information. One use for this facility is
processing of the context_tokens generated by
GSS_Delete_sec_context(); GSS_Process_context_token() will not block
pending network interactions for that purpose. Another use is to
process tokens indicating remote-peer context establishment failures
after the point where the local GSS-API implementation has already
indicated GSS_COMPLETE status.
2.2.5. GSS_Context_time call
Input:
o context_handle INTEGER,
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o lifetime_rec INTEGER - in seconds, or reserved value for
INDEFINITE
Return major_status codes:
o GSS_COMPLETE indicates that the referenced context is valid, and
will remain valid for the amount of time indicated in
lifetime_rec.
o GSS_CONTEXT_EXPIRED indicates that data items related to the
referenced context have expired.
o GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
but that its associated credentials have expired.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the requested operation failed for
reasons unspecified at the GSS-API level.
This call is used to determine the amount of time for which a
currently established context will remain valid.
2.3. Per-message calls
This group of calls is used to perform per-message protection
processing on an established security context. None of these calls
block pending network interactions. These calls may be invoked by a
context's initiator or by the context's target. The four members of
this group should be considered as two pairs; the output from
GSS_Sign() is properly input to GSS_Verify(), and the output from
GSS_Seal() is properly input to GSS_Unseal().
GSS_Sign() and GSS_Verify() support data origin authentication and
data integrity services. When GSS_Sign() is invoked on an input
message, it yields a per-message token containing data items which
allow underlying mechanisms to provide the specified security
services. The original message, along with the generated per-message
token, is passed to the remote peer; these two data elements are
processed by GSS_Verify(), which validates the message in
conjunction with the separate token.
GSS_Seal() and GSS_Unseal() support caller-requested confidentiality
in addition to the data origin authentication and data integrity
services offered by GSS_Sign() and GSS_Verify(). GSS_Seal() outputs
a single data element, encapsulating optionally enciphered user data
as well as associated token data items. The data element output from
GSS_Seal() is passed to the remote peer and processed by
GSS_Unseal() at that system. GSS_Unseal() combines decipherment (as
required) with validation of data items related to authentication and
integrity.
2.3.1. GSS_Sign call
Inputs:
o context_handle INTEGER,
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
Return major_status codes:
o GSS_COMPLETE indicates that a signature, suitable for an
established security context, was successfully applied and that
the message and corresponding per_msg_token are ready for
transmission.
o GSS_CONTEXT_EXPIRED indicates that context-related data items have
expired, so that the requested operation cannot be performed.
o GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
but that its associated credentials have expired, so that the
requested operation cannot be performed.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the context is recognized, but that the
requested operation could not be performed for reasons unspecified
at the GSS-API level.
Using the security context referenced by context_handle, apply a
signature to the input message (along with timestamps and/or other
data included in support of mech_type-specific mechanisms) and return
the result in per_msg_token. The qop_req parameter allows quality-
of-protection control. The caller passes the message and the
per_msg_token to the target.
The GSS_Sign() function completes before the message and
per_msg_token is sent to the peer; successful application of
GSS_Sign() does not guarantee that a corresponding GSS_Verify() has
been (or can necessarily be) performed successfully when the message
arrives at the destination.
2.3.2. GSS_Verify call
Inputs:
o context_handle INTEGER,
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:
o GSS_COMPLETE indicates that the message was successfully verified.
o GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
the received per_msg_token failed, preventing further processing
from being performed with that token.
o GSS_BAD_SIG indicates that the received per_msg_token contains an
incorrect signature for the message.
o GSS_DUPLICATE_TOKEN, GSS_OLD_TOKEN, and GSS_UNSEQ_TOKEN values
appear in conjunction with the optional per-message replay
detection features described in Section 1.2.3; their semantics are
described in that section.
o GSS_CONTEXT_EXPIRED indicates that context-related data items have
expired, so that the requested operation cannot be performed.
o GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
but that its associated credentials have expired, so that the
requested operation cannot be performed.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the context is recognized, but that the
GSS_Verify() operation could not be performed for reasons
unspecified at the GSS-API level.
Using the security context referenced by context_handle, verify that
the input per_msg_token contains an appropriate signature for the
input message, and apply any active replay detection or sequencing
features. Return an indication of the quality-of-protection applied
to the processed message in the qop_state result.
2.3.3. GSS_Seal call
Inputs:
o context_handle INTEGER,
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
Return major_status codes:
o GSS_COMPLETE indicates that the input_message was successfully
processed and that the output_message is ready for transmission.
o GSS_CONTEXT_EXPIRED indicates that context-related data items have
expired, so that the requested operation cannot be performed.
o GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
but that its associated credentials have expired, so that the
requested operation cannot be performed.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the context is recognized, but that the
GSS_Seal() operation could not be performed for reasons
unspecified at the GSS-API level.
Performs the data origin authentication and data integrity functions
of GSS_Sign(). If the input conf_req_flag is TRUE, requests that
confidentiality be applied to the input_message. Confidentiality may
not be supported in all mech_types or by all implementations; the
returned conf_state flag indicates whether confidentiality was
provided for the input_message. The qop_req parameter allows
quality-of-protection control.
In all cases, the GSS_Seal() call yields a single output_message
data element containing (optionally enciphered) user data as well as
control information.
2.3.4. GSS_Unseal call
Inputs:
o context_handle INTEGER,
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
Return major_status codes:
o GSS_COMPLETE indicates that the input_message was successfully
processed and that the resulting output_message is available.
o GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
the per_msg_token extracted from the input_message failed,
preventing further processing from being performed.
o GSS_BAD_SIG indicates that an incorrect signature was detected for
the message.
o GSS_DUPLICATE_TOKEN, GSS_OLD_TOKEN, and GSS_UNSEQ_TOKEN values
appear in conjunction with the optional per-message replay
detection features described in Section 1.2.3; their semantics are
described in that section.
o GSS_CONTEXT_EXPIRED indicates that context-related data items have
expired, so that the requested operation cannot be performed.
o GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
but that its associated credentials have expired, so that the
requested operation cannot be performed.
o GSS_NO_CONTEXT indicates that no valid context was recognized for
the input context_handle provided.
o GSS_FAILURE indicates that the context is recognized, but that the
GSS_Unseal() operation could not be performed for reasons
unspecified at the GSS-API level.
Processes a data element generated (and optionally enciphered) by
GSS_Seal(), provided as input_message. The returned conf_state value
indicates whether confidentiality was applied to the input_message.
If conf_state is TRUE, GSS_Unseal() deciphers the input_message.
Returns an indication of the quality-of-protection applied to the
processed message in the qop_state result. GSS_Seal() performs the
data integrity and data origin authentication checking functions of
GSS_Verify() on the plaintext data. Plaintext data is returned in
output_message.
2.4. Support calls
This group of calls provides support functions useful to GSS-API
callers, independent of the state of established contexts. Their
characterization with regard to blocking or non-blocking status in
terms of network interactions is unspecified.
2.4.1. GSS_Display_status call
Inputs:
o status_value INTEGER,-GSS-API major_status or minor_status
return value
o status_type INTEGER,-1 if major_status, 2 if minor_status
o mech_type OBJECT IDENTIFIER-mech_type to be used for minor_
status translation
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o status_string_set SET OF OCTET STRING
Return major_status codes:
o GSS_COMPLETE indicates that a valid printable status
representation (possibly representing more than one status event
encoded within the status_value) is available in the returned
status_string_set.
o GSS_BAD_MECH indicates that translation in accordance with an
unsupported mech_type was requested, so translation could not be
performed.
o GSS_BAD_STATUS indicates that the input status_value was invalid,
or that the input status_type carried a value other than 1 or 2,
so translation could not be performed.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Provides a means for callers to translate GSS-API-returned major and
minor status codes into printable string representations.
2.4.2. GSS_Indicate_mechs call
Input:
o (none)
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o mech_set SET OF OBJECT IDENTIFIER
Return major_status codes:
o GSS_COMPLETE indicates that a set of available mechanisms has
been returned in mech_set.
o GSS_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 mechanism types available on
the local system. This call is intended for support of specialized
callers who need to request non-default mech_type sets from
GSS_Acquire_cred(), and should not be needed by other callers.
2.4.3. GSS_Compare_name call
Inputs:
o name1 INTERNAL NAME,
o name2 INTERNAL NAME
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o name_equal BOOLEAN
Return major_status codes:
o GSS_COMPLETE indicates that name1 and name2 were comparable, and
that the name_equal result indicates whether name1 and name2 were
equal or unequal.
o GSS_BAD_NAMETYPE indicates that one or both of name1 and name2
contained internal type specifiers uninterpretable by the
supporting GSS-API implementation, or that the two names' types
are different and incomparable, so the equality comparison could
not be completed.
o GSS_BAD_NAME indicates that one or both of the input names was
ill-formed in terms of its internal type specifier, so the
equality comparison could not be completed.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to compare two internal name representations for
equality.
2.4.4. GSS_Display_name call
Inputs:
o name INTERNAL NAME
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o name_string OCTET STRING,
o name_type OBJECT IDENTIFIER
Return major_status codes:
o GSS_COMPLETE indicates that a valid printable name representation
is available in the returned name_string.
o GSS_BAD_NAMETYPE indicates that the provided name was of a type
uninterpretable by the supporting GSS-API implementation, so no
printable representation could be generated.
o GSS_BAD_NAME indicates that the contents of the provided name were
inconsistent with the internally-indicated name type, so no
printable representation could be generated.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to translate an internal name representation into a
printable form with associated namespace type descriptor. The syntax
of the printable form is a local matter.
2.4.5. GSS_Import_name call
Inputs:
o input_name_string OCTET STRING,
o input_name_type OBJECT IDENTIFIER
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o output_name INTERNAL NAME
Return major_status codes:
o GSS_COMPLETE indicates that a valid name representation is output
in output_name and described by the type value in
output_name_type.
o GSS_BAD_NAMETYPE indicates that the input_name_type is unsupported
by the GSS-API implementation, so the import operation could not
be completed.
o GSS_BAD_NAME indicates that the provided input_name_string is
ill-formed in terms of the input_name_type, so the import
operation could not be completed.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to provide a printable name representation, designate
the type of namespace in conjunction with which it should be parsed,
and convert that printable representation to an internal form
suitable for input to other GSS-API routines. The syntax of the
input_name is a local matter.
2.4.6. GSS_Release_name call
Inputs:
o name INTERNAL NAME
Outputs:
o major_status INTEGER,
o minor_status INTEGER
Return major_status codes:
o GSS_COMPLETE indicates that the storage associated with the input
name was successfully released.
o GSS_BAD_NAME indicates that the input name argument did not
contain a valid name.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to release the storage associated with an internal
name representation.
2.4.7. GSS_Release_buffer call
Inputs:
o buffer OCTET STRING
Outputs:
o major_status INTEGER,
o minor_status INTEGER
Return major_status codes:
o GSS_COMPLETE indicates that the storage associated with the input
buffer was successfully released.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to release the storage associated with an OCTET STRING
buffer allocated by another GSS-API call.
2.4.8. GSS_Release_oid_set call
Inputs:
o buffer SET OF OBJECT IDENTIFIER
Outputs:
o major_status INTEGER,
o minor_status INTEGER
Return major_status codes:
o GSS_COMPLETE indicates that the storage associated with the input
object identifier set was successfully released.
o GSS_FAILURE indicates that the requested operation could not be
performed for reasons unspecified at the GSS-API level.
Allows callers to release the storage associated with an object
identifier set object allocated by another GSS-API call.
3. Mechanism-Specific Example Scenarios
This section provides illustrative overviews of the use of various
candidate mechanism types to support the GSS-API. These discussions
are intended primarily for readers familiar with specific security
technologies, demonstrating how GSS-API functions can be used and
implemented by candidate underlying mechanisms. They should not be
regarded as constrictive to implementations or as defining the only
means through which GSS-API functions can be realized with a
particular underlying technology, and do not demonstrate all GSS-API
features with each technology.
3.1. Kerberos V5, single-TGT
OS-specific login functions yield a TGT to the local realm Kerberos
server; TGT is placed in a credentials structure for the client.
Client calls GSS_Acquire_cred() to acquire a cred_handle in order to
reference the credentials for use in establishing security contexts.
Client calls GSS_Init_sec_context(). If the requested service is
located in a different realm, GSS_Init_sec_context() gets the
necessary TGT/key pairs needed to traverse the path from local to
target realm; these data are placed in the owner's TGT cache. After
any needed remote realm resolution, GSS_Init_sec_context() yields a
service ticket to the requested service with a corresponding session
key; these data are stored in conjunction with the context. GSS-API
code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP
response(s) (in the successful case) or KRB_ERROR.
Assuming success, GSS_Init_sec_context() builds a Kerberos-formatted
KRB_AP_REQ message, and returns it in output_token. The client sends
the output_token to the service.
The service passes the received token as the input_token argument to
GSS_Accept_sec_context(), which verifies the authenticator, provides
the service with the client's authenticated name, and returns an
output_context_handle.
Both parties now hold the session key associated with the service
ticket, and can use this key in subsequent GSS_Sign(), GSS_Verify(),
GSS_Seal(), and GSS_Unseal() operations.
3.2. Kerberos V5, double-TGT
TGT acquisition as 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() determines that the double-TGT protocol
should be employed for the specified target. GSS_Init_sec_context()
returns GSS_CONTINUE_NEEDED major_status, and its returned
output_token contains a request to the service for the service's TGT.
(If a service TGT with suitably long remaining lifetime already
exists in a cache, it may be usable, obviating the need for this
step.) The client passes the output_token to the service. Note: this
scenario illustrates a different use for the GSS_CONTINUE_NEEDED
status return facility than for support of mutual authentication;
note that both uses can coexist as successive operations within 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 TGT.
(Note that current Kerberos V5 defines no intra-protocol mechanism to
represent such a request.) GSS_Accept_sec_context() returns
GSS_CONTINUE_NEEDED major_status and provides the service's TGT in
its output_token. The service sends the output_token to the client.
The client passes the received token as the input_token argument to a
continuation of GSS_Init_sec_context(). GSS_Init_sec_context() caches
the received service TGT and uses it as part of a service ticket
request to the Kerberos authentication server, storing the returned
service ticket and session key in conjunction with the context.
GSS_Init_sec_context() builds a Kerberos-formatted authenticator,
and returns it in output_token along with GSS_COMPLETE return
major_status. The client sends the output_token to the service.
Service passes the received token as the input_token argument to a
continuation call to GSS_Accept_sec_context().
GSS_Accept_sec_context() verifies the authenticator, provides the
service with the client's authenticated name, and returns
major_status GSS_COMPLETE.
GSS_Sign(), GSS_Verify(), GSS_Seal(), and GSS_Unseal() as above.
3.3. X.509 Authentication Framework
This example illustrates use of the GSS-API in conjunction with
public-key mechanisms, consistent with the X.509 Directory
Authentication Framework.
The GSS_Acquire_cred() call establishes a credentials structure,
making the client's private key accessible for use on behalf of the
client.
The client calls GSS_Init_sec_context(), which interrogates the
Directory to acquire (and validate) a chain of public-key
certificates, thereby collecting the public key of the service. The
certificate validation operation determines that suitable signatures
were applied by trusted authorities and that those certificates have
not expired. GSS_Init_sec_context() generates a secret key for use
in 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, is included in the output_token
from GSS_Init_sec_context(). The output_token also carries a
certification path, consisting of a certificate chain leading from
the service to the client; a variant approach would defer this path
resolution to be performed by the service instead of being asserted
by the client. 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(). GSS_Accept_sec_context() validates the
certification path, and as a result determines a certified binding
between the client's distinguished name and the client's public key.
Given that public key, 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 provided to it for per-
message protection operations on the context.
The client calls GSS_Sign() or GSS_Seal() 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 corresponding
GSS_Verify() and GSS_Unseal() calls.
4. Related Activities
In order to implement the GSS-API atop existing, emerging, and future
security mechanisms:
object identifiers must be assigned to candidate GSS-API
mechanisms and the name types which they support
concrete data element formats must be defined for candidate
mechanisms
Calling applications must implement formatting conventions which will
enable them to distinguish GSS-API tokens from other data carried in
their application protocols.
Concrete language bindings are required for the programming
environments in which the GSS-API is to be employed; such bindings
for the C language are available in an associated RFC.
5. Acknowledgments
This proposal is the result of a collaborative effort.
Acknowledgments are due to the many members of the IETF Security Area
Advisory Group (SAAG) and the Common Authentication Technology (CAT)
Working Group for their contributions at meetings and by electronic
mail. Acknowledgments are also due to Kannan Alagappan, Doug Barlow,
Bill Brown, Cliff Kahn, Charlie Kaufman, Butler Lampson, Richard
Pitkin, Joe Tardo, and John Wray of Digital Equipment Corporation,
and John Carr, John Kohl, Jon Rochlis, Jeff Schiller, and Ted T'so of
MIT and Project Athena. Joe Pato and Bill Sommerfeld of HP/Apollo,
Walt Tuvell of OSF, and Bill Griffith and Mike Merritt of AT&T,
provided inputs which helped to focus and clarify directions.
Precursor work by Richard Pitkin, presented to meetings of the
Trusted Systems Interoperability Group (TSIG), helped to demonstrate
the value of a generic, mechanism-independent security service API.
6. Security Considerations
Security issues are discussed throughout this memo.
7. Author's Address
John Linn
Geer Zolot Associates
One Main St.
Cambridge, MA 02142 USA
Phone: +1 617.374.3700
Email: Linn@gza.com
APPENDIX A
PACS AND AUTHORIZATION SERVICES
Consideration has been given to modifying the GSS-API service
interface to recognize and manipulate Privilege Attribute
Certificates (PACs) as in ECMA 138, carrying authorization data as a
side effect of establishing a security context, but no such
modifications have been incorporated at this time. This appendix
provides rationale for this decision and discusses compatibility
alternatives between PACs and the GSS-API which do not require that
PACs be made visible to GSS-API callers.
Existing candidate mechanism types such as Kerberos and X.509 do not
incorporate PAC manipulation features, and exclusion of such
mechanisms from the set of candidates equipped to fully support the
GSS-API seems inappropriate. Inclusion (and GSS-API visibility) of a
feature supported by only a limited number of mechanisms could
encourage the development of ostensibly portable applications which
would in fact have only limited portability.
The status quo, in which PACs are not visible across the GSS-API
interface, does not preclude implementations in which PACs are
carried transparently, within the tokens defined and used for certain
mech_types, and stored within peers' credentials and context-level
data structures. While invisible to API callers, such PACs could be
used by operating system or other local functions as inputs in the
course of mediating access requests made by callers. This course of
action allows dynamic selection of PAC contents, if such selection is
administratively-directed rather than caller-directed.
In a distributed computing environment, authentication must span
different systems; the need for such authentication provides
motivation for GSS-API definition and usage. Heterogeneous systems in
a network can intercommunicate, with globally authenticated names
comprising the common bond between locally defined access control
policies. Access control policies to which authentication provides
inputs are often local, or specific to particular operating systems
or environments. If the GSS-API made particular authorization models
visible across its service interface, its scope of application would
become less general. The current GSS-API paradigm is consistent with
the precedent set by Kerberos, neither defining the interpretation of
authorization-related data nor enforcing access controls based on
such data.
The GSS-API is a general interface, whose callers may reside inside
or outside any defined TCB or NTCB boundaries. Given this
characteristic, it appears more realistic to provide facilities which
provide "value-added" security services to its callers than to offer
facilities which enforce restrictions on those callers. Authorization
decisions must often be mediated below the GSS-API level in a local
manner against (or in spite of) applications, and cannot be
selectively invoked or omitted at those applications' discretion.
Given that the GSS-API's placement prevents it from providing a
comprehensive solution to the authorization issue, the value of a
partial contribution specific to particular authorization models is
debatable.
APPENDIX B
MECHANISM-INDEPENDENT TOKEN FORMAT
This appendix specifies a mechanism-independent level of
encapsulating representation for the initial token of a GSS-API
context establishment sequence, incorporating an identifier of the
mechanism type to be used on that context. Use of this format (with
ASN.1-encoded data elements represented in BER, constrained in the
interests of parsing simplicity to the Distinguished Encoding Rule
(DER) BER subset defined in X.509, clause 8.7) is recommended to the
designers of GSS-API implementations based on various mechanisms, so
that tokens can be interpreted unambiguously at GSS-API peers. There
is no requirement that the mechanism-specific innerContextToken,
innerMsgToken, and sealedUserData data elements be encoded in ASN.1