The gss_export_sec_context() function generates an interprocess token for transfer to another process within an end system. gss_export_sec_context() and gss_import_sec_context() allow a security context to be transferred between processes
on a single machine.
The gss_export_sec_context() function supports the sharing of work between multiple processes. This routine is typically used by the context-acceptor, in an application where a single process receives incoming connection requests and accepts security contexts over them, then passes
the established context to one or more other processes for message exchange. gss_export_sec_context() deactivates the security context for the calling process and creates an interprocess token which, when passed to gss_import_sec_context() in another process, reactivates
the context in the second process. Only a single instantiation of a given context can be active at any one time; a subsequent attempt by a context exporter to access the exported security context will fail.
The interprocess token may contain security-sensitive information, for example cryptographic keys. While mechanisms are encouraged to either avoid placing such sensitive information within interprocess tokens or to encrypt the token before returning it to the application, in a typical object-library GSS-API implementation, this might not be possible. Thus, the application must take care to protect the interprocess token and ensure that any process to which the token is transferred is trustworthy. If creation of the interprocess token is successful, the GSS-API deallocates
all process-wide resources associated with the security context and sets the context_handle to GSS_C_NO_CONTEXT. In the event of an error that makes it impossible to complete the export of the security context, the function does not return an interprocess token and leaves the security
context referenced by the context_handle parameter untouched.
Sun's implementation of gss_export_sec_context() does not encrypt the interprocess token. The interprocess token is serialized before it is transferred to another process.
|