VM Encryption을 위해 Docker의 KMS 서버를 확인했습니다.

소개



이번에는 검증을 위해 무료로 로컬로 실행할 수 있는 KMS를 구축하여 VM Encryption을 테스트하고 싶습니다.

VM Encyription 기능을 활성화하려면 타사 키 관리 서버(Key Management Server(KMS))가 필요합니다.
따라서 VMware 인프라와 별도로 준비해야 합니다.

KMIP for VMware on IBM Cloud를 사용하여 VM Encryption 사용 - Qiita : htps : // 이 m / k는 야마 / ms / 에 47f83d6709c0564d970

OS 버전 확인



이번에는 다음 OS Docker에서 KMS 서버를 시작합니다.
cat /etc/system-release
CentOS Linux release 7.5.1804 (Core) 

Docker 설치



확인 KMS 서버에 필요한 Docker를 설치합니다.

필요한 패키지 설치


sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

리포지토리 추가


sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

최신 버전 Docker 설치


sudo yum install docker-ce

Docker 서비스 시작


sudo systemctl start docker

동작 확인



이 명령으로 올바르게 표시되면 OK입니다.
sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Option : OS 부팅시 Docker를 자동 부팅으로 설정



옵션이지만 설정해 둡시다.
sudo systemctl enable docker

KMS 서버 시작 및 설정



게시된 Docker image를 기반으로 KMS 서버를 로컬로 시작하고 구성합니다.

컨테이너 이미지 다운로드



다운로드는 이것뿐입니다.
docker pull lamw/vmwkmip
Using default tag: latest
latest: Pulling from lamw/vmwkmip
93b3dcee11d6: Pull complete 
0f5812e39a48: Pull complete 
e3ea6cd8b75c: Pull complete 
6babfb2795ad: Pull complete 
cc1693f97254: Pull complete 
ef543cab6bd7: Pull complete 
ab84cc116cf0: Pull complete 
Digest: sha256:ceed15cde1176109d88b9f5dc3878f80a0c155c8778e41c49d5629b2a22b4162
Status: Downloaded newer image for lamw/vmwkmip:latest

컨테이너를 백그라운드에서 시작



즉시 시작됩니다.
docker run -d --rm -it -p 5696:5696 lamw/vmwkmip
0fac953dafedb84875550108f543004b079bcc2f6bb24fd2c9f5cfb96d006ad8

"-d"없이 기동하면 다음의 주의 환기가 표시됩니다.
프로덕션 용도는 상정하지 않고, 암호화 키는 재기동 마다 소거되는 것에 유의해 사용합시다.
재부팅 후 새로 다른 컨테이너를 시작하고 다음과 같은 작업을 수행하면 좋은 것 같습니다.
******* DO NOT RUN THIS IN PRODUCTION *******
*** ENCRYPTION KEYS ARE LOST UPON RESTART ***

vCenter에서 설정



vCenter Server 인스턴스에서 구성을 클릭한 다음 키 관리 서버를 클릭합니다.
KMS 추가를 클릭하고 마법사에 KMS 정보를 지정한 다음 확인을 클릭합니다.



처음에는 기본 KMS 서버로 설정할지 묻는 메시지가 표시되지만 어느 쪽이든 상관 없습니다.



인증서를 "신뢰"합니다.



"키 관리 서버"열에서 올바르게 연결되어 있으면 OK입니다.



엄청 쉽게 구축 할 수있었습니다 ... 웃음

VM Encryption 테스트



가상 머신의 스토리지 정책에서 VM Encryption을 활성화해 봅니다.



덧붙여서 「파워 오프」의 상태가 아니면 화내므로, 종료하고 나서 「VM Encryption」를 유효하게 하게 됩니다.



디스크 공간 정의가 Thin Provision에서 40GB이고 Storage Usage가 약 10GB인 볼륨에 대해 약 5분 내에 완료되었습니다.


요약



vSphere 6.5를 가지고 계신 분은 "VM Encryption"의 새로운 기능을 이만큼 간단하게 테스트할 수 있습니다!
다른 기존 기능과의 호환성 등을 확인해 보는 것은 어떻습니까?
컨테이너는 편리합니다!

Reference


  • Get Docker CE for CentOS | Docker Documentation : htps : // / cs. 도 c r. 코 m / 엔 s 타르 l / ぃ ん x / 도 c 케 루세 / 센토 s / #
  • lamw/vmwkmip - Docker Hub : htps : // 후 b. 도 c r. 이 m/r/ㄴ mw/vmwk 미 p/
  • KMIP Server Docker Container for evaluating VM Encryption in vSphere 6.5 : htps //w w.ゔぃr 있어 lyg에 쭉. 코 m / 2016 / 12 / k 미 pse r ゔ ぇ r 도 c 케 r 굉장히 r fu r 에 ゔ ぁ 아치 군 v m - 엔 cryp 치온-인-vsp에 6-5. HTML
  • 좋은 웹페이지 즐겨찾기