https://github.com/AliyunContainerService/sgx-device-plugin
Kubernetes Device Plugin for Intel SGX
https://github.com/AliyunContainerService/sgx-device-plugin
device-plugin intel-sgx kubernetes
Last synced: 29 days ago
JSON representation
Kubernetes Device Plugin for Intel SGX
- Host: GitHub
- URL: https://github.com/AliyunContainerService/sgx-device-plugin
- Owner: AliyunContainerService
- License: apache-2.0
- Created: 2019-11-29T06:20:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T06:28:45.000Z (over 1 year ago)
- Last Synced: 2024-08-03T01:24:43.669Z (10 months ago)
- Topics: device-plugin, intel-sgx, kubernetes
- Language: Go
- Size: 2.93 MB
- Stars: 67
- Watchers: 12
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README-zh_CN.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-SGX-Open-Source - https://github.com/AliyunContainerService/sgx-device-plugin
README
# sgx-device-plugin
支持 Intel SGX2/SGX1 的 Kubernetes 设备插件
[](https://goreportcard.com/report/github.com/AliyunContainerService/sgx-device-plugin)
[English](./README.md) | 简体中文## 介绍
sgx-device-plugin 由阿里云容器服务团队和蚂蚁金服安全计算团队针对 Intel SGX 联合开发的 Kubernetes Device Plugin,可以帮助用户更容易的在容器中使用 SGX2/SGX1。
Intel(R) Software Guard Extensions (Intel(R) SGX) 是 Intel 为软件开发者提供的安全技术,用于防止指定的代码和数据的窃取和恶意篡改。详情可参考[官方链接](https://software.intel.com/en-us/sgx) 。
## 功能
* 无需开启容器特权模式即可使用 SGX;
* 支持 EPC 内存大小自动获取;
* 支持容器声明式 EPC 内存分配;
* 支持 SGX2 驱动(/dev/sgx_enclave、/dev/sgx_provision、/dev/sgx/enclave、/dev/sgx/provision)自动透传和挂载到容器;
* 支持 SGX1 驱动(/dev/isgx、/dev/sgx)自动透传和挂载到容器;## 依赖
* 对于 SGX1
* [Intel SGX Drivers](https://github.com/intel/linux-sgx-driver)
* [Intel SGX PSW(Platform Software)](https://github.com/intel/linux-sgx) (如果你需要 AESM 服务)
* Kubernetes 版本 >= 1.10
* Go 版本 >= 1.13## ACK-TEE 简介
TEE (Trusted Execution Environment) ,中文名:可信执行环境,是把用户应用程序代码和数据运行在一个通过硬件孤岛和内存加密技术(Hardware Isolation and memory encryption Technology)创建的特殊执行上线文环境 Enclave 中,任何其他应用、OS Kernel、BIOS、甚至 CPU 之外的其他硬件均无法访问,主要用于防止用户的机密数据、隐私数据被恶意修改、窥探和窃取。
在 [阿里云ACK (Alibaba Cloud Container Service for Kubernetes)](https://aliyun.com/product/kubernetes) 上可以创建一个基于 Intel® SGX 的机密计算托管 Kubernetes 集群,节点型号是支持 Intel® SGX 的裸金属服务器 `ecs.ebmhfg5.2xlarge`, 相对于 VM,裸金属的 Overhead 开销更小,性能更优,性能抖动更小。每个节点上默认都会自动安装 containerd、SGX Driver、SGX PSW(Platform Software) 以及 SGX-Device-Plugin。
## 编译&打包镜像(可选)
Step 1: 下载源码并编译。
```bash
mkdir -p $GOPATH/src/github.com/AliyunContainerService
git clone https://github.com/AliyunContainerService/sgx-device-plugin.git $GOPATH/src/github.com/AliyunContainerService/sgx-device-plugin
cd $GOPATH/src/github.com/AliyunContainerService/sgx-device-plugin/
make
ls -l _output/sgx-device-plugin
```Step 2: 镜像打包
```bash
docker build -t {SGX_DEVICE_PLUGIN_IMAGE} . -f Dockerfile
docker push {SGX_DEVICE_PLUGIN_IMAGE}
```## 部署 sgx-device-plugin
在创建ACK机密计算托管集群时,默认会自动安装 sgx-device-plugin DaemonSet。当然你也可以在你自己支持 SGX 的 Kubernetes 中选择手动安装:
```bash
$ cat <