I'm looking for a pattern to store a config file containing sensitive information in a semi trusted hosting environment. Semi trusted in this case meaning I trust them in general, but not with this info (passwords).
In this case I'm writing a simple daemon to watch a folder for changes, and push those changes to a database hosted somewhere else. I'd rather not store the details for that database in plaintext in this semi trusted environment, as I'm unsure if the admins themselves would use it maliciously.
My original plan was to setup the necessary reporting scripts in my untrusted environment, and then execute them remotely from a trusted location, sending config vars on each execution. However it would seem that they log all commands executed on their servers, so this is a no go as they could simply review those logs.
Alternatively I could have a second layer database, whose credentials I store on their server. This database would act as an in between, allowing one set of scripts in an untrusted environment to push data to it, and another set of scripts in a trust environment to pull data from it and move it to it's final destination. I'm less concern about them maliciously corrupting the data, and if they access this database it isn't a big deal as it's entirely separate from my main data store.
This method is rather cumbersome and not exactly secure, so I'd rather avoid it if I can.
Moving away from this untrusted environment is not an option, unfortunately.