title: how to securely store a password for a 3rd party service in django?
body: <p>I'm running a web service on Django. Users register to my system and provide me login details (username and password) for a 3rd party web service).</p>
  
  <p>My purpose is to store this details in the best and safest way.
  Unfortunately my service needs this data for some offline scripts that query the 3rd party service, so I cannot store the login/password encrypted with user password (and use it to a key do decipher them.</p>
  
  <p>I read lots of articles on stackoverflow, but most of them (like: <a href="https://stackoverflow.com/questions/8036233/what-is-the-best-way-to-store-password-in-database-when-api-call-requires-sendin">What is the best way to store password in database when API call requires sending of password in plain text?</a>) do not need an "offline" access to this data.</p>
  
  <p>The only idea I have is to have these details stored on a very secured server, that only accept request from my django server, and tunnel their communication with tls.</p>
  
  <p>Do you have any other ideas?</p>
  
  <p>Thank you in advance!</p>