There are multiple steps required to develop a JGSS application, including using transport tokens, creating the necessary JGSS objects, establishing and deleting context, and using per-message services.
Operations in a JGSS application follow the Generic Security Service Application Programming Interface (GSS-API) operational model. For information about concepts important to JGSS operations, see JGSS concepts.
Some of the important JGSS operations generate tokens in the form of Java™ byte arrays. It is the responsibility of the application to forward the tokens from one JGSS peer to the other. JGSS does not constrain in any way the protocol that the application uses for transporting tokens. Applications may transport JGSS tokens together with other application (that is, non-JGSS) data. However, JGSS operations accept and use only JGSS-specific tokens.
JGSS operations require certain programming constructs that you must use in the order listed below. Each of the steps applies to both the initiator and the acceptor.
An instance of GSSManager acts as a factory for creating other JGSS object instances.
A GSSName represents the identity of a JGSS principal. Some JGSS operations can locate and use a default principal when you specify a null GSSName.
A GSSCredential embodies the mechanism-specific credentials of the principal.
A GSSContext is used for context establishment and subsequent per-message services.
Your application must explicitly request optional services, such as mutual authentication.
The initiator authenticates itself to the acceptor. However, when requesting mutual authentication, the acceptor in turn authenticates itself to the initiator.
The initiator and the acceptor exchange secure messages over the established context.
The application deletes a context that is no longer needed.