Maybe some sort of security could be achieved:
- Create a new table 'auth_keys' with columns 'device_id' and 'auth_key'.
- Create a new command 'get_auth_key' that accepts a single parameter - a unique device id.
The command returns the 'auth-key' column from 'auth_keys' table if it exists, or creates a new 'auth_key', inserts it into 'auth_keys' table and returns the 'auth_key' to the device.
- All defined write commands (INSERT, UPDATE etc) would have to accept an 'auth_key' parameter.
- All tables used by write commands would have to have an 'auth_key' column created.
- Now a trigger could be created on all tables used by write commands.
The trigger could execute before the write command is executed, it'd check that the 'auth_key' in the write command exists in the 'auth_keys' table.
If 'auth_key' exists in the 'auth_keys' table then the write command would be executed, otherwise the write command would not be executed.
That'd add some code and processing overhead to usage of RDC but provide a layer of authentication.
It'd not be entirely hack proof - a determined hacker could monitor network traffic and find the 'auth_key' being used by their device and the write commands being sent.
I'd guess the only way to prevent such hacks would be to use the HTTPS protocol to connect to the RDC server and that'd start to makes things much more complicated.
Martin.