Sharing credentials between multiple interactive processes

Marc Aymerich glicerinu at gmail.com
Fri Dec 15 05:51:56 EST 2017


I would like to throw at you some problem that I don't know how to best
approach :)

Have an interactive CLI python program that holds credentials entered by
the user. I want users to be able to spawn a new instance of this program
(on another TTY) without the need of reentering credentials. Want to do it
in a secure way, meaning make it very difficult for malicious programs to
gain access to the credentials. Some solutions that I thought of:

1) From another TTY, communicate with the existing process and tell it to
fork and attach to my TTY. Not sure yet how to do it, but I think is doable.

2) Make the program to be able to send credentials through a Unix Domain
Socket to its peers. Not sure is there any way to prevent sending
credentials to any random process pocking at the socket without a
challenge. Maybe is there any way to validate that 2 running python
processes are executing the exact same code (peers)?

any thoughts?


--
Marc



More information about the Python-list mailing list