Class Qpid::Proton::SASL
In: lib/core/sasl.rb
Parent: Object

The SASL layer is responsible for establishing an authenticated and/or encrypted tunnel over which AMQP frames are passed between peers.

The peer acting as the SASL client must provide authentication credentials.

The peer acting as the SASL server must provide authentication against the received credentials.

@note Do not instantiate directly, use {Transport#sasl} to create a SASL object.

Methods

Included Modules

Util::Deprecation Util::Wrapper Util::Deprecation

Constants

NONE = Cproton::PN_SASL_NONE   Negotation has not completed.
OK = Cproton::PN_SASL_OK   Authentication succeeded.
AUTH = Cproton::PN_SASL_AUTH   Authentication failed due to bad credentials.
PROTON_METHOD_PREFIX = "pn_sasl"

Public Class methods

Set the configuration file name, without extension

The name with an a ".conf" extension will be searched for in the configuration path. If not set, it defaults to "proton-server" or "proton-client" for a server (incoming) or client (outgoing) connection respectively.

@param name the configuration file name without extension

Set the sasl configuration path

This is used to tell SASL where to look for the configuration file. In the current implementation it can be a colon separated list of directories.

The environment variable PN_SASL_CONFIG_PATH can also be used to set this path, but if both methods are used then this pn_sasl_config_path() will take precedence.

If not set the underlying implementation default will be used.

@param path the configuration path

True if extended SASL negotiation is supported

All implementations of Proton support ANONYMOUS and EXTERNAL on both client and server sides and PLAIN on the client side.

Extended SASL implememtations use an external library (Cyrus SASL) to support other mechanisms.

@return [Bool] true if extended SASL negotiation is supported

@private @note Do not instantiate directly, use {Transport#sasl} to create a SASL object.

Public Instance methods

Set the mechanisms allowed for SASL negotation @param mechanisms [String] space-delimited list of allowed mechanisms

[Validate]