Re: QPID Proton 12 Issue - can anyone help?

2016-02-29 Thread Andrew Stitcher
On Mon, 2016-02-29 at 17:46 +, Flores, Paul A. wrote:
> I am attempting to build QPID Proton 12 and seeing the following
> errors:
> 
> 
> 
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> ImportError: No module named site
> make[2]: *** [proton-c/src/protocol.h] Error 1
> ImportError: No module named site
> make[2]: *** [proton-c/src/encodings.h] Error 1

This error is happening because the version of python that cmake has
found is wrong and so it can't run python to generate these files.

> ...
> (WHY
> 
>  -- Found PythonInterp: /usr/bin/python (found version "1.4")
> 
> -- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES
> PYTHON_INCLUDE_DIRS) (Required is exact version "1.4")
> 
> )

You appear to have a python 1.4 version installed so that cmake found
it in preference to a more useful version of python.

Try setting your path so that it isn't found before you run cmake.

(1.4 seems odd though as it is so old)

Andrew



QPID Proton 12 Issue - can anyone help?

2016-02-29 Thread Flores, Paul A.
I am attempting to build QPID Proton 12 and seeing the following errors:



Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
ImportError: No module named site
make[2]: *** [proton-c/src/protocol.h] Error 1
ImportError: No module named site
make[2]: *** [proton-c/src/encodings.h] Error 1
make[2]: Target `proton-c/CMakeFiles/qpid-proton.dir/depend' not remade because 
of errors.
make[1]: *** [proton-c/CMakeFiles/qpid-proton.dir/all] Error 2
make[1]: Target `all' not remade because of errors.
make: *** [all] Error 2
make: Target `default_target' not remade because of errors.





Environm1nt: RHEL 7

GCC: 4.8.5

Python: 2.7

cmake: 2.8.11



(WHY

 -- Found PythonInterp: /usr/bin/python (found version "1.4")

-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
(Required is exact version "1.4")

)



Re: SASL

2016-02-29 Thread Robbie Gemmell
Hi Kai,

As Gordon noted, proton can be used in different ways. In the case
where it is used purely as an AMQP protocol engine with e.g TLS being
provided by the external IO being used with it, getting the Principal
would currently fall to that code rather than proton. That is how
proton-j currently sees most of its usage (or at least, the usage I'm
actually familiar with).

The SASL/TLS related API's in proton-c have seen major rework since
earlier releases, but the equivalents in proton-j have not and now
differ substantially. I dont see an equivalent of the APIs Gordon
referenced below, however as above its likely those may not apply in
the particular usage context anyway when it comes to proton-j.

I don't think there is much in the way of examples in this area I'm
afraid other than the code of components using it (e.g the ActiveMQ
brokers, or the Qpid JMS client).

Robbie

On 29 February 2016 at 17:11, Kai  wrote:
> Thanks for your replies, Gordon. I didn't explicitly mention that I was
> interested in accessing the Principal from Java but you seem to have
> guessed that already :-) However, the question is still open, right?
>
> Kai
>
> On Mon, Feb 29, 2016 at 6:04 PM Gordon Sim  wrote:
>
>> On 29/02/16 14:56, Gordon Sim wrote:
>> > On 28/02/16 15:59, Kai wrote:
>> >> I was trying to find some examples or documentation regarding how to use
>> >> SASL in Proton but did not find anything so far. Can you point me into
>> >> the
>> >> right direction? In particular I am interested in determining the
>> >> identity
>> >> of a client that has been authenticated as part of a TLS handshake (if
>> >> that's possible) ...
>> >
>> > In the c api, pn_ssl_get_remote_subject() gets you the subject field of
>> > the certificate. In python that is exposed as a remote_subject property
>> > on the ssl object associated with the transport.
>> >
>> > I'm not sure if/how the java api's offer the behaviour, anyone else able
>> > to comment on that?
>>
>> One thing to add/point out here is that proton can be used in different
>> ways. One use is simply as a protocol engine, with bytes pumped in and
>> out by an external io component. In that usage model, you would use
>> java's built in support for SSL (as part of the io).
>>


Re: SASL

2016-02-29 Thread Kai
Thanks for your replies, Gordon. I didn't explicitly mention that I was
interested in accessing the Principal from Java but you seem to have
guessed that already :-) However, the question is still open, right?

Kai

On Mon, Feb 29, 2016 at 6:04 PM Gordon Sim  wrote:

> On 29/02/16 14:56, Gordon Sim wrote:
> > On 28/02/16 15:59, Kai wrote:
> >> I was trying to find some examples or documentation regarding how to use
> >> SASL in Proton but did not find anything so far. Can you point me into
> >> the
> >> right direction? In particular I am interested in determining the
> >> identity
> >> of a client that has been authenticated as part of a TLS handshake (if
> >> that's possible) ...
> >
> > In the c api, pn_ssl_get_remote_subject() gets you the subject field of
> > the certificate. In python that is exposed as a remote_subject property
> > on the ssl object associated with the transport.
> >
> > I'm not sure if/how the java api's offer the behaviour, anyone else able
> > to comment on that?
>
> One thing to add/point out here is that proton can be used in different
> ways. One use is simply as a protocol engine, with bytes pumped in and
> out by an external io component. In that usage model, you would use
> java's built in support for SSL (as part of the io).
>


Re: SASL

2016-02-29 Thread Gordon Sim

On 29/02/16 14:56, Gordon Sim wrote:

On 28/02/16 15:59, Kai wrote:

I was trying to find some examples or documentation regarding how to use
SASL in Proton but did not find anything so far. Can you point me into
the
right direction? In particular I am interested in determining the
identity
of a client that has been authenticated as part of a TLS handshake (if
that's possible) ...


In the c api, pn_ssl_get_remote_subject() gets you the subject field of
the certificate. In python that is exposed as a remote_subject property
on the ssl object associated with the transport.

I'm not sure if/how the java api's offer the behaviour, anyone else able
to comment on that?


One thing to add/point out here is that proton can be used in different 
ways. One use is simply as a protocol engine, with bytes pumped in and 
out by an external io component. In that usage model, you would use 
java's built in support for SSL (as part of the io).


Re: SASL

2016-02-29 Thread Gordon Sim

On 28/02/16 15:59, Kai wrote:

I was trying to find some examples or documentation regarding how to use
SASL in Proton but did not find anything so far. Can you point me into the
right direction? In particular I am interested in determining the identity
of a client that has been authenticated as part of a TLS handshake (if
that's possible) ...


In the c api, pn_ssl_get_remote_subject() gets you the subject field of 
the certificate. In python that is exposed as a remote_subject property 
on the ssl object associated with the transport.


I'm not sure if/how the java api's offer the behaviour, anyone else able 
to comment on that?