[Vault-1] 기초 개념 & 테스트 환경 구축
Checkbox |
|
---|---|
Date |
요약
- Vault는 ID기반 암호화 관리 시스템
- DB 접근 정보 등등 모든 정보를 중앙화 및 API로 제어
내용
- Hashicorp Vault 란
- API-Driven, multi-cloud secrets
- 신원 기반 비밀 및 암호화 관리 시스템
- 인증 및 권한 부여 방법으로 암호화 서비스 제공
- 데이터베이스 자격 증명, 외부용 서비스 API 키
- 액세스를 제공하기 전 클라이언트를 검증하고 권한을 부여
- Vault 목적
- DB 접근 정보 등등 모든 정보를 중앙화 및 API로 제어
- 통신을 암호화
- ACL, Audit, Dynamic Secret (30일 제한)
- 구조
null
- 아키텍처
null - Barrier가 내부를 보호하며, 내부에 접근하기 위해서는 Unseal 작업이 필요함
- 내부에는 Engine들이 돌아가며 특히 Secret Engine은 원하는 것을 추가가 가능하다 (ssh, transit etc)
- Storage Backend와의 연동을 통해 데이터를 저장하며, 다양한 Storage Backend가 존재한다 (Mysql, s3 ..)
- OSS, 엔터프라이즈, 클라우드 형태의 라이센스가 존재하며 Active-Active 형태의 HA는 엔터프라이즈 부터 지원을 한다
- VM에 솔루션을 설치하는 방식도 있지만, Docker를 통해 설치하는 방식도 가능하다.
- AWS에 Vault-cli 설치
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo sudo yum -y install vault export VAULT_ADDR=<SERVER_URL>
- Vault Docker-compose, S3 Backend를 이용한 테스트 환경 설치
# 선 작업 : s3를 접근할 aws 계정 및 IAM 및 버킷 정책 설정 # vault 디렉토리 생성 mkdir vault cd vault # docker-compose 파일 생성 vim docker-compose.yml #docker-compose 내용 version: '2' services: vault: image: vault container_name: vault environment: - VAULT_ADDR=http://127.0.0.1:8200 - VAULT_API_ADDR=http://127.0.0.1:8200 ports: - "80:8200" restart: always volumes: - ./volumes/logs:/vault/logs - ./volumes/file:/vault/file - ./volumes/config:/vault/config cap_add: - IPC_LOCK entrypoint: vault server -config=/vault/config/s3vault.hcl # vault Config 파일 생성 mkdir -p volumes/config vim volumes/config/s3vault.hcl #s3vault.hcl Config 파일 내용 ui = true listener "tcp" { address = "0.0.0.0:8200" tls_disable = "true" } api_addr = "https://127.0.0.1:8200" storage "s3" { region = "ap-northeast-2" bucket = "collie-vault-backend" access_key = "" secret_key = "" } disable_mlock = true
고려해야 할 점
- Vault 를 통해 중앙에서 키와 암호를 관리할 수 있다는 점에서 자동화 할 수 있는 발판
- 장애가 어떤 것이 발생하고 대응할 것이 뭐가 있을지 생각해봐야할 것 같다 (HA)
추후 해야할 것
- Auto Unseal 하는 방법 적용하기
- GUI 기능 확인
참고자료
Introduction | Vault | HashiCorp Developer
Welcome to the intro guide to Vault! This guide is the best place to start with Vault. We cover what Vault is, what problems it can solve, how it compares to existing software, and contains a quick start for using Vault.

Server Configuration | Vault | HashiCorp Developer
Outside of development mode, Vault servers are configured using a file. The format of this file is HCL or JSON. Enabling the file permissions check via the environment variable VAULT_ENABLE_FILE_PERMISSIONS_CHECK allows Vault to check if the config directory and files are owned by the user running Vault.

Use Integrated Storage for HA Coordination | Vault | HashiCorp Developer
In most common scenarios, you configure the Vault server to use a storage backend that supports high availability (HA); therefore, the storage backend stores the Vault data while maintaining the HA coordination. However, not all storage backends support HA (e.g. Amazon S3, Cassandra, MSSQL).

Signed SSH Certificates - SSH - Secrets Engines | Vault | HashiCorp Developer
The signed SSH certificates is the simplest and most powerful in terms of setup complexity and in terms of being platform agnostic. When using this type, an SSH CA signing key is generated or configured at the secrets engine's mount. This key will be used to sign other SSH keys.

728x90
반응형
'Devops 솔루션 > Vault' 카테고리의 다른 글
[Vault] 기능 별 내용 -2 (Secret Engine) (0) | 2023.01.26 |
---|---|
[Vault] 기능 별 내용 -1 (Polices) (0) | 2023.01.19 |