You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Francesco Romano (JIRA)" <ji...@apache.org> on 2012/08/28 09:52:07 UTC

[jira] [Created] (AMQ-3996) NIO + SSL: Client certificates are null

Francesco Romano created AMQ-3996:
-------------------------------------

             Summary: NIO + SSL: Client certificates are null
                 Key: AMQ-3996
                 URL: https://issues.apache.org/jira/browse/AMQ-3996
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.6.0
            Reporter: Francesco Romano


If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).

The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-3996:
------------------------------

    Affects Version/s: 5.7.0
    
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444335#comment-13444335 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Added the change to update the SSLSession instance post handshake so that the session in use contains accurate data about the cipher suites etc that are in play for that current session. 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478234#comment-13478234 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

This one's got be a bit stumped.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Lionel Cons (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476878#comment-13476878 ] 

Lionel Cons commented on AMQ-3996:
----------------------------------

We use X.509 authentication on our SSL connectors.

Because of this bug, STOMP+NIO+SSL authentication always fails with: java.lang.SecurityException: User name [null] or password is invalid.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Lionel Cons (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479657#comment-13479657 ] 

Lionel Cons commented on AMQ-3996:
----------------------------------

Christian/Tim, in our setup, we use the jaasDualAuthenticationPlugin. Its code contains:

{code}
   isSSL = (transportConnector.getServer() instanceof SslTransportServer);
{code}

This does not seem to be correct with NIO. Could you please check if you can make cert auth work with jaasDualAuthenticationPlugin?
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Posta updated AMQ-3996:
---------------------------------

    Attachment: NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
                broker-jaas-ssl-nio.xml

Updated my test case... first version didn't set up client credentials properly
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Lionel Cons (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478998#comment-13478998 ] 

Lionel Cons commented on AMQ-3996:
----------------------------------

Christian, in our case the exact same user.properties file works fine without NIO. It is strange that enabling NIO would change the certificate format... What did you change to have your tests pass?
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Francesco Romano (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francesco Romano updated AMQ-3996:
----------------------------------

    Attachment: ssl.png
                nio+ssl.png
    
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Massimo Paladin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Massimo Paladin updated AMQ-3996:
---------------------------------

    Attachment: AMQ3996.tgz

Hello,

it still fails for us with jaasDualAuthenticationPlugin and certificate authentication.
Attached you find the unit test with its configuration files.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: AMQ3996.tgz, broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476870#comment-13476870 ] 

Claus Ibsen commented on AMQ-3996:
----------------------------------

Francesco, so are you indicating that on the 2 screenshots, the nio+ssl has some details missing that are on the ssl screenshot?
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated AMQ-3996:
-----------------------------

    Fix Version/s: 5.8.0
    
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Massimo Paladin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482400#comment-13482400 ] 

Massimo Paladin commented on AMQ-3996:
--------------------------------------

Ok, I opened AMQ-4126.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: AMQ3996.tgz, broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Lionel Cons (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478701#comment-13478701 ] 

Lionel Cons commented on AMQ-3996:
----------------------------------

Tim, could you please be a bit more specific in what is needed in terms of configuration?

We use the jaasDualAuthenticationPlugin with two domains configured in login.config (one with SSL, the other one without) and this works fine with stomp+ssl.

Changing the connector to stomp+nio+ssl breaks the authentication (we get java.lang.SecurityException: User name [null] or password is invalid).

Do we need to add configuration bits that are specific to NIO?
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-3996:
------------------------------

    Attachment: NIOSSLTransportWithJaasCertificateAuthBrokerTest.java

Updated test case, self contained now so we don't need the broker xml config file.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Francesco Romano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444062#comment-13444062 ] 

Francesco Romano commented on AMQ-3996:
---------------------------------------

I tested and it does not work.
The SSLSession in NIO has almost everything null (also local certificate and peer certificate).

The "toString" of the eclipse debug shows this:
[Session-1, SSL_NULL_WITH_NULL_NULL]
In the "standard" ssl it shows
[Session-1, SSL_RSA_WITH_RC4_128_MD5]

If you need other information just ask :)

                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479004#comment-13479004 ] 

Christian Posta commented on AMQ-3996:
--------------------------------------

Lionel,

I changed the user.properties file referenced by my login.conf to match the client with what was in the cert. 

client=CN=client, OU=activemq, O=apache
#client=CN=client, OU=activemq, O=apache, L=Unknown, ST=Unknown, C=Unknown

Now that I think about it, I should have verified the client's cert to make sure it wasn't indeed passing the data in the commented out (second) line and that the SSL code only saw the first line.


                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444048#comment-13444048 ] 

Christian Posta commented on AMQ-3996:
--------------------------------------

Tim, 
I tried that too, doesn't seem to solve it.
The JaasCertificateAuthenticationPlugin seems to require the certificate from the connection also, so I've written a test for NIO+SSL that uses that auth plugin. It will fail also because of this JIRA. I'll attach test case
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478951#comment-13478951 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

There's nothing specific to NIO.  The configuration is the same.  See this documentation on the setup for JaasCertificateAuthenticationPlugin
http://fusesource.com/docs/broker/5.3/security/Auth-JAAS-CertAuthentPlugin.html
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned AMQ-3996:
--------------------------------

    Assignee: Timothy Bish

Tim do you have some time to work on this. It would be great to get fixed for 5.8.0 release.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482316#comment-13482316 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Issues with the Jaas Authentication isn't related to the certificates not being present any longer so I'd recommend you open a new issue for this test so we can track that work there.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: AMQ3996.tgz, broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480109#comment-13480109 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Ok, think that's all fixed now as well.  Would be good to validate under your own configuration using the next nightly SNAPSHOT to ensure I got it all sorted. 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444324#comment-13444324 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

@Christian the config for the nio+ssl in the attached xml should be transport.needClientAuth=true although that doesn't actually make things work it at least sets the option to require the client to send its cert.  
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478404#comment-13478404 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Ok, committed what I believe is the fix for all this now.  In order to test it fully you need to completely setup the Jaas Certificate stuff with the login.config files and such.  For those with the proper config I'd appreciate if you can test out the next SNAPSHOT build and see if this resolves all the problems. 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Posta updated AMQ-3996:
---------------------------------

    Attachment: NIOSSLTransportWithJaasCertificateAuthBrokerTest.java

Testcase
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443609#comment-13443609 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Added the missing code to NIOSSLTransport to attempt to set the property on the ConnectionInfo if the certificates are available.

You can try out the next 5.7-SNAPSHOT and see if this works for you. 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444033#comment-13444033 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

Yes, changes in NIOSSLTransport, see the source tab for this issue to review the changeset.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3996.
-------------------------------

    Resolution: Fixed

This is now fixed on trunk. 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444333#comment-13444333 ] 

Christian Posta commented on AMQ-3996:
--------------------------------------

@Tim good catch, thank you!
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Francesco Romano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444028#comment-13444028 ] 

Francesco Romano commented on AMQ-3996:
---------------------------------------

Sorry... I can't change right now the version of ActiveMQ.

Are the changing only in the NIOSSLTransport class? I can compile it from the 5.7 sources and "inject" it (only the class) in my 5.6 jar ? 
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Cristiano Ghersi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477073#comment-13477073 ] 

Cristiano Ghersi commented on AMQ-3996:
---------------------------------------

Hi Claus, I'm a colleague of Francesco Romano , and I 'mwriting on behalf of him.

If you compare the two screenshots, you'll find that the peerCerts field is null in nio+ssl environment and is valued in ssl one.


                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Francesco Romano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447233#comment-13447233 ] 

Francesco Romano commented on AMQ-3996:
---------------------------------------

It's a bit better... Now at least the session is no more empty.
But still some information are missing.. in particular information about the host (ip and port) and the peer certificates.

I attach two screenshot of the debug window in eclipse for ssl and nio+ssl
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444148#comment-13444148 ] 

Timothy Bish commented on AMQ-3996:
-----------------------------------

The 'SSL_NULL_WITH_NULL_NULL' issue is because the initial call we make to get the sslSession returns an session that's not initialized since the getSession() method can't block.  To fix that we need to update our sslSession in the finishHandshake() method.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>            Reporter: Francesco Romano
>         Attachments: broker-jaas-ssl-nio.xml, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3996) NIO + SSL: Client certificates are null

Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478953#comment-13478953 ] 

Christian Posta commented on AMQ-3996:
--------------------------------------

Tried it out, and it works.

At first I was getting the same errors that Lionel was getting (it got past that part in JaasCertificateAuthenticationBroker.addConnection() where it was making sure the TransportContext was an instance of X509Certificate which is where it was failing previously, but then it would fail at the call to LoginContext.login() with User name [null] or password invalid error) but then I changed the user.properties a little bit to match what the client was presenting in its cert and my tests passed.
                
> NIO + SSL: Client certificates are null
> ---------------------------------------
>
>                 Key: AMQ-3996
>                 URL: https://issues.apache.org/jira/browse/AMQ-3996
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0, 5.7.0
>            Reporter: Francesco Romano
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: broker-jaas-ssl-nio.xml, nio+ssl.png, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, NIOSSLTransportWithJaasCertificateAuthBrokerTest.java, ssl.png
>
>
> If using protocol nio+ssl, the ConnectionInfo transportContext property does not contains peer certificates (which are present in the plain tcp ssl transport).
> The problem is that in the NIO transport, calling sslSession.getPeerCertificates() returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira