How can I give input with getpass to a Flask app when deploying with uWSGI?
I have a Flask app that has some cryptographic components. Specifically,
there is a key on disk that is encrypted, and must be unencrypted in
memory for use during the Flask app processes. In order to unencrypt the
key, the user is prompted to enter a passphrase with getpass when the
application runs.
This works great with app.run() and a single foreground Flask WSGI server.
The problem we're running into is that when deploying with uWSGI, the
uWSGI controller does not allow stdin.
Ideally, what we would like to happen is similar to when you restart or
start Apache or Nginx with SSL - before the service forks it prompts for a
password on stdin.
Any help would be appreciated! Please let me know if I can supply more
details.
No comments:
Post a Comment