Path: blob/master/src/java.security.sasl/share/classes/javax/security/sasl/package-info.java
41159 views
/*1* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/**26* Contains class and interfaces for supporting SASL.27*28* This package defines classes and interfaces for SASL mechanisms.29* It is used by developers to add authentication support for30* connection-based protocols that use SASL.31*32* <h2>SASL Overview</h2>33*34* Simple Authentication and Security Layer (SASL) specifies a35* challenge-response protocol in which data is exchanged between the36* client and the server for the purposes of37* authentication and (optional) establishment of a security layer on38* which to carry on subsequent communications. It is used with39* connection-based protocols such as LDAPv3 or IMAPv4. SASL is40* described in41* <A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>.42*43*44* There are various <em>mechanisms</em> defined for SASL.45* Each mechanism defines the data that must be exchanged between the46* client and server in order for the authentication to succeed.47* This data exchange required for a particular mechanism is referred to48* to as its <em>protocol profile</em>.49* The following are some examples of mechanisms that have been defined by50* the Internet standards community.51* <ul>52* <li>DIGEST-MD5 (<A HREF="http://www.ietf.org/rfc/rfc2831.txt">RFC 2831</a>).53* This mechanism defines how HTTP Digest Authentication can be used as a SASL54* mechanism.55* <li>Anonymous (<A HREF="http://www.ietf.org/rfc/rfc2245.txt">RFC 2245</a>).56* This mechanism is anonymous authentication in which no credentials are57* necessary.58* <li>External (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>).59* This mechanism obtains authentication information60* from an external source (such as TLS or IPsec).61* <li>S/Key (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>).62* This mechanism uses the MD4 digest algorithm to exchange data based on63* a shared secret.64* <li>GSSAPI (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>).65* This mechanism uses the66* <A HREF="http://www.ietf.org/rfc/rfc2078.txt">GSSAPI</A>67* for obtaining authentication information.68* </ul>69*70* Some of these mechanisms provide both authentication and establishment71* of a security layer, others only authentication. Anonymous and72* S/Key do not provide for any security layers. GSSAPI and DIGEST-MD573* allow negotiation of the security layer. For External, the74* security layer is determined by the external protocol.75*76* <h2>Usage</h2>77*78* Users of this API are typically developers who produce79* client library implementations for connection-based protocols,80* such as LDAPv3 and IMAPv4,81* and developers who write servers (such as LDAP servers and IMAP servers).82* Developers who write client libraries use the83* {@code SaslClient} and {@code SaslClientFactory} interfaces.84* Developers who write servers use the85* {@code SaslServer} and {@code SaslServerFactory} interfaces.86*87* Among these two groups of users, each can be further divided into two groups:88* those who <em>produce</em> the SASL mechanisms and those89* who <em>use</em> the SASL mechanisms.90* The producers of SASL mechanisms need to provide implementations91* for these interfaces, while users of the SASL mechanisms use92* the APIs in this package to access those implementations.93*94* <h2>Related Documentation</h2>95*96* Please refer to the97* {@extLink security_guide_sasl Java SASL Programming Guide}98* for information on how to use this API.99*100* @since 1.5101*/102package javax.security.sasl;103104105