Make getpass.getpass use system password keyrings ?

Hello, What about having an option in getpass to store and reuse passwords in system keyrings ? getpass(prompt[, stream]) would become: getpass(prompt[, stream, keyring]) where keyring would be a callable that can be use to retrieve the password from a keyring system and store it the first time. The getpass module could provide some keyring support for: - ssh-agent under Linux - keychain under Mac OS X - ... And let the developers use their own keyring system by providing a callable. Regards Tarek -- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/

On Sat, Jan 10, 2009 at 2:48 AM, Tarek Ziadé <ziade.tarek@gmail.com> wrote:
That sounds like a nice idea. I suggest starting by writing a library keyring get/put functions for the various keyrings out there and releasing it on its own. (ssh-agent, gnome and kde keychains, mac os x keychain, does windows have an api for this?, others?, pwsafe?) -gps

On Mon, Jan 12, 2009 at 8:59 AM, Gregory P. Smith <greg@krypto.org> wrote:
Right, sounds like the best approach (My use case is for Distutils 's register/upload commands)
(ssh-agent, gnome and kde keychains, mac os x keychain, does windows have an api for this?, others?, pwsafe?)
I don't know about Windows, I need to digg, I'll set a list of existing keyrings. Cheers Tarek
-gps
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/

Tarek Ziadé wrote:
I don't know about Windows, I need to digg,
Assuming I understand what the requirement is, you need the authentication functions. Specifically, I think things like CredRead, CredWrite and CredUICmdLinePromptForCredentials would be useful. (getpass may be using these already; I haven't checked). http://msdn.microsoft.com/en-us/library/aa374804(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa375187(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa375171(VS.85).aspx TJG

On Sat, Jan 10, 2009 at 2:48 AM, Tarek Ziadé <ziade.tarek@gmail.com> wrote:
That sounds like a nice idea. I suggest starting by writing a library keyring get/put functions for the various keyrings out there and releasing it on its own. (ssh-agent, gnome and kde keychains, mac os x keychain, does windows have an api for this?, others?, pwsafe?) -gps

On Mon, Jan 12, 2009 at 8:59 AM, Gregory P. Smith <greg@krypto.org> wrote:
Right, sounds like the best approach (My use case is for Distutils 's register/upload commands)
(ssh-agent, gnome and kde keychains, mac os x keychain, does windows have an api for this?, others?, pwsafe?)
I don't know about Windows, I need to digg, I'll set a list of existing keyrings. Cheers Tarek
-gps
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/

Tarek Ziadé wrote:
I don't know about Windows, I need to digg,
Assuming I understand what the requirement is, you need the authentication functions. Specifically, I think things like CredRead, CredWrite and CredUICmdLinePromptForCredentials would be useful. (getpass may be using these already; I haven't checked). http://msdn.microsoft.com/en-us/library/aa374804(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa375187(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa375171(VS.85).aspx TJG
participants (3)
-
Gregory P. Smith
-
Tarek Ziadé
-
Tim Golden