[demos] Update init_ra demo with grpc ratls libs
This commit is contained in:
parent
fa5dfc690d
commit
c72a46bd41
@ -6,7 +6,7 @@ Remote attestation is a key part in the confidential computing. Occlum provides
|
||||
|
||||
Occlum provides a `Init RA` way to seperate the RA operation and the actual application. With this way, the APP developers don't need know too much about the RA and the application doesn't need to be modified for RA.
|
||||
|
||||
This demo shows the `Init RA` way with a sample [`Flask TLS web application`](../../python/flask/), based on [`GRPC-RATLS`](../../ra_tls/) server/client implementation and a modified [`init`](./init_ra/) for Occlum InitFS.
|
||||
This demo shows the `Init RA` way with a sample [`Flask TLS web application`](../../python/flask/), based on [`GRPC-RATLS`](../../../tools/toolchains/grpc_ratls/ra_tls/) server/client implementation and a modified [`init`](./init_ra/) for Occlum InitFS.
|
||||
|
||||

|
||||
|
||||
|
@ -3,21 +3,14 @@ set -e
|
||||
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
export DEP_LIBS_DIR="${script_dir}/dep_libs"
|
||||
export INITRA_DIR="${script_dir}/init_ra"
|
||||
export FLASK_DIR="${script_dir}/../../python/flask"
|
||||
export RATLS_DIR="${script_dir}/../../ra_tls"
|
||||
export RATLS_DIR="${script_dir}/../../../tools/toolchains/grpc_ratls/"
|
||||
|
||||
function build_ratls()
|
||||
{
|
||||
rm -rf ${DEP_LIBS_DIR} && mkdir ${DEP_LIBS_DIR}
|
||||
pushd ${RATLS_DIR}
|
||||
./download_and_prepare.sh
|
||||
./build_and_install.sh musl
|
||||
|
||||
cp ./grpc-src/examples/cpp/ratls/build/libgrpc_ratls_client.so ${DEP_LIBS_DIR}/
|
||||
cp ./grpc-src/examples/cpp/ratls/build/libhw_grpc_proto.so ${DEP_LIBS_DIR}/
|
||||
|
||||
./build.sh
|
||||
popd
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
fn main() {
|
||||
println!("cargo:rustc-link-search=native=../dep_libs");
|
||||
println!("cargo:rustc-link-search=native=/opt/occlum/toolchains/dcap_lib/musl");
|
||||
println!("cargo:rustc-link-search=native=/opt/occlum/toolchains/grpc_ratls/musl");
|
||||
println!("cargo:rustc-link-lib=dylib=grpc_ratls_client");
|
||||
println!("cargo:rustc-link-lib=dylib=hw_grpc_proto");
|
||||
println!("cargo:rustc-link-lib=dylib=occlum_dcap");
|
||||
}
|
@ -8,12 +8,14 @@ targets:
|
||||
- target: /lib/
|
||||
copy:
|
||||
- files:
|
||||
- ${DEP_LIBS_DIR}/libgrpc_ratls_client.so
|
||||
- /opt/occlum/toolchains/grpc_ratls/musl/libgrpc_ratls_client.so
|
||||
- /opt/occlum/toolchains/grpc_ratls/musl/libhw_grpc_proto.so
|
||||
- /opt/occlum/toolchains/dcap_lib/musl/libocclum_dcap.so.0.1.0
|
||||
- target: /
|
||||
copy:
|
||||
- files:
|
||||
- dynamic_config.json
|
||||
- target: /usr/share/grpc/
|
||||
- target: /etc
|
||||
copy:
|
||||
- files:
|
||||
- ${RATLS_DIR}/grpc-src/etc/roots.pem
|
||||
- dirs:
|
||||
- /etc/ssl
|
||||
|
@ -4,13 +4,15 @@ targets:
|
||||
- target: /bin/
|
||||
copy:
|
||||
- files:
|
||||
- ${RATLS_DIR}/grpc-src/examples/cpp/ratls/build/server
|
||||
- /opt/occlum/toolchains/grpc_ratls/musl/server
|
||||
- target: /lib/
|
||||
copy:
|
||||
- files:
|
||||
- /opt/occlum/toolchains/grpc_ratls/musl/libgrpc_ratls_server.so
|
||||
- /opt/occlum/toolchains/grpc_ratls/musl/libhw_grpc_proto.so
|
||||
- /opt/occlum/toolchains/dcap_lib/musl/libocclum_dcap.so.0.1.0
|
||||
- target: /
|
||||
copy:
|
||||
- files:
|
||||
- dynamic_config.json
|
||||
- ../secret_config.json
|
||||
- target: /usr/share/grpc/
|
||||
copy:
|
||||
- files:
|
||||
- ${RATLS_DIR}/grpc-src/etc/roots.pem
|
||||
|
Loading…
Reference in New Issue
Block a user