py9pfactotum

The factotum module implements the plan9port auth library
git clone git://git.danielmoch.com/py9pfactotum.git
Log | Files | Refs | README | LICENSE

README.md (1563B)


      1 py9pfactotum
      2 ============
      3 
      4 py9pfactotum is Python's plan9port Factotum client. It also provides
      5 the following extras:
      6 
      7 - Helper functions that mirror plan9port's auth(3) library
      8 - A [Keyring](https://pypi.org/project/keyring/) backend to connect
      9   to your running factotum server.
     10 
     11 Usage
     12 -----
     13 
     14 In the current (alpha) state of maturity, the implementation is
     15 incomplete. Currently enough is implemented to support the Keyring
     16 backend (i.e., to read passwords from the running server).
     17 
     18 When using the FactotumClient directly, arguments are passed as
     19 keyword arguments, which are built into a key template internally:
     20 
     21 ```
     22 from py9pfactotum import FactotumClient
     23 c = FactotumClient()
     24 c.getpass(server='mail.example.org', user='johndoe')
     25 { 'user': 'johndoe', 'passwd': 'insecure' }
     26 ```
     27 
     28 As with the example above, the client provides high-level methods
     29 that supply the correct 'proto' and 'role' attributes to the key
     30 template. See factotum(4) for more information.
     31 
     32 When using the auth(3) functions, the function signatures mirror
     33 their plan9port counterparts, except that structures are replaced
     34 with dictionaries.
     35 
     36 ```
     37 from py9pfactotum import auth_getuserpasswd
     38 c = auth_getuserpasswd(server='mail.example.org')
     39 { 'user': 'johndoe', 'passwd': 'insecure' }
     40 ```
     41 
     42 Keyring
     43 -------
     44 
     45 The Keyring user interface is transparent, but that library must
     46 be explicitly installed on the system (it is not a hard dependency
     47 of py9pfactotum). Because factotum is not able to persist passwords
     48 (or password deletions), attempts to use the Keyring to do so will
     49 throw an error.