Commit Graph

29 Commits

Author SHA1 Message Date
Tim Hockin
d01ea11a6e Merge pull request #3856 from smarterclayton/validation_logic_needs_cleanup
Validation of ObjectMeta is inconsistently applied
2015-01-29 14:12:44 -08:00
nikhiljindal
521728e920 Deleting OperationHandler for handling /operation endpoint on server 2015-01-28 13:13:10 -08:00
Clayton Coleman
a0356bca96 Unify validation logic for create and update paths
Ensure ObjectMeta is consistently validated on both create and update

Make PortalIP uncleareable
2015-01-28 13:10:37 -05:00
nikhiljindal
de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Clayton Coleman
455bc17616 Some actions now return 405 in integration auth_test.go 2015-01-12 12:56:01 -05:00
derekwaynecarr
a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr
1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
Eric Tune
029a9b6400 Remove whoami handler.
This was a temporary thing.  Not aware of anyone using it.
2014-12-11 21:31:06 -08:00
Clayton Coleman
d0087dfe62 Integration tests don't initialize with a client
Result is a 500 error if the client object is used
2014-12-10 12:08:18 -05:00
Tim Hockin
ff8c5f9415 Add a Detail field to Validation Error 2014-11-24 17:28:42 -08:00
Jordan Liggitt
c895331277 Make master take authenticator.Request interface instead of tokenfile 2014-11-19 15:07:51 -05:00
Deyuan Deng
c20ceea170 Add more validation for updating node. 2014-11-17 13:42:31 -05:00
Deyuan Deng
cc310e0e71 Support node label update. 2014-11-17 13:42:31 -05:00
Daniel Smith
9430bb38b8 Merge pull request #2282 from bgrant0607/docgen
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Daniel Smith
de75e5a9bb Fix server-side namespace handling for events; add validation 2014-11-14 09:43:28 -08:00
Brian Grant
7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Eric Tune
913cbd0fd1 Make deletes synchronous to avoid 202.
Also, get some POSTs I missed the last time.
2014-11-06 16:48:56 -08:00
Eric Tune
f739103de9 POST synchronously so following GET will succeed.
Should reduce flakiness of this test.
2014-11-05 21:40:27 -08:00
Eric Tune
6e81e8c896 Basic ACL file.
Added function to read basic ACL from a CSV file.
Added implementation of Authorize based on that file's policies.
Added docs on authentication and authorization.
Added example file and tested it.
2014-11-05 16:06:22 -08:00
Daniel Smith
c971763be2 Add anon. functions so that defers are executed where expected. 2014-11-05 14:42:37 -08:00
Daniel Smith
78d0e74b20 Clean up auth test slightly 2014-11-05 14:31:18 -08:00
Eric Tune
1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune
3045035512 Get user from request and put in authz attribs.
Added integration tests for user-based auth.
2014-11-03 16:38:56 -08:00
Eric Tune
795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Dawn Chen
cccf98cd61 Fix TestAuthModeAlwaysAllow.
Fix #2137
2014-11-03 09:46:45 -08:00
Eric Tune
4b74be0f06 Improve integration test
Use some constants for tokens.
Refactor tokenfile creation to function.
Reorder some test cases to make lookups follow creates so they succeed.
Add expected status code to test cases (some are not quite what expected,
so filed bugs #2112, #2113, #2114)
Check expected status codes.
Close Body after each iterations so that we don't run out of file handles
  when I add even more test cases in the next PR.
Handle that it is unpredictable whether status 200 or 202 is returned.
2014-11-02 16:31:20 -08:00
Eric Tune
55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Eric Tune
9713b58caa Allocate mux in master.New()
Callsites no longer allocate a mux.
Master now exposes method to install handlers
which use the master's auth code.  Not used
but forks (openshift) are expected to use these
methods.  These methods will later be a point
for additional plug-in functionality.
Integration tests now use the master-provided
handler which has auth, rather than using the mux,
which didn't.  Fix TestWhoAmI now that /_whoami
sits behind auth.
2014-10-29 14:31:07 -07:00
Eric Tune
f7ebc7d0d5 Added /_whoami and integration test for auth(z|n)
Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
2014-10-28 09:33:45 -07:00