From aa0a31bec215b6b8a7c1a582cfbbe2ef197843f9 Mon Sep 17 00:00:00 2001 From: mosen Date: Fri, 7 Oct 2016 12:20:16 +1100 Subject: [PATCH] Fix comma in mdmEnrollResponse (#23) * Stub new method for application datastore Handle command failures more gracefully than continuously retrying. Failures are not logged Add table for certificates. (cherry picked from commit 9f580a6) * Remove methods with signature NewDatastore() from datastores and injection of the logger instance into each datastore because groob is a doodoo head :) Move NewDatastore methods into unit tests Reinstate NewDB test Create certificates package including a Certificate type and a datastore. Began working on a method ackCertificateList in the connect service. Boilerplate for management service test. Renamed some tables in certificates migration, hopefully nobody notices. Applications response handler should be omitted from this branch. (cherry picked from commit 8bc2fc7) * Add device uuid to certificate, as there will never be a normalised form of the certificate data. Change statments to reflect table change from certificates to devices_certificates Add the CertificateList request type to the connect service's Acknowledge method Add certificates datastore to the management service, and add endpoints and request/responses for retrieving certificates by device uuid to the management endpoujnt. Kludge. commits regarding app service will be amended. (cherry picked from commit c723c80) * Don't forget the endpoint definition for certificates! (cherry picked from commit 4e5fc1f) * Use byte field for certificate data. (cherry picked from commit 66d5036) * Fix empty import in certificates (cherry picked from commit b6d4dca) * Add table for certificates. (cherry picked from commit 06bc231) * Renamed some tables in certificates migration, hopefully nobody notices. Rebase develop onto master (cherry picked from commit 775484d) * Certificate list responses are saved via replacing the entire certificate list on a per device basis. This is because neither the common name nor the data could be used as a unique constraint in the certificates table. Few small changes to imports/style. (cherry picked from commit e0a63e1) * Properly rollback if certificate insert fails for any certificate in a response. (cherry picked from commit 99e1ea1) * Fix several incorrect statements and struct tags which were preventing the certificates management endpoint from listing certs. Certificate listing is working without a base64 encoded representation of each certificate. (cherry picked from commit 685dfef) * Add commands index to command datastore. Add simple test for commands index Add commands index endpoint (cherry picked from commit 4e2a2a2) * Add handler for GET /mdm/commands (cherry picked from commit ae71b8f) * Added Find() method to commands datastore so that the request that matches a response can be retrieved by the connect service. Added Find() method to command service (cherry picked from commit ebceb28) * Fix globally scoped vars in command datastore test suite * groob prefers inline definition of struct members. * Uppercase CommandUuid * Add ackCertificateList to connect service, accidentally omitted from installed_certificate_list PR #14 Make push endpoint conform to Errorer interface. Wrap error return in management service. Add missing certsDB in main.go, should have been part of installed_certificate_list PR #14 * Fix erraneous comma in mdmEnrollResponse --- enroll/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enroll/endpoint.go b/enroll/endpoint.go index 291161a8..2bdf5cf5 100644 --- a/enroll/endpoint.go +++ b/enroll/endpoint.go @@ -12,7 +12,7 @@ type Endpoints struct { type mdmEnrollRequest struct{} type mdmEnrollResponse struct { - Profile, + Profile Err error `plist:"error,omitempty"` }