summaryrefslogtreecommitdiffstats
path: root/net/tools/testserver/device_management.py
Commit message (Collapse)AuthorAgeFilesLines
* Added DMServer updates to the auto-enrollment protobuf fields.joaodasilva@chromium.org2011-12-281-3/+3
| | | | | | | | | BUG=chromium-os:23063 TEST=All works as before. unit_tests:AutoEnrollmentClientTest.* Review URL: http://codereview.chromium.org/9044005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115886 0039d316-1c4b-4281-b951-d872f2087c98
* Re-upload the machine ID during policy fetch if it's missing on the server side.mnissler@chromium.org2011-12-141-2/+23
| | | | | | | | | BUG=chromium-os:22092 TEST=Enroll a device with a bogus serial number. In the policy response, the server should request a serial number update, which should be uploaded after next ChromiumOS boot. Review URL: http://codereview.chromium.org/8933008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114413 0039d316-1c4b-4281-b951-d872f2087c98
* Added auto-enrollment request support to the device_management_backend.joaodasilva@chromium.org2011-12-051-0/+39
| | | | | | | | | | | | | Also extended the testserver's device_management.py handler to serve these requests. BUG=chromium-os:23063 TEST=unit_tests and browser_tests all pass Review URL: http://codereview.chromium.org/8741014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113009 0039d316-1c4b-4281-b951-d872f2087c98
* Fix python scripts in src/netmaruel@chromium.org2011-11-271-1/+0
| | | | | | | | | | | | | | | | | | Make sure that: - shebang is only present for executable files - shebang is #!/usr/bin/env python - __main__ is only present for executable files - file's executable bit is coherent Also fix EOF LF to be only one. TBR=akalin@chromium.org BUG=105108 TEST= Review URL: http://codereview.chromium.org/8669012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111662 0039d316-1c4b-4281-b951-d872f2087c98
* Added a pyauto test for policy and preferences UI.joaodasilva@chromium.org2011-10-041-1/+1
| | | | | | | | | | | | This test verifies that preferences controlled by policy display the "managed by admin" banner on chrome://settings pages. BUG=None, but found a lot of other bugs! TEST=None Review URL: http://codereview.chromium.org/8021005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103876 0039d316-1c4b-4281-b951-d872f2087c98
* Make test server accept oauth token.mnissler@chromium.org2011-07-221-7/+16
| | | | | | | | | BUG=None TEST=Passes tests. Review URL: http://codereview.chromium.org/7490006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93616 0039d316-1c4b-4281-b951-d872f2087c98
* Fix typo in cloud policy testservergfeher@chromium.org2011-06-271-1/+1
| | | | | | | | The RequestHandler for device management should only return 2-tuples, no n-tuples. Review URL: http://codereview.chromium.org/7236035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90558 0039d316-1c4b-4281-b951-d872f2087c98
* Switch test server to new-style "device gone" status code.mnissler@chromium.org2011-06-211-1/+1
| | | | | | | | | | BUG=None TEST=compiles and passes tests Review URL: http://codereview.chromium.org/7200026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89827 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused parts of the cloud policy protocolgfeher@chromium.org2011-06-211-110/+8
| | | | | | | | | TEST=DeviceManagementServiceIntegrationTest.WithTestServer Review URL: http://codereview.chromium.org/7104145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89813 0039d316-1c4b-4281-b951-d872f2087c98
* Make toy DMServer honor managed_users on registration requests.mnissler@chromium.org2011-06-201-1/+7
| | | | | | | | | | BUG=None TEST=Passes unit tests Review URL: http://codereview.chromium.org/7187017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89654 0039d316-1c4b-4281-b951-d872f2087c98
* Reloaded the device-management file before every policy request is answered.sfeuz@chromium.org2011-06-011-24/+37
| | | | | | | | | BUG=none TEST=Start DM-Testserver; start Chrome with CloudPolicy; Change device-management file; Trigger refetch (wait or restart Chrome); confirm that the changes in device_management got propagated. Review URL: http://codereview.chromium.org/7054037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87494 0039d316-1c4b-4281-b951-d872f2087c98
* Fix error reporting in the test server.mnissler@chromium.org2011-04-291-8/+5
| | | | | | | | | | | | We were still using the error protobuf field in the response message, but this has meanwhile been replace by HTTP status codes. BUG=none TEST=toy server successfully generates error response upon invalid/unspecified DM tokens in policy requests Review URL: http://codereview.chromium.org/6883224 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83494 0039d316-1c4b-4281-b951-d872f2087c98
* Merge server-side changes of the cloud policy protocolgfeher@chromium.org2011-04-191-5/+0
| | | | | | | | | BUG=none TEST=Chrome still compiles Review URL: http://codereview.chromium.org/6880031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82158 0039d316-1c4b-4281-b951-d872f2087c98
* Support for repeated strings in policy definitions.mnissler@chromium.org2011-04-181-1/+7
| | | | | | | | | | | BUG=none TEST=manual R=gfeher@chromium.org Review URL: http://codereview.chromium.org/6871008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81935 0039d316-1c4b-4281-b951-d872f2087c98
* Support key rotation in the policy test server.mnissler@chromium.org2011-04-181-10/+19
| | | | | | | | | BUG=none TEST=compiles and passes tests Review URL: http://codereview.chromium.org/6849019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81934 0039d316-1c4b-4281-b951-d872f2087c98
* Support decoding GenericNamedValue based policy.jkummerow@chromium.org2011-04-151-1/+1
| | | | | | | | | | | | Even if it arrives in the ChromeSettingsProto message where Chrome expects to find explicitly typed policy. This is necessary for as long as CPanel/D3 deliver old-style policy. We include this fix on the client side to make a corresponding workaround in DMServer unnecessary. BUG=chromium-os:14102 TEST=UserPolicyCacheTest.OldStylePolicy; manual test against DMServer without the server-side workaround Review URL: http://codereview.chromium.org/6840014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81729 0039d316-1c4b-4281-b951-d872f2087c98
* Update device policy code in test server.mnissler@chromium.org2011-04-141-8/+41
| | | | | | | | | | | | This switches over device policy handling in the test server to the new-style ChromeDeviceSettignsProto protobuf. BUG=none TEST=compiles and passes tests Review URL: http://codereview.chromium.org/6837024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81553 0039d316-1c4b-4281-b951-d872f2087c98
* Support signatures in the policy test server.mnissler@chromium.org2011-04-111-22/+60
| | | | | | | | | | | | | Remove the old certificate-handling code and make the test server read a private key file instead. Public key is sent to the client in PKCS#1/DER format as required by the protocol. BUG=None TEST=manual Review URL: http://codereview.chromium.org/6823004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81090 0039d316-1c4b-4281-b951-d872f2087c98
* Update policy backend and testserver for the latest policy protocolgfeher@chromium.org2011-03-011-85/+141
| | | | | | | | | BUG=chromium-os:11253, chromium-os:11254, chromium-os:11255 TEST=DeviceManagementServiceIntegrationTest.WithTestServer Review URL: http://codereview.chromium.org/6537020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76455 0039d316-1c4b-4281-b951-d872f2087c98
* New policy protobuf protocol.jkummerow@chromium.org2011-02-171-3/+2
| | | | | | | | | | | | | | | (Third attempt to land http://codereview.chromium.org/6409040/ -- now without memory leaks) - cloud_policy.proto autogenerated from policy_templates.json - C++ method decoding the protobuf also autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6532019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75259 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75106 - New policy protobuf protocol.jkummerow@chromium.org2011-02-161-2/+3
| | | | | | | | | | | | | | | | | (Second attempt to land http://codereview.chromium.org/6409040/) - cloud_policy.proto autogenerated from policy_templats.json - C++ method decoding the protobuf also autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6523058 TBR=jkummerow@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75115 0039d316-1c4b-4281-b951-d872f2087c98
* New policy protobuf protocol.jkummerow@chromium.org2011-02-161-3/+2
| | | | | | | | | | | | | | | (Second attempt to land http://codereview.chromium.org/6409040/) - cloud_policy.proto autogenerated from policy_templats.json - C++ method decoding the protobuf also autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6523058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75106 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75082 - New policy protobuf protocol.jkummerow@chromium.org2011-02-161-2/+3
| | | | | | | | | | | | | | | - cloud_policy.proto autogenerated from policy_templates.json - C++ method decoding the protobuf autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6409040 TBR=jkummerow@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75084 0039d316-1c4b-4281-b951-d872f2087c98
* New policy protobuf protocol.jkummerow@chromium.org2011-02-161-3/+2
| | | | | | | | | | | | | - cloud_policy.proto autogenerated from policy_templates.json - C++ method decoding the protobuf autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6409040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75082 0039d316-1c4b-4281-b951-d872f2087c98
* Fix device management testservergfeher@chromium.org2011-02-021-2/+3
| | | | | | | | | | | Fix serving of policies after the recent config file format change. BUG=none TEST=Run the testserver with Chrome and check that policies are applied to Chrome. Review URL: http://codereview.chromium.org/6246043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73448 0039d316-1c4b-4281-b951-d872f2087c98
* New protocol and testserver for the Chrome-DMServer protocolgfeher@chromium.org2011-01-281-11/+213
| | | | | | | | | | | | | | | New features: -Message to ping DMServer and ask if a user is managed -Signed policy responses -Server assigns names to ChromeOS devices A temporary version of cloud_policies.proto is also checked in (it will be auto-generated later). BUG=chromium-os:11253,chromium-os:11254 TEST=none Review URL: http://codereview.chromium.org/6161007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72975 0039d316-1c4b-4281-b951-d872f2087c98
* Always send the device ID when making device management requests.mnissler@chromium.org2010-11-221-1/+3
| | | | | | | | | | | While at it, clean up use of policy constants. BUG=62060 TEST=Compiles and passes existing tests. Review URL: http://codereview.chromium.org/5162006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66949 0039d316-1c4b-4281-b951-d872f2087c98
* Use a service to create device management backends.mnissler@chromium.org2010-11-221-8/+8
| | | | | | | | | | | | | | | Move responsibility for creating backend objects to a device management service object that lives in the profile. Doing allows us to make use of the profile's request context, which has the advantage over the independent request context implementation that stuff is more efficient (i.e. we need to only resolve the proxy once). BUG=63608 TEST=device_management_service_(unit|browser)test.cc Review URL: http://codereview.chromium.org/5153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66948 0039d316-1c4b-4281-b951-d872f2087c98
* Add device management test server to net infrastructure.mnissler@chromium.org2010-11-111-0/+318
This adds a simple device management server implementation written in python that's useful for unit tests and local testing. BUG=62318 TEST=Compiles and browser tests in device_management_backend_browsertest succeed Review URL: http://codereview.chromium.org/4659002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65783 0039d316-1c4b-4281-b951-d872f2087c98