summaryrefslogtreecommitdiffstats
path: root/test/functional_auth/gswauth/test_gswauth_cli.py
Commit message (Collapse)AuthorAgeFilesLines
* Provide more generic string in testAssert of some TCshavanaPushpesh Sharma2014-01-211-12/+12
| | | | | | | | | | | | | | | CLI test case were failing on RHEL systems as the error string on Fedora19 and RHEL6.4 systems are different however a more gereric string is there on both of the systems and this is about that only. It replaces the 'ECONNREFUSED' & 'No address associated with hostname' with 'Check that the admin_url is valid'.Now the TCs pass on both of the OS. Change-Id: I3ba0f169dddf29368f0adb74027256dcdc894b89 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6719 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* fix error handing in swauth toolsThiago da Silva2014-01-141-5/+48
| | | | | | | | | | | | | | | | The swauth tools did not handle an invalid admin_url, so it just failed printing the stacktrace, which is not useful to end users. This fix catches the exception and prints an error message that can help user solve the issue. Change-Id: I806c1cf191b5921e904b155f65cdbde5f2aac695 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6431 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6707 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Fix bug where admin is able to delete reseller_adminThiago da Silva2014-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | Changed the code to only allow the super_admin to delete a reseller_admin. This follows the same logic of user creation, where only the super_admin can create a reseller_admin. Also, took the opportunity to refactor some code and implemented get_user_detail method to remove duplicated code Bug 1260239: https://bugs.launchpad.net/gluster-swift/+bug/1260239 Change-Id: I9e4866cd7ad08698f427846be566ab2364ad4850 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6516 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6690 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
* Fixes,TCs for user/account operation by non super_admin usersPushpesh Sharma2014-01-101-96/+393
| | | | | | | | | | | | | | | | | | | This commit does following: 1.New functions in Utils based on CLI 2.Fixes for existing suite 3.Test cases for non super_admin users doing user/account operations I tried to cover most of the possible test cases that can be duducted from the swauth dev guide and swuath user role matrix.These resources can be found here: https://raw.github.com/rbeede/swauth/master/doc/source/Draft%20Security%20Guide/swift_swauth_roles_matrix.png http://gholt.github.io/swauth/dev/ Change-Id: I45d99252825b82008abb679cffcc980732c815ea Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6676 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Fix users not able to change their own password/keyPrashanth Pai2014-01-081-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 BUG: https://bugs.launchpad.net/gluster-swift/+bug/1262227 Change-Id: I604da5aee67099b29541eb7e51a040a041f1961b Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6650 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6668 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Fix typo and add commentPrashanth Pai2013-12-161-4/+4
| | | | | | | | | | | Fix spelling of "privileges" in gswauth-* commands. Add comment to clarify use of req.credentials_valid. Change-Id: Ibb4d331f57df29e28670252b1360b3a72ea688cf Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6448 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* renaming swauth tools to gswauthThiago da Silva2013-12-111-9/+9
| | | | | | | | | | | | | | | | | | cli tools for account and user mgmt have been renamed from swauth-* to gswauth-* Updated other configuration and test files accordingly Change-Id: Iced3bb27fbd09da45754ddb264f8fb4528ab423c Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6417 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Shilpa MJ <smanjara@redhat.com> Tested-by: Shilpa MJ <smanjara@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6466 Tested-by: Luis Pabon <lpabon@redhat.com>
* gswauth: Fix 403 being returned instead of 401Prashanth Pai2013-12-051-10/+32
| | | | | | | | | | | | | | | | - 401(Unauthorized) is to be returned when user credentials are wrong where as 403(Forbidden) is to be returned when user credentials are correct but the user doesn't have the priveleges to carry out the operation. - Also error messages displayed when using swauth-* command line utilities have been updated. Change-Id: I485786896ad14d3263f4325d1857cacc93adab96 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6336 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* adding tabular output to swauth-listThiago da Silva2013-11-291-2/+15
| | | | | | | | | | | | | swauth-list now shows lists of accounts, users and groups in a tabular format (default). JSON and plain-text options are still available Change-Id: I897009f5f6c05aa4c14e306bb6ad35234e993fcd Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6347 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6372
* Functional Tests for gswauth_cliPushpesh Sharma2013-11-211-0/+246
This test suite plans to tests following gswauth commands:- 1. swauth-prep 2. swauth-add-account 3. swauth-delete-account 4. swauth-add-user 5. swauth-delete-user 6. swauth-set-account-service 7. swauth-cleanup-tokens 8. swauth-list It uses 'commands' python module to execute gswauthcommands, and capture the status and output of commands followed by asserts to verify if the captured status and output is same as expected ones.This initial draft has tests for first 1-5 commands. Change-Id: I8591884e87c6ffd88446aacd04a1db2daab2d189 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6277 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6327