Skip to content

Commit a278d28

Browse files
Include a section describing how to build KBS docker images [skip ci] (#3785)
### Description The build process for KBS requires a few steps and it's error prone. This PR adds a section of that deployment guide, which describes how to build KBS docker images directly. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Quick tests passed locally by running `./runtest.sh`. - [ ] In-line docstrings updated. - [x] Documentation updated. Co-authored-by: Chester Chen <[email protected]>
1 parent 46f1eb6 commit a278d28

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

docs/resources/cc_arch_diagram.png

187 KB
Loading

docs/user_guide/confidential_computing/cc_architecture.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,17 @@ These measurements are rooted in hardware and cannot be forged by the host. Any
236236

237237
You do not need to sign or measure the entire CVM disk image. Focusing on these critical boot-time components is sufficient to establish a robust and verifiable chain of trust.
238238

239+
240+
Interactions of NVFlare and Trustee KBS
241+
=======================================
242+
243+
The following block diagram shows the interaction among NVFlare CVM, Attestation Agent (AA), Key Broker Service (KBS), Trustee, and Attestation Service (AS).
244+
245+
.. image:: ../../resources/cc_arch_diagram.png
246+
:height: 500px
247+
:align: center
248+
249+
239250
Process of Build and Boot up CVM Image
240251
======================================
241252

docs/user_guide/confidential_computing/hashicorp_vault_trustee_kbs_deployment.rst

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ c. Enable KV engine:
322322
Phase 3: Deploy Trustee KBS (Key Broker Service)
323323
================================================
324324
325-
After Vault is ready, we deploy KBS as the core proxy connecting clients and Vault.
325+
After Vault is ready, we deploy KBS as the core proxy connecting clients and Vault. Optionally, you can
326+
build a docker image and run it directly. To build docker images, please follow the Appendix.
326327
327328
Clone and checkout specific version of code
328329
-------------------------------------------
@@ -771,3 +772,55 @@ How to confirm successful operation:
771772
- Use echo "base64content" | base64 -d to decode and verify content correctness
772773
- In test environments, these warning messages are completely normal and expected
773774
775+
Appendix
776+
========
777+
778+
Build KBS docker images
779+
-----------------------
780+
781+
782+
You can build docker images for kbs based on the Dockerfile in the kbs/docker folder.
783+
However, that file in the current trustee repo at commit id a2570329cc33daf9ca16370a1948b5379bb17fbe
784+
either fails to build or produces docker images with missing dependencies.
785+
You can patch that file with the following diff.
786+
787+
.. code-block:: diff
788+
789+
$ git diff
790+
diff --git a/kbs/docker/Dockerfile b/kbs/docker/Dockerfile
791+
index e529716..45b9271 100644
792+
--- a/kbs/docker/Dockerfile
793+
+++ b/kbs/docker/Dockerfile
794+
@@ -39,17 +39,17 @@ RUN if [ "${ARCH}" = "x86_64" ]; then curl -fsSL https://download.01.org/intel-s
795+
WORKDIR /usr/src/trustee
796+
COPY . .
797+
798+
-RUN cd kbs && make AS_FEATURE=coco-as-builtin ALIYUN=${ALIYUN} ARCH=${ARCH} && \
799+
+RUN cd kbs && make VAULT=true AS_FEATURE=coco-as-builtin ALIYUN=${ALIYUN} ARCH=${ARCH} background-check-kbs && \
800+
make ARCH=${ARCH} install-kbs
801+
802+
-FROM ubuntu:22.04
803+
+FROM ubuntu:24.04
804+
ARG ARCH=x86_64
805+
806+
WORKDIR /tmp
807+
808+
RUN apt-get update && \
809+
apt-get install -y \
810+
- curl \
811+
+ curl gpg \
812+
gnupg-agent && \
813+
if [ "${ARCH}" = "x86_64" ]; then curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | \
814+
gpg --dearmor --output /usr/share/keyrings/intel-sgx.gpg && \
815+
816+
To build the kbs docker image, run the following inside trustee folder
817+
818+
.. code-block:: bash
819+
820+
docker build -f kbs/docker/Dockerfile .
821+
822+
You can run KBS inside a Docker container with ports exposed using the -p option. For example:
823+
824+
.. code-block:: bash
825+
826+
docker run -p 8080:8080 <image_name>

0 commit comments

Comments
 (0)