-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for Transport Layer Security (TLS) protocol #14
Comments
@coolface88 I assigned the issue to you. Feel free to ask any questions here or/and report back regularly on progress. Thanks ! |
Great! I will do some investigation first. Thanks |
I have built jDiameter successfully, now I am digging into the code and docs for insights..I am also trying to setup segull and the simulator found in this link http://docs.telestax.com/jdiameter-quick-telscale-diameter-performance-testing-using-seagull/ |
Thanks for the update @coolface88 ! |
I have excuted TLS testing scenarios configured with seagull client and jDiameter server..get an error of SSL_ERROR_WANT_READ from openssl..I will analyse more from tcpdump and enabled debug log. |
Thanks for the update @coolface88, keep us updated |
@coolface88, it's somewhat expected that Seagull and jDiameter won't work properly with TLS. IIRC in jDiameter it's being used RFC 6733 compliant TLS (CER is sent over TLS connection) while seagull uses RFC 3588 TLS (where CER is exchanged and only after successful capabilities negotiation, the transport is upgraded to TLS). Having the RFC 3588 behavior implemented would be a good first step, after that, adding the possibility to choose between the different types, via configuration. |
@brainslog, thanks for your info..it is actually Seagull can work with both RFC 3588 and RFC 6733 based on its configuration scenerios. I was able to test both of them and it worked. At a first glance, I think jDiameter is complying with RFC 3588 not RFC 6733. Anyway I undersand your requirement will do it :) |
@coolface88 were you able to make progress on this ? |
@deruelle Hi, sorry last week I did not touch much. I have excuted the client/server with trace log enabled and understood the execution flow. I have changed the jDiameter code of server side to work with TLS. Hopefully, I will finish this week. Thanks , BR ... Hung |
Thanks for the update @coolface88 ! |
Hi, it takes more time than I thought. There was a problem at TLS handshaking between jDiameter server and Seagull client. The client has not sent any setup information to server to initiate the handshaking. I will investigate more on this issue. |
Thanks for update @coolface88. |
@coolface88 were you able to investigate the issue and get more insights ? |
ClientHello was sent but server did not understand it. I have changed ClientHello message with different formats like SSLv2Hello, SSLv3, TLS advertised as Java supported but no luck so far. One of outstanding known issue regarding ClientHello is large number of cipher suites in it. I am narrowing down the possibilities now. |
@coolface88 great, TLS handshakes are not the most easy to debug. you can try to enable -Djavax.net.debug=all to get more insights |
@coolface88 any news on this issue ? |
@deruelle @brainslog I did all TLS java debug enabling but the info was not very useful. I have spotted out one thing which is quite suspicious. Looks like the handshake message is sending too fast from seagull client so the server has not established the secured socket yet. I still have not figured out how to synchronize this |
Thanks @coolface88 let us know if you were able to make more progress. |
@coolface88 just to let you know. The stack also now has a Netty based TLS implementation as part of #35 which may be worth testing as well. |
netty jdiameter impl is only RFC 3588 at the moment. I tried that with seagull client using TLS and it sent Client Hello without sending a CER. |
@jehanzebqayyum seagull can be configured to work with both RFCs, I will post a guide here later today |
@jehanzebqayyum I assume that you know how to install all TLS related stuff of seagull. |
thanks @coolface88. netty jdiameter impl waits for StartTlsRequest whereas seagull client sends ClientHello after CEA. |
@jehanzebqayyum I am not sure about netty but StartTlsRequest is related to LDAP association. I believe that the current implementation of jDiameter has not coped with this. ClientHello happens during TLS handshaking phase. Maybe this issue need another ticket. |
I removed startTls and change to simple tls handshake impl. Does it look like a successful handshake? P.S: I had to add Inband-Security-Id=1 in CER in seagull config. |
@jehanzebqayyum can you please clarify what is simple tls handshake and share your app and wireshark logs? |
By simple i mean not StartTLS which starts with StartTlsRequest and
StartTlsResponse befor ClientHello. I will share my branch.
But i have a problem that seagull goes to init section again after the
handshake i.e. it sends CER twice. It does not even respect the wait-ms.
|
Thanks @jehanzebqayyum please share it. I could not tell much without logs. Can you confirm that the server side has setup TLS socket successfully before receiving ClientHello ? |
@coolface88 Here it is: netty-tls
In conf.client.xml i only mentioned client certificate and client key. In seagull logs i see following sequence |
@coolface88 @brainslog were you able to validate @jehanzebqayyum testing as well ? |
@jehanzebqayyum I am not sure why removing STARTLS relates to this issue. Do u know if StartTLSRequest happens with this legacy code or just netty? because i did not see that request in the tcp dump. It might take some times to read your code but can you please share your tcp dump and execution log so that I can validate. It should include CER/CEA followed by a sequence of TLS encoded messages in the tcp dump. |
@jehanzebqayyum do you think you can help @coolface88 with his questions ? |
Hi Guys, |
Hi @stephenmontgomery ! Afraid there's no ongoing work on this front on Telestax side at the moment. We're more than happy to review & accept contributions here though! Would you also mind sharing which particular issue you're facing on your side? (RFC 3588 or 6733) and with which other peer (seagull or other) ? |
Currently the TLS support in Diameter stack is somewhat "proprietary", based mostly on the way RFC 6733 specifies, and it's known to work properly between two jDiameter instances but not so much with other stack implementations.
This should be revised and made available in both modes (RFC 3588 and RFC 6733), being defined by configuration (if possible, on a per peer basis).
It should be tested against other implementations (freeDiameter, seagull, etc).
The text was updated successfully, but these errors were encountered: