Feature Request:SSL Connection

Feedback for Q Insight Pad usage

Feature Request:SSL Connection

Postby simotsa » Tue Aug 04, 2015 6:15 pm

It would be good if QiPad can connect to KDB+ with SSL Socket when the server side have SSL implemented.

Or make QiPad Open Source so I can make the change myself :)
simotsa
 
Posts: 4
Joined: Tue Aug 04, 2015 6:04 pm

Re: Feature Request:SSL Connection

Postby Oleg » Fri Aug 14, 2015 11:51 am

Hi, simotsa!

Well, open source isn't going to happen, but I'm ready to discuss with you how you are seeing this implemented.
See, as qpad written in C++ and I'm using kx'es c.obj as is (binary, no sources available), my options to implement openssl are limited to either
1) rewrite serializer/deserializer myself
2) hack on a socket layer with writing jumps to process memory
3) wrap khpun/k to decouple serialization from reading & writing

Would be interested to know how would you attack this problem, even with sources :)
Please, write me to zakharovoleg@gmail.com

Cheers,
Oleg
Oleg
Site Admin
 
Posts: 54
Joined: Fri Jan 14, 2011 5:10 pm

Re: Feature Request:SSL Connection

Postby simotsa » Thu Sep 17, 2015 2:55 pm

My bad, I thought QPad is written in C# instead of C++. There is a C# API with source code available on http://code.kx.com/wsvn/code/kx/kdb%2B/c/c.cs, and it can be customized to add SSL to the Socket object by doing the following:

-public c(string h,int p,string u,int maxBufferSize){_maxBufferSize=maxBufferSize;Connect(h,p);s=this.GetStream();B=new byte[2+u.Length];J=0;w(u+"\x3");s.Write(B,0,J);if(1!=s.Read(B,0,1))throw new KException("access");vt=Math.Min(B[0],(byte)3);}
+public c(string h,int p,string u,int maxBufferSize){
+ _maxBufferSize=maxBufferSize; Connect(h,p);
+ s=new System.Net.Security.SslStream(this.GetStream());
+ B=new byte[2+u.Length];J=0;w(u+"\x3");s.Write(B,0,J);if(1!=s.Read(B,0,1))throw new +KException("access");vt=Math.Min(B[0],(byte)3);
+}

I am sure we can convert the C# code into a C++ library, then we do not have to rely on a proprietary binary blob.
simotsa
 
Posts: 4
Joined: Tue Aug 04, 2015 6:04 pm

Re: Feature Request:SSL Connection

Postby Flying » Tue Aug 23, 2016 7:57 am

I believe that requirements related to SSL like this can be fulfilled by locally setting up a SSL tunnel to the server. I don't think there is any change required in QPad -- simply a tutorial somewhere would do.
Flying
 
Posts: 4
Joined: Thu Jul 07, 2016 7:13 am


Return to Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron