J-Integra for .NET now supports encryption over TCP/IP or HTTP. This is accomplished through the use of a channel provider on the .NET side that encrypts the data after the binary formatter has been applied. This free provider can be downloaded from GotDotNet. J-Integra for .NET has been verified to work version 1.2.1.0 of the SecureRemoting Provider.
- Access Java server from .NET client
- Access .NET server from Java client
1. Access Java server from .NET client
- You need to get the SecureChannel.dll assembly from Secure Remoting. Once this is built, you'll need to reference it in your .NET client project.
- Include the following in your remoting.config file:
<clientProviders> <formatter ref="binary"/> <provider type="MsdnMag.Remoting.SecureClientChannelSinkProvider, SecureChannel" algorithm="3DES"/> </clientProviders>
| This should be in between the <channel ref="tcp" port="0"> tag.
A sample remoting.config file utilizing the SecureRemoting channel provider is shown below:
<configuration> <system.runtime.remoting> <application> <client url="tcp://localhost:8051"> <ACTIVATED type="Factory, JanetExample" > </client> <channels> <channel ref="tcp" port="0"> <clientProviders> <formatter ref="binary"/> <provider type="MsdnMag.Remoting.SecureClientChannelSinkProvider, SecureChannel" algorithm="3DES"/> </clientProviders> </channel> </channels> </application> </system.runtime.remoting> </configuration>
|
- Finally you should add these tags to your janet.xml file.
<EncryptAlgorithm>3DES</EncryptAlgorithm> <EncryptProtocol>SecureRemoting</EncryptProtocol>
| This should be under the <ServerMap> and right above </default> tags.
A sample <ServerMap> section of the janet.xml file utilizing the SecureRemoting channel provider is shown below:
<ServerMap> <default> <RenewOnCallTime>10</RenewOnCallTime> <PassByReference>true</PassByReference> <InitialContextFactory></InitialContextFactory> <ProviderURL></ProviderURL> <LeaseTime>10</LeaseTime> <PropertySettings> </PropertySettings> <RenewOnCallUnit>1</RenewOnCallUnit> <ActivationMode>0</ActivationMode> <URI>tcp://localhost:8051/</URI> <AssemblyName>JanetExample</AssemblyName> <LeaseUnit>1</LeaseUnit> <EncryptAlgorithm>3DES</EncryptAlgorithm> <EncryptProtocol>SecureRemoting</EncryptProtocol> </default> </ServerMap>
|
2. Access .NET server from Java client
- You need to get the SecureChannel.dll assembly from Secure Remoting. Once this is built, you'll need to reference it in your .NET server project.
- Include the following in your remoting.config file:
<serverProviders> <provider type="MsdnMag.Remoting.SecureServerChannelSinkProvider, SecureChannel" algorithm="3DES" oaep="false" requireSecurity="true" securityExemptionList="127.0.0.1" connectionAgeLimit="120" sweepFrequency="60" /> <formatter ref="binary" typeFilterLevel="Full"/> </serverProviders>
| This should be in between the <channel ref="tcp" port="0"> tag.
You can add more IP in securityExemptionList as:
securityExemptionList="127.0.0.1;196.168.2.3" |
- Finally you should add these tags to your janet.xml file.
<EncryptAlgorithm>3DES</EncryptAlgorithm> <EncryptProtocol>SecureRemoting</EncryptProtocol>
|
This should be for each Object under the <ClientMap> tag including <default>. A sample <ClientMap> section of the janet.xml file utilizing the SecureRemoting channel provider is shown below:
<ClientMap> <default> <AuthMethod>None</AuthMethod> <URI>tcp://localhost:7561</URI> <ActivationMode>1</ActivationMode> <AuthUserid></AuthUserid> <AuthPassword></AuthPassword> <Format>binary</Format> <EncryptAlgorithm>3DES</EncryptAlgorithm> <EncryptProtocol>SecureRemoting</EncryptProtocol> </default> <csharp_server.ClassByReference> <AuthMethod>None</AuthMethod> <AuthPassword></AuthPassword> <AuthUserid></AuthUserid> <ActivationMode>0</ActivationMode> <URI>tcp://localhost:7561</URI> <Format>binary</Format> <EncryptAlgorithm>3DES</EncryptAlgorithm> <EncryptProtocol>SecureRemoting</EncryptProtocol> </csharp_server.ClassByReference> </ClientMap>
|
|