-
Notifications
You must be signed in to change notification settings - Fork 17
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
App provisioning framework #367
Conversation
7eadf23
to
d1b57c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've managed to provision and launch the application according to the description in the Readme file.
I've encountered some issues, probably related to memory corruption (some erros when parsing the configuration files), when using Islet RMM. Re-running the whole FVP without re-building artifacts solved the problem.
3474b60
to
b788f0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5574545
to
d1ab112
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I nicely describes instructions to execute the app-provisioning example, but it looks hard to understand what it is doing. It could be even nicer if explanations about what each instructions is doning is added.
|
||
cd $ROOT/realm-manager/realm | ||
make deps | ||
make compile-image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have linux-ream under islet/third-party. This is duplicate work.
Why don't you make it built from islet?
By putting your own config under islet/third-party/linux-realm/ and modifying fvp-cca and related scripts to use linux config for app-provisioning, we can avoid building another realm-linux at realm-manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, would you like to just build the kernel with special config? This would leave us with the need to build the initramfs from realm-manager repo.
Could we get a more developer-friendly way (not islet developers, those who want to build apps but are not knowledgeable about CCA internals) to compile, install, and run a new application?? (it might be good for testing purpose in the beginning of app development) For example, from the develop perspective,
I don't think it needs to be done in this PR. But this option would be nice for external developers. |
Do you have anything, in your mind, having to do with handling multiple applications? Do you assume that one device has only one realm daemon (i.e., one realm VM) and all applications should be provisioned into this realm? Or is it flexible?? (It would be flexible I guess. Each application might take up different realm VM) One more thing I'm wondering is, is there any isolation mechanism between applications and the realm daemon? Would it be beneficial to employ a stronger isolation? e.g., the realm daemon is isolated from other applications and even underlying linux kernel, meaning that the realm daemon is secure even the kernel is compromised. |
e7bc20b
to
344aa0c
Compare
Sure, we should redesign the build system to automate stuff. I just think this is a task for another PR as it would most likely require signifficant changes to the build system. We should focus now on reviewing and merging this PR and then later discuss how we want to keep various compenents and next remake the build system.
Current design assumes that you can have multiple realms on a single device and a single realm can run multiple applications. Naturally, we are actively researching the security concerns resulting from running multiple applications inside a realm. For now we came to the conclusion with @p-sawicki2 that enforcing all aplications in a single realm to be from a single vendor is enough. This would eliminate potential security issues arising from adding an application to an existing realm that could have access to existing confidential data of other applications. We assume that applications from a single vendor will not try to hack themselves.
Currently, there is no real isolation between applications and the realm daemon. It was a deliberate design choice due to:
In conclusion, we tried to make this design as simple as possible and not including application isolation was a consciousness decision. Although, nothing is really stopping you from provisioning an OCI image which implements namespaces. In the future, we might look at the CCA planes feature but for now I think that namespaces are sufficient when isolation is needed. |
344aa0c
to
016336a
Compare
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Zofia Abramowska <z.abramowska@samsung.com>
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
tf-a-rss: Enable fetching VHUK from HES Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
- RMI call - verification and validation - use in the sealing-key process Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
… versions Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Also, update the README.md file for app provisioning to point this submodule. Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Use the symmetric sealing key that is derived by Islet RMM. Utilize AES-256-GCM for the encryption of sealed data. Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Piotr Sawicki <p.sawicki2@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
709e9f0
to
d5e6332
Compare
App provisioning
This PR adds app provisioning framework to islet project which allows for installing applications inside realm using OCI containers. The framework components handle everything from downloading, verifying, installing and running the applications. It provides encrypted, persistent storage that each application can use to store confidential data. The realm also checks the authenticity of each application by verifying the application signature against a chain of provided certificates that begin at the embedded CA.
The framework consists of several main components:
Running the demo
The provided demo shows how an example application can be installed in a realm in islet. The detailed instruction goes over:
The detailed instruction to reproduce the app provisioning setup can be found here.
What works now
Known issues
RIM calculation related
Unfortunately, due to the design of how the RIM is calculated for realms, specifying a single RIM value for the application provisioning realm is not trivial. It is caused by measuring the Device Tree Blob which changes based on the kvmtool arguments. Basically, the realm RIM is dependent on such things as:
This is especially troublesome as currently the warden daemon provides one disk image for each application. As a result, the kvmtool creates a separate virtio block device for each disk, leading to a change in the DTB. This should be investigated in the future to either stabilize the DTB or provide a rim measuring software. An example of such application is the modified kvmtool. Therefore, it will be further investigated in the future.
Something wrong with Islet rmm
While running the provisioning setup, we started encountering a truly random errors from various layers of the stack that could not be reproduced in tf-rmm. In detail, we encountered the following errors:
Since we couldn't reproduce them while running tf-rmm there might be some memory issue introduced by islet rmm. We first encountered this issue when we tried to test the application installation using a statically linked rust "hello world" application. It weights about 1MB, due to static linking and debug build. Every time we tried to install it while running islet, the installation process would fail with TLS decrypt error. We then switch to tf-rmm to check if the issue still persisted. To our surprise, it did not. In the next step, we created a lighter "hello world" application that weight only 1KB and managed to get it installed under Islet. This let us conclude that Islet introduces some memory instability that leads to arbitrary corruption when large amounts of data are processed. As of now, we weren't able to pinpoint the issue. You can try to reproduce this issue by trying under islet to:
example_app
from the instruction)light_app
from the instruction).Naturally, this issue must be investigated, as this makes running applications under Islet unstable. Apart from that, #361 also suggest an issue with realm's memory management.