diff --git a/AUTHORS b/AUTHORS index f628794..5547127 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,6 +23,7 @@ Soren Hansen Paul Jimenez Brian K. Jones Ed Leafe +Pablo Llopis Stephen Milton Russ Nelson Colin Nicholson diff --git a/doc/source/details.rst b/doc/source/details.rst index 34074ea..8c542f3 100644 --- a/doc/source/details.rst +++ b/doc/source/details.rst @@ -34,7 +34,7 @@ objects contain a JSON dictionary of the format:: The `` specifies how the user key is encoded. The default is `plaintext`, which saves the user's key in plaintext in the `` field. The value `sha1` is supported as well, which stores the user's key as a salted -SHA1 hash. The `` can be specified in the swauth section of the proxy server's +SHA1 hash. Note that using a one-way hash like SHA1 will likely inhibit future use of key-signing request types, assuming such support is added. The `` can be specified in the swauth section of the proxy server's config file, along with the salt value in the following way:: auth_type = diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index db9c863..3e083eb 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -41,7 +41,15 @@ use = egg:swauth#swauth # useful when a load balancer url should be used by users, but swauth itself is # behind the load balancer. Example: # default_swift_cluster = local#https://public.com:8080/v1#http://private.com:8080/v1 +# Number of seconds a newly issued token should be valid for. # token_life = 86400 +# Specifies how the user key is stored. The default is 'plaintext', leaving the +# key unsecured but available for key-signing features if such are ever added. +# An alternative is 'sha1' which stores only a one-way hash of the key leaving +# it secure but unavailable for key-signing. +# auth_type = plaintext +# Used if the auth_type is sha1 or another method that can make use of a salt. +# auth_type_salt = swauthsalt # Highly recommended to change this. If you comment this out, the Swauth # administration features will be disabled for this proxy. super_admin_key = swauthkey diff --git a/swauth/authtypes.py b/swauth/authtypes.py index c3037bb..3027381 100644 --- a/swauth/authtypes.py +++ b/swauth/authtypes.py @@ -19,7 +19,7 @@ This module hosts available auth types for encoding and matching user keys. For adding a new auth type, simply write a class that satisfies the following conditions: -- For the class name, apitalize first letter only. This makes sure the user +- For the class name, capitalize first letter only. This makes sure the user can specify an all-lowercase config option such as "plaintext" or "sha1". Swauth takes care of capitalizing the first letter before instantiating it. - Write an encode(key) method that will take a single argument, the user's key,