0

I have a problem which is 1 http service i'm developing will receive user sensitive data ( 3rd party API KEYS ) and i need to store the keys somewhere where i can retrieve them in clear text.

One of the major concerns here is if my http server gets hacked or one of the packages i'm using for my user facing application turns out to be exploitable a malicious user could get access to the machine and other people credentials.

In order to decrease my attack surface i'm creating a second machine called "secrets", this machine will be responsible for storing the actual keys, so if a malicious user gets access to my application machine he wouldn't get instant access to the list of keys.

The first idea that come to mind is to expose an HTTP API on the secrets machine, but then the malicious user would potentially find the address of my other machine therefore potentially being able to hack that machine as well.

In order to avoid exposing the other machine HTTP address to the first application i'm thinking about sending those keys over a pub/sub in redis, so the "secrets" machine would be subscribed to that channel, hopefully being "undiscoverable" by malicious users.

The question is: if the user finds the credential of my main application and the address of the redis server would then the user be able to discover who is subscribed to my pub/sub?

I'm planning to use redislab or heroku as a redis server.

2
  • Is there some reason you cant just encrypt the secrets on the receiving machine? Something like just encrypting them with GPG with yourself as recipient, but don't give the server the private key. Then when you're ready you can download the encrypted information and decrypt it locally.
    – Nalaurien
    Jun 11, 2017 at 22:54
  • i need the "Secrets" server to use the decrypted data all the time, there is an event loop which keeps polling data for users based on the API KEY. So even if i had them encrypted i would have to decrypt all the time before using, meaning the private key would be on the machine, therefore if someone gain access to it would also be able to decrypt.
    – kroe
    Jun 13, 2017 at 2:33

0

You must log in to answer this question.

Browse other questions tagged .