JSS security over http tunneling - rmi

I have a mozila.jss ssl socket and I'm using it for RMI connection.
I'm trying to convert the RMI connection to RMI-over-http connection using apache server with tomcat.
For the RMI-over-http I'm using RMIHttpsToCGISocketFactory.
The question is how can I use the JSS authentication (FIPS compatible) over HTTP.
I would appreciate any input on this subject
Thanks

Related

Client to Web socket server to socket client implementation

I am trying to build a application that be behave as server and client that will be written in go.
as a big picture,
web/php websocket client(java script to websocket access) <-> go server(websocket server & socket client) <-> tcp socket server
For starting, I have implemented go to be a socket client, built protocol layer to communicate properly with my socket server and I have used some web socket library to be a websocket server.
My question is how can I pair each connection in secure way and manage connection without hassle.
I was thinking something like pair data structure to tack.
in go-lang syntax
var track_connection map[wss_connection]socket_connection
// create map data with web socket to be a key and track socket connection
this way i can look up the connection by web socket connection.
I am not sure this is clear enough to be a question
please let me know if any clarification is needed.

What is the SecureSocket in AS3?

I'm using the Socket class to upload a file over FTP to a server. I have been trying to figure out how to implement SFTP and I haven't found any library or API anywhere. But as I was working on it I saw a SecureSocket class. Is this SFTP or FTPS / TLS or something else?
Update:
It looks like it's SSL and TLS:
The SecureSocket class enables code to make socket connections using
the Secure Sockets Layer (SSL) and Transport Layer Security (TLS)
protocols.
Can I just switch to using this? Is this what I've been looking for all of my life?
SecureSocket is a TLS-protected socket. It's not related to SFTP (which is a protocol used on top of SSH, not TLS). SecureSocket can be used for FTP/TLS if you write an FTP client in ActionScipt - then you can use that socket.

What kind of proxy server is this?

I want to use this as a proxy server to connect many different clients with servers. Here is what I'm looking to do:
The server software on a user's computer would connect to a proxy server that is running on a VPS. It would pass in some kind of Key or authentication info to identify itself and then would maintain a persistent TCP connection to the proxy server.
A client application running on a mobile device or other computer would connect to the proxy server and pass in some kind of Key or authentication info. The proxy server would match the connection between the client and server based on their authentication info, and then forward all data back and fourth between the connections.
The proxy server would need to be able to handle multiple clients and servers connecting to it at once and use the authentication info to pair them up. There could be multiple clients connecting to the same server at the same time too. The connection from the client and server would both be outbound so that they are not blocked by firewalls. I wrote the client and server software, so I can make them work with any specific proxy.
What is the name of this kind of proxy server? And can anyone recommend any?
Thanks!

Swing Client - EJB2 lookup over HTTP in JBoss 5.1

I have a swing client which connects to my ejb2 application deployed in JBoss 5.1. There is a particular requirement from Customer to make it available on internet.
The deployment architecture is as follows,
swing_client --> extranet_ip |firewall | --> iis7_machine --> jboss5.1_machine.
jndi properties in client is as follows
Context.PROVIDER_URL=http://extranet_ip:9180/invoker/JNDIFactory
Context.INITIAL_CONTEXT_FACTORY=org.jboss.naming.HttpNamingContextFactory
This configuration works fine when the client is inside intranet. But it does not work in internet (extranet).
When I tried initially I got the error 'Connection refused'
After seeing some posts in various forums, I changed the file server\deploy\http-invoker.sar\META-INF\jboss-service.xml, to reflect the extranet_ip in invokerURL.
Aftet this I am getting the following error.
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://10.200.1.193:4546/?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
Where 10.200.1.193 is the intranet IP address of JBoss Server machine.
I tried changing the trasport parameter in remoting-jboss-beans.xml to http, but at that time client is not working in both intranet and extranet.
Please anybody suggest a way forward for this issue. Or is there any other way to implement RMI over Http in JBoss?
Update: As a solution, I had to change my deployment architecture as follows.
swing_client --> extranet_ip |firewall | --> jboss5.1_machine
where the JBoss Application Server will be directly exposed through firewall. Then update clientConnectAddress in the remoting-jboss-beans.xml to the extranet IP. Also open the ports 8080 & 4446 in the firewall for this address.
This way the swing client is working if I use the jnid properties as follows.
Context.PROVIDER_URL : http://extranet_ip:8080/invoker/JNDIFactory
Context.INITIAL_CONTEXT_FACTORY : org.jboss.naming.HttpNamingContextFactory
But still looking for a solution where there is no need to open any non-standard ports and no need to expose the Application Server directly.
After a long struggle I found a solution for my issue. The solution was to change EJB container's invoker type to http in standardjboss.xml. When the invoker is http, it will use the settings in http-invoker.sar for remote binding.

simple example of connecting a tcp socket to spring integration

Does anyone know of a simple example of connecting to a web server using spring integration using a tcp socket? There are examples of simple socket communications in plain java with both the server and client instances. There are also examples of connecting a client to server entirely in spring integration. However, in my attempts to make a simple socket connection to a spring integration gateway by a plain java app the spring side sees the connection but fails out with a max message length exception. So far I cannot find an example that connects these 2 types together.
Thanks
Have a look at Using UDP and TCP Adapters in Spring Integration 2.0 M3.