The purpose of this component is to provide a way to securely store sensitive data through LUKS containers while checking the integrity of the data.
Install libuta unified Trust Anchor API: https://github.com/siemens/libuta
You can install build dependencies using the command below:
apt-get install cargo cryptsetup libclang-dev clang llvm rustup
rustup toolchain install nightly
rustup default nightlycargo buildOptimises for size and strips debug info.
cargo build --releaseFirst install cargo-deb with the following command:
cargo install cargo-deb
Then you can build the debian package unseing this command:
cargo debdpkg -i target/debian/securecontainer_0.1.0-1_*.debWhen the software is started for the first time, the AutoOpen file must be created with the following command:
> touch /usr/bin/auto_openTo properly utilise this tool, the secure_container_daemon must be started as it serves as a gRPC server for the secure_container_cli.
Possible commands for secure_container_cli are create, open, close, export and import.
Example:
> secure_container_cli open <MOUNT_POINT> <PATH> <NAMESPACE> <ID> -auto_openTo run the secure_container_daemon:
> secure_container_daemonTo run the secure_container_cli:
> secure_container_cli <COMMAD>To interact with the secure container daemon, there are three possible ways to achive this:
For all the following examples, the secure_container_daemon must be started.
- Using the
secure_container_cli:
> secure_container_cli <COMMAND>This will send a gRPC request to the secure_container_daemon to execute the command.
This commandline tool can be used system-wide after installing the debian package.
- Using the
secure_container_lib:
use secure_container_lib::*;This will allow you to use the library to interact with the secure_container_daemon using the gRPC requests.
For more information, please refer to the documentation.
An Example on how to use the library is provided in the /src/cli.rs file.
- Writing your own gRPC client:
If you want to use the secure container daemon in a different language, then rust, you can write your own gRPC client.
You can find the proto file under
/proto/SecureContainer.protoand thus write your own gRPC client in your desired language.
You can install build dependencies using the command below:
apt-get install cargo cryptsetup libclang-dev clang llvm
rustup toolchain install nightly
rustup default nightlycargo buildOptimises for size and strips debug info.
cargo build --releaseFirst install cargo-deb with the following command:
cargo install cargo-deb
Then you can build the debian package unseing this command:
cargo deb# Run unit tests
cargo test --all-features -- --test-threads 1 --nocapture
# Run positive functionality tests
tests/positive_testing.sh
# Run negative functionality tests
tests/negative_testing.shTo generate the documentation for the components, run the following command:
For the secure container library:
cargo doc --open --lib --no-depsFor the secure container CLI:
cargo doc --open --bin secure_container_cli --no-depsFor the secure container daemon:
cargo doc --open --bin secure_container_daemon --no-deps