· Feb 28, 2023 2m read

Break the limits of your server

Hi developers!

You are experts in IRIS and know all tricks. The functionality of $ZF(-1,-2,-100, ......)
is nothing new to you And you know the limits of this functionality.
Both give you access to your local server command line environment. And that's it.

And this is sufficient in most cases.
When you run IRIS in a Docker container you are locked into it and isolated.
That's the basic concept of containers. You can access IRIS from outside and
collect data. But nothing goes outside without any external request. Well educated!
That means that your $ZF(..) and also CPIPE is useless in this setup. Enough moaning! You have understood the problem. You are imprisoned!
I have thought about the problem of how to escape from this jail.
And it would be attractive to get the same or better functionality.  How better?
Out of IRIS/Caché you can't get more privileges in your operating system than your
instance or the terminal you run. It's an awkward limitation. Especially in a container.

My solution looks like this:
(Through Hollywood movies I learned you need help from outside to escape wink )
I need to start a slave program in the environment where I want to run my commands.
Not a CHILD process as it should follow exactly my orders. And nothing else!
It became a slave that is not only useful with Docker containers but more generally for
any situation where I don't just talk to my local host, but to any other listening system.

Technical design:
I have created two slave programs (in Python and C++) that listen to a fixed TCP port.
And a commander in COS that transmits his orders. As I talk over TCP my slaves can be 
located anywhere on the net as far as firewalls allow it. In addition, I can provide my
slaves exactly with the appropriate privileges for the target environment independent
of my instance of IRISI/Caché. This was an unplanned but welcome side effect.

You find the code of the slaves and the commander with examples for Linux and
Windows and additional information on how to use and install it on  GitHub.

Orginal in Spanish “Rompe los límites del servidor

Discussion (1)2
Log in or sign up to continue