Commit Graph

14 Commits

Author SHA1 Message Date
Ondřej Nový 022f688a7c Retire swauth
Change-Id: Ib8e22a1e2e35d22a754943e34501305a0cfdd9b9
Depends-On: https://review.opendev.org/678368
See: http://lists.openstack.org/pipermail/openstack-discuss/2019-August/008416.html
2019-08-24 20:04:50 +02:00
Tim Burke 50b8688e7e Use stdlib urlparse
The wrapper swift wrote for IPv6 support hasn't been necessary since
dropping support for Python 2.6 back in 2015. See

- https://github.com/openstack/swift/commit/67de0c8
- https://github.com/python/cpython/commit/8c6d9d7
- https://bugs.python.org/issue2987

Drive-by: use range() since xrange() doesn't exist on py3 and we're only
going to 16; clean up an invalid escape sequence.

Change-Id: Ib124cb27edd4c3defdb4a9e2404dcdcb71e6dd99
2019-05-10 11:04:29 -07:00
Ondřej Nový b548d3dcf7 Add support for setting already hashed password
You can use this for restoring dumped users list from swauth-list
command.
Change-Id: Ia77d7a0b91b2f79999286858e383477a80d7db15
2016-05-24 12:08:38 +02:00
Peter Lisák f5f3d7e72b use standard library json instead of simplejson
Based on https://review.openstack.org/#/c/240596/

Change-Id: I7f5be799ea7dcb49b7d9df830f1f15ee9a02b3ca
2015-11-23 12:13:07 +01:00
Ondřej Nový b15e9637dc PEP8 for bin directory
Closes-Bug: #1516754
Change-Id: I548cf0e86aee57ede32eace505468026ca871fcd
2015-11-20 14:05:30 +01:00
Ondřej Nový 911adf7299 Change print statement to function
Change-Id: I85948efa441aec13c0ab3cf50c66ac2cbc660d4b
2015-11-19 22:40:26 +01:00
Ondřej Nový fca1400e40 Use ValueError instead of Exception when appropriate
Change-Id: I7f9f72b4efcca01170b7e311057e4ed6bae73179
2015-11-15 22:34:27 +01:00
Christopher Bartz 66050b3338 Password prompt if key is not specified. 2014-12-17 12:46:53 +01:00
Prashanth Pai c2bb81a60e Allow users to change their own password/key
Users were not able to update their own password/key
with the update operation resulting in 403 (HTTPForbidden).

EXAMPLES:
Command to update password/key of regular user:
gswauth-add-user -U account1:user1 -K old_pass account1 user1 new_pass

Command to update password/key of account admin:
gswauth-add-user -U account1:admin -K old_pass -a account1 admin new_pass

Command to update password/key of reseller_admin:
gswauth-add-user -U account1:radmin -K old_pass -r account1 radmin new_pass

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-01-20 10:29:24 +05:30
jgrmnprz 5bd5595a80 Swift client import error
Modify swift client import to work with newer versions (>= 1.7.4). 

Correct this error :
swauth-cleanup-tokens -A https://swift.example.org/auth/ -K swauthkey --purge=account1 
Traceback (most recent call last):
  File "/usr/bin/swauth-cleanup-tokens", line 28, in <module>
    from swift.common.client import Connection, ClientException
ImportError: No module named client
2013-06-20 15:40:37 +03:00
Apollon Oikonomopoulos 4c63fbdff8 Add Content-Length header to PUT requests
HTTP PUT requires a Content-Length header and many web servers (e.g. nginx)
enforce this limitation. The management utilities swauth-add-{account,user} and
also middleware.Swauth.handle_put_account do not specify Content-Length with
PUT requests, which causes requests routed through nginx to fail.

Fix this by including a Content-Length of zero for all HTTP PUTs.

N.B.: This is not needed for requests performed via make_pre_authed_request().

Signed-off-by: Apollon Oikonomopoulos <apollon@skroutz.gr>
2013-01-28 16:56:35 +02:00
gholt c94d85d2e7 Fixed #34 Bug when admin adding user 2012-06-15 02:13:08 +00:00
gholt c6533ba327 Added ability to purge stored tokens. Fixes #5 2011-06-06 00:06:59 +00:00
gholt 1e50a54e98 Initial commit of original codebase, altered to work in new codebase. 2011-05-26 10:39:59 +00:00