On Mon, 2015-07-06 at 13:14 -0400, Andrew Stitcher wrote:
> On Mon, 2015-07-06 at 17:48 +0100, Robbie Gemmell wrote:
> > ...
> > The old toggle only used to define whether sasl was required or not
> > (which it historically was once you enabled the sasl layer, and the
> > toggle was never implemented in proton-j), whereas IIRC the new
> > 'requireAuth' governs that but also whether ANONYMOUS is allowed or
> > not when a SASL layer is used, is that correct?
> 
> That is true, but I think it actually more useful to be able to select
> authenticated or not compared to using SASL or not (because ANONYMOUS is
> unauthenticated but uses SASL).
> 
> The C implementation does the actual enforcement when it reads the AMQP
> header, which would obviously be a significant change to the Java
> implementation, but I really do think gives a more satisfactory user
> result.

The reason for the complexity and the checking at AMQP header time is to
allow SSL certificates as a valid form of authentication (not
necessarily only used with SASL EXTERNAL). If you don't need to support
that (or at least not yet) then "require authentication" can simply mean
require the SASL layer but don't offer the ANONYMOUS mechanism. That is
what earlier versions of the C code did*, and I think that would be
relatively simple to implement in Java too.

* The C code will still not offer ANONYMOUS as a possible mechanism if
authentication is required. But the overall meaning of the flag is more
complex than this as explained.

Andrew


Reply via email to