views:

225

answers:

2

How do you secure a UniData session using UniObjects for .net?

The documentation is severely lacking. The UniObjects for Java documentation has a whole chapter on SSL.

EDIT

The UniObjects .net documentation says this about the UniSession.EncryptionType property:

public int EncryptionType {get; set}

This property gets or sets the default encryption type for the session.

int is the token number for the encryption type, as follows:

0 - UniObjectsTokens.NO_ENCRYPT - No encryption. This is the default value.

1 - UniObjectsTokens.UV_ENCRYPT - Encrypt all data using internal database encryption.

If you set UV_ENCRYPT for a session, all data transferred between client and server is encrypted.

If I set my UniSession object's EncryptionType property to 1 (UniObjectsTokens.UV_ENCRYPT), when I call my UniCommand's Execute method, I get an IBMU2.UODOTNET.UniRPCPacketException that says

"[IBM U2][UODOTNET - UNIRPC][ErrorCode=81004] An argument was requested from the RPC that was of an invalid type"

A: 

Look at Chapter 4 in the UniData Security Features [pdf] document for SSL support. It looks like you can modify your UniObjects connection string to specify that you want a secure connection:

In previous versions, the ConnectionString property was used only to specify the server process to be used for the session. It now provides a second set of parameters to specify a secure connection.

Rob Sobers
How does this relate to UniObjects for .NET?
Ronnie Overby
The section I'm quoting is specifically related to UniObjects.
Rob Sobers
You were linking to the wrong pdf file. I corrected it.
Ronnie Overby
From the document: "The UniObjects session object properties include a ConnectionString property." I checked the session object in UniObjects for .NET. There is no such property. The information that you are referencing either has to do with UniObjects (VB) or UniObjects for Java.
Ronnie Overby
A: 

A very special person found this for me:

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14266821

I will report my findings. More input is welcome.

EDIT

After some research, I found that SSL with UniObjects will only work with Unidata 7.2. My school has 7.1 and we aren't upgrading just yet. But a great developer at another school had a work around. We secured our Uniobjects communication using SSH Port Forwarding. Beautiful. On the computer that runs the uniobjects code, we used srvany.exe and an ssh client to create a windows service. In the ssh client we forward traffic from localhost:uniobjects_port to unidata_server:22.

Ronnie Overby