63 Commits

Author SHA1 Message Date
Dolph Mathews
23ca656927 Refactor 404's into managers & drivers (bug 968519)
The goal is to move the responsibility of reference checks away from
controllers and into the underlying managers & drivers, which can
handle the task with equal or greater efficiency.

- Tenant references from create_user/update_user are NOT tested
  due to inconsistencies between backends
- Additional test coverage improvements

Also fixes bug 999209, bug 999608, bug 1006029, bug 1006055, bug 1006287,
bug 1006334, and bug 1006344.

Change-Id: I7de592e7dd4518038436b9a9fdaab559b00a0537
2012-06-27 11:47:24 -05:00
Derek Higgins
375838cfce Carrying over token expiry time when token chaining
Fixes bug #998185

This commit causes the token expiry time to be maintained when
one token is being created from another

Change-Id: I7b61692a60d9227423b93c267864a5abe939ca33
2012-06-05 15:27:13 +01:00
Jenkins
014ccd9a62 Merge "Invalidate user tokens when a user is disabled" 2012-05-19 19:45:24 +00:00
Derek Higgins
628149b3dc Invalidate user tokens when a user is disabled
Fixes Bug 997194

Delete valid tokens for a user when they have been disabled

Moved logic to delete tokens into update_user, as this can be called
directly form the REST API.

Also checks if a user is enabled when creating a token from another
token, this helps in cases there the backend didn't support listing of
tokens (and as a result weren't deleted)

Change-Id: Ib5ed73a7873bfa66ef31bf6d0f0322f50e677688
2012-05-16 23:46:48 +01:00
Mohammed Naser
19b6076869 Add validations of 'name' field for roles, users and tenants.
Fixes LP Bug #997725

Change-Id: I2759d21bed3c0e42642de96184844e1b9e795bb6
2012-05-15 17:47:39 -04:00
Derek Higgins
a67b24878a Invalidate user tokens when password is changed
Fixes bug 996595

This commit will cause all valid tokens to be deleted for a user
who's password is changed (implemented for the sql and kvs backends)

Change-Id: I6ad7da8957b7041983a3fc91d9ba9368667d06ac
2012-05-11 15:29:39 +01:00
Dolph Mathews
9cf91c951e endpoint-crud 404 (bug 963056)
endpoint-create
endpoint-delete

Change-Id: I70ae14ca385a0ed2d3438b8dc2f7ba93b91f400b
2012-03-27 20:18:26 -07:00
Dolph Mathews
9e4fe654ed user-role-crud 404 (bug 963056)
user-role-add
user-role-remove

Change-Id: I1b3cd019d0d110b01ed175822cdd6c9ddb486412
2012-03-27 18:55:42 -07:00
Dolph Mathews
a9c6fb1d39 ec2-credential-crud 404 (bug 963056)
ec2-credential-create
ec2-credential-delete
ec2-credential-get
ec2-credential-list

Change-Id: If8bfb77017f55c24738baf18b937c78b179831e5
2012-03-27 18:48:15 -07:00
Dolph Mathews
a0b8f5412b service-crud 404 (bug 963056)
service-delete
service-get

Change-Id: Ifecf4c74abf408b009a783a9d7be0e98219e0fe4
2012-03-27 17:32:39 -07:00
Dolph Mathews
16caf20830 user-crud 404 (bug 963056)
user-create
user-get
user-list
user-update
user-update-password
user-delete

Change-Id: I7762aaaae9817ea7426039e4700e16b59e18cba1
2012-03-27 17:05:59 -07:00
Dolph Mathews
5c8dcd2f2f tenant-crud 404 (bug 963056)
tenant-get
tenant-update
tenant-delete

Change-Id: I9e67cea985f546c9ddf6ce6d82a11486099bd524
2012-03-27 16:42:10 -07:00
Jenkins
8d12292feb Merge "role-crud 404 (bug 963056)" 2012-03-27 23:08:51 +00:00
Dolph Mathews
92138b4fa7 Improve service CRUD test coverage
Change-Id: I2c4c4da7f962e7e84ae3eb3599d86191698d2cf4
2012-03-26 13:33:41 -07:00
Dolph Mathews
19eb80bead role-crud 404 (bug 963056)
role-get
role-delete
role-list

Change-Id: I099b1e1e5bd2cd77a2ea3b72fb0f14b88a3af26e
2012-03-25 13:05:10 -05:00
Chmouel Boudjnah
3a296a458c Spring cleaning, fix PEP8 violations.
Change-Id: Ide832cd64c9b285213e23901eaf81946d504e726
2012-03-20 22:41:40 +00:00
Jay Pipes
193374af38 Fixes LP #954089 - Service list templated catalog
* Adds missing test cases for the TemplatedCatalog
* Adds a base CatalogTest that different backends
  can use
* Updates kvs.Catalog to raise ServiceNotFound where
  appropriate
* Updates the tests.test_keystoneclient_sql to actually
  test the SQL catalog backend
* Removes old test for incorrect endpoints listing
* Removes the keystone.catalog.core.Driver.service_exists
  method since it was only implemented in the SQL driver
  and wasn't required now that get_service and delete_service
  properly raise ServiceNotFound exception.

Change-Id: I35690cc147e56007be27bacf94eeff360e727e5d
2012-03-19 12:08:30 -04:00
Dolph Mathews
dc41cb5c11 Failing to update tenants (bug 953678, bug 954673)
- GET /tenants: Enabled attribute was being overridden
- "POST" /tenants/{tenant_id}: was failing to update KVS

Change-Id: Icc1efef52d35777d73e6010bdfc0409e24570aa2
2012-03-13 21:38:20 -05:00
Adam Young
63437e9dca LDAP Identity backend
Bug 933852

Merged over the code from the legacy keystone implementation, updated
style and streamlined the API a bit.

 * Unit tests can be run against a live OpenLDAP server
 * Password hashing done via passlib. Only does salted sha1, which is what simple_bind requires, but is not secure.
 * Added pip dependencies

Change-Id: I5296d94f6b7d0a7c7dbc887cdae872171e34bb5f
2012-02-27 16:51:46 -08:00
Jenkins
644811203f Merge "Removing broken & redundant code (bug 933555)" 2012-02-24 18:16:44 +00:00
Jenkins
b734161933 Merge "Return HTTP 401 bad user/password is specified." 2012-02-22 23:44:08 +00:00
Dolph Mathews
510061e080 Removing broken & redundant code (bug 933555)
Change-Id: I6618487885bcb930a28373bc86d07c537f7a1fe1
2012-02-22 13:48:13 -06:00
Dan Prince
015dd3d9d1 Return HTTP 401 bad user/password is specified.
Update keystone/service.py to more gracefully handle auth
failures and return an HTTP 401.

Fixes LP Bug #938815.

Change-Id: I44d7a9b36e6ac30f30326beb76b125dc2addc2fb
2012-02-22 11:50:07 -05:00
Gabriel Hurley
77c11b2ba1 Implements admin logic for tenant_list call.
Incidentally this required refactoring the keystoneclient
tests to differentiate between calls that are explicitly
admin API calls vs. public API calls. Previously all tests
had been hitting the admin API endpoint.

Fixed bug 933786.

Change-Id: I50c2505aefb64636b7b64fbff045fd427715396b
2012-02-21 21:24:19 -08:00
Gabriel Hurley
73f22e1596 Implemented get_tenant_users. Fixed bug 933721.
Change-Id: I3e5337158064e5c3ed6cde8635752685a73f081b
2012-02-21 21:19:01 -08:00
Gabriel Hurley
02ef19a13c Adds missing argument to add_user_to_tenant in create_user.
Previously untested code branch was missing an argument. Adds
unit tests and fixes bug 933034.

Change-Id: I3f404ce1c1607a681d9fbcfa532b8f9027bf037f
2012-02-16 13:29:10 -08:00
Gabriel Hurley
e2384275bf Fixes a failure caused by a recent change to user update in the client.
Change-Id: I9c1e5a7d243a48144eb6f2f6d9c072ae4824ab38
2012-02-16 13:14:34 -08:00
Monty Taylor
8d7189f117 Added Apache 2.0 License information.
Fixes bug 932819

Change-Id: I58e0c2ad704e2e8ff1924a01791694a5e02a154b
2012-02-15 17:48:33 -08:00
Brian Waldon
0e775d628b Add pagination to GET /tokens
* Partially fixes bug 928049

Change-Id: I21943dcc7cea4dabfab672e84fe507e78e430de4
2012-02-10 17:42:27 -08:00
Anthony Young
e5ffa74733 Fix largest memory leak in ksl tests
* Explicitly kill wsgi servers that are launched
 * Fixes bug 929653
 * Fix spaceypoo

Change-Id: Id4b2f06749cb57c2680d37c1e4014c020d95ad5e
2012-02-09 20:06:12 +00:00
Dolph Mathews
c64a12ffc7 Friendly JSON exceptions (bug 928061, bug 928062)
Example http://pastie.org/3338663

Change-Id: I26f53488c062ebfb6e49cfcf82e0b8179a683ea8
2012-02-08 15:56:48 -06:00
Brian Waldon
a3d21f06ad Add auth checks to ec2 credential crud operations
* Re-enables ec2 crud authorization tests
* Fixes bug 928471

Change-Id: I22a97a8659ade5d146b52d112ff66ea58f847ef7
2012-02-08 12:39:40 -08:00
termie
fabad5a660 remove novaclient, fix python syntax
Change-Id: Ib5c523a5feb74fbc6f4f75ec4d112dbcd23a559c
2012-02-06 18:01:08 -08:00
Dolph Mathews
6a5c5248a7 Added support for DELETE /tokens/{token_id} 2012-02-06 09:28:53 -06:00
termie
6fd68e1a38 fix keystoneclient tests 2012-02-01 15:41:16 -08:00
termie
c6e30eb5a1 add tests for essex and fix the testing framework 2012-02-01 15:41:16 -08:00
Monty Taylor
fc3de2491d Use gerrit instead of github
When we run gating tests in jenkins, any access of network resources is a
potential source of false-negative on the test due to intermittent service
failures on systems that are out of our control. We observe that this is
actually quite frequent when things want to access PyPI or github. With
pypi, we pre-create virtualenvs and cache the eggs so that an individual
test run doesn't fail due to pypi not responding. For repos, if at all
possible, we direct them all at the gerrit instance, because since gerrit is
driving the test run in the first place, it's indicative of a much larger
problem if jenkins can't talk to it - and it's one that we can fix if it
does come up.

Change-Id: I9f54133f7f2025d15a9d0b270d2466438cbc6dd5
2012-01-31 14:16:03 -05:00
Jesse Andrews
d6d56e45dc fix style and termie's comments about comments 2012-01-26 15:04:54 -06:00
Jesse Andrews
726b5adab0 invalid params for roles.delete 2012-01-26 00:30:24 -06:00
Jesse Andrews
d5443e2ef0 initial stab at requiring adminness 2012-01-26 00:26:30 -06:00
Jesse Andrews
1efee11f58 add tests that auth with tenant user isn't member of 2012-01-25 19:33:43 -06:00
termie
d4f2bf5fde add a bunch of basic tests for the cli 2012-01-24 23:01:51 -08:00
termie
4899210334 bcrypt the passwords 2012-01-24 00:56:53 -08:00
termie
2ebb89bf80 fix invalid_password, skip ec2 tests 2012-01-23 16:35:41 -08:00
termie
3cce41e280 raise and catch correct authenticate error 2012-01-23 14:53:37 -08:00
termie
86dad078f4 fix user_get/user_list tests 2012-01-23 14:30:22 -08:00
Andy Smith
e34e694ee8 Merge pull request #20 from termie/no_pass_field
add checks for no password attribute
2012-01-19 20:15:48 -08:00
Jesse Andrews
c83bcb1aac add checks for no password attribute 2012-01-19 18:37:30 -08:00
Jesse Andrews
2a91b1c06e users with correct credentials but disabled are forbidden not unauthorized 2012-01-19 18:13:05 -08:00
Jesse Andrews
3d2bb3a355 test login fails with invalid password or disabled user 2012-01-19 17:15:03 -08:00