Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements of the service internals #14

Merged
merged 16 commits into from
Sep 26, 2019
Merged

Various improvements of the service internals #14

merged 16 commits into from
Sep 26, 2019

Conversation

hug-dev
Copy link
Member

@hug-dev hug-dev commented Sep 26, 2019

Copy of #13 but on the good branch as a base this time.
Copying comment from Paul, that will be added in a later change.

Approve changes, but suggesting follow-up change to add some fields to the response from the ListProviders opcode. We currently have the integer provider id and a free text readable description. I don't feel that this is enough to fully characterise the provider such that the client can choose to select it.

Recommend adding the following fields in a later change:-

A GUID field (either encoded or stringified), which would be the absolute primary key to identify this provider in any possible deployment.
A manufacturer or vendor field, which would be an informal (human-readable) string field identifying the vendor, eg. "Arm"
An implementation version, which can be a triplet of numerical values: major, minor and revision

hug-dev and others added 16 commits September 26, 2019 16:50
Replaces crossbeam threads with the ones included in the standard
library. This reduces a bit the binary size (1 MB) and the compilation
time (4 seconds).

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I4ac72870b217c7ca3844b93506d18fc645ca2af9
Signed-off-by: Hugues de Valon <[email protected]>
Some Box can be removed because the trait objects are already included
in smart pointer structures.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: If2a67eaaf3bbe5fc57b7186ff79bd6751c876f56
Signed-off-by: Hugues de Valon <[email protected]>
This commit moves the ResponseStatus structure and all related
code to a new file and adds a parsec-specific Result.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I2630cbbe0dedbc89ea202cebb8b9863bc9b3be31
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit refactors the Request and Response structures.
Header, Body and Auth structures are moved into separate files.
RawHeader structures are implemented which hold intermediary
values.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I511e84e7086662ed2a46f67d4cb1d992a9ed4404
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit moves the ownership of the Request and Response
bodies into the converter when doing a conversion.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I955322247b14bfe32fc8337f1df92f96e026c54e
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit adds Builder structures for each service
component, and uses the builders on initialization.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I4d57c1a97291c5501103aebe711a531a01c730a2
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit improves the way conversions are done between
primitive types, making any coercions and overflows explicit.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: Iaa7359d034183f8db75a39b89f34232d656addac
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit adds the ListProviders functionality to the service.
This includes the contracts and interface support and handling of
the requests in the Core and Mbed providers. Providers are now
required to provide a description for themselves.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I717d41cc4fa9a94965552a97eca4ae26b1c782fa
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit adds the ListOpcodes functionality to the service.
This includes the contracts and interface support and handling
of the requests in the Core and Mbed providers. Each provider
can now respond with a list of the opcodes it supports.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I0009e242bd49ec2d5bc872cf2f2205664c3d1a6e
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit refactors the minimal client library. Different
clients are created for different abstraction levels. All the
integration tests have also been refactored to make use of the
new clients.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I7e24b828f8a83eeb19da6fdcf10bb80cb564fd9d
Signed-off-by: Ionut Mihalcea <[email protected]>
This commit modifies the Listen trait for it only to return a trait
object that is Read and Write. It matches better with the design where
the front end handler is only given a Read and a Write.
The main, infinite loop is now placed in the main function and the
listener no longer holds ownership of the front end handler.
Modifies the CI script to make the tests pass.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I82bbb1eca8042be0d243c2e3d8629745e9b37610
Signed-off-by: Hugues de Valon <[email protected]>
This commit introduces the KeyTriple structure which combines the data
needed to uniquely identify a key.
It also updates the trait methods to make them match with the similar
HashMap methods.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: Ibc0c596c1e12a822be649a4222164241c9a40016
Signed-off-by: Hugues de Valon <[email protected]>
Renames it OnDiskKeyIDManager and the module on_disk_manager.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I282aa786042b654107538c4bb69f3290c5e31c4d
Signed-off-by: Hugues de Valon <[email protected]>
This commit adds the key triple to key ID persistence in the On-Disk Key
ID Manager. It adds the new, save and delete methods to be able to
load/save and delete key mappings from/to disk.
The ManageKeyID trait has been modified to now return a Result as there
might be errors when interacting with the persistent device.
The KeyTriple type has been modified to own the application name,
provider and key name data.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: Icef07ba9872136b18255cdf1ee5c1b5c7905b227
Signed-off-by: Hugues de Valon <[email protected]>
When creating a new MbedProvider structure, it is needed to check if
there were any persistent keys stored to check that there is no
difference between the key mappings stored by the key ID manager and the
keys stored by Mbed Crypto.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: Ie21b0cc1a11192edee55c4355372f901ddd7eec8
Signed-off-by: Hugues de Valon <[email protected]>
This commit modifies tests organisation and test script to be able to
add tests for shutdown persistence (tests that will be run before and
after the service is shutdown).
Some service files are fixed to pass the tests.

Changes provided by:
* Ionut Mihalcea ([email protected])
* Hugues de Valon ([email protected])

Change-Id: I6dbf13f7413375e154b56d930b3c8345f32a3566
Signed-off-by: Hugues de Valon <[email protected]>
@hug-dev hug-dev merged commit 80db11c into parallaxsecond:integration Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants