Blocked by AEROGEAR-2043.
- Create an http endpoint that reads JSON with the schema in the proposal - Do nothing in the http endpoint. Just parse it and log it. - Integration with Postgres is part of AEROGEAR-2045 - Implement unit tests for the endpoint (unit tests != e2e tests != integration tests) - Any 'engineering' docs?
Some business logic: - Do validation (null check, ...) - Compare the API Key header (sent by the metrics SDK) to the API key stored in the Mobile Client - Timestamp might be missing in the payload. In that case, use server timestamp.
The Mobile Client is an instance of a Custom Resource Defintion (CRD) that we define. It is a simple resource that contains the Mobile Client name and a generated API Key. It can be retrieved using the Kubernetes API. The Mobile Client will exist in the same namespace as the Metrics Service. The Metrics Service can use a ServiceAccount to read the Mobile Client resource. https://kubernetes.io/docs/concepts/api-extension/custom-resources/
There is also a suggestion from [~craig.brookes] in this thread https://groups.google.com/d/msg/aerogear/ELelD8MqXgk/_XrF5jAJAgAJ |
|