intel / meta-intel-iot-security

A collection of loosely related OpenEmbedded layers providing several security technologies
MIT License
35 stars 47 forks source link

DISCONTINUATION OF PROJECT.

This project will no longer be maintained by Intel.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.

meta-intel-iot-security

A collection of loosely related OpenEmbedded layers providing several security technologies.

In general, the additional features must be explicitly enabled. Merely adding the layers has little influence on the resulting packages and images, therefore it is possible to build a distro where security is an optional feature.

meta-security-framework is a general-purpose utility layer. Both meta-security-smack and meta-integrity depend on it. meta-security-smack and meta-integrity do not depend on each other.

See the individual layer README's for further instructions.

Testing

Build and unit testing under TravisCI is configured against different OpenEmbedded core branches in .travis.yml. Currently master, jethro, and fido are covered.

Two different TravisCI environments are used:

Both environments have fairly limited disk space, therefore the "rm_work.bbclass" is used to reduce disk usage during building. Even that is often not good enough to compile in one go without running out of disk space.

To overcome these limitations, sstate is stored persistently, shared between all jobs and always updated after compilation, even for jobs which had to be terminate prematurely. That way, restarting a job that failed due to a timeout or full disk will make some progress and eventually succeed. Restarting the "travis-compilation" jobs is useful for this because those jobs make more progress per run.

Bitbake itself gets started under the travis-cmd-wrapper.py helper script which logs system state (disk usage, CPU utilization, running processes) at regular time intervals, which is useful for monitoring a run and also avoids getting killed by TravisCI when there is no normal output for more than 10 minutes (as it can happen when bitbake is working on a single complex task, like compiling the Linux kernel).

In addition, the script ensures that bitbake generates output for non-interactive usage terminates early enough to leave time for sstate uploading.

An Amazon S3 bucket is used to store the sstate. Pull requests get access to existing sstate, but are not allowed to modify it. TravisCI testing is free for open source projects like this one, but S3 is not. The free TravisCI caching was evaluated, but turned out to be not flexible enough. Uploading is done with s3cmd because that offers more control than the TravisCI deploy addon. It also only has Python as dependency, which allows freeing up some disk space by deleting the Ruby runtime environment from the home directory.

To re-create a similar setup:

AWS_ACCESS_KEY and AWS_SECRET_KEY are not exported to pull requests, so there is no risk that they get leaked to malicious commands in a modified .travis.yml and when testing a pull request, uploading is disabled in the current .travis.yml.

The static web hosting is used to configure a HTTP sstate cache server based on the AWS_BUCKET and AWS_BUCKET_REGION, if available. This works because access permissions are set such that Bitbake and wget do not need credentials to access the sstate.

Copying

Unless noted otherwise, files are provided under the MIT license (see COPYING.MIT).