[Vault] 기능 별 내용-2 (Secret Engine)
Checkbox |
|
---|---|
Date |
요약
- Secret Engine은 모듈 형태로 존재하며, Vault 내에서 필요한 기능만 활성화 하여 사용한다.
- Secret 엔진도 마찬가지로 경로를 통해 할당 및 저장이 되며, 동일 기능 복수 생성이 가능하다
- 대부분의 Secret 엔진은 내부에 Role을 설정하여 역할을 지정하고 사용한다.
내용
- Secret Engine
- 데이터를 저장, 생성 또는 암호화 하는 구성요소
- Vault Secret Engine은 경로를 통해 활성화 된다.
- 단순히 데이터를 읽고 저장하는 것 부터, totp부터 인증까지 여러가지를 지원해준다.
- Secret Engine 라이프 사이클
- 활성화, 비활성화 - Secret Engine을 사용 여부를 선택 가능 (Disable 하면 해당 경로가 사라짐)
- 이동 - Secret Engine 경로를 이동한다. Secret 정보들은 경로와 연결되어 있기 때문에 모든 Secret 값을 취소한다. 단순히 구성 데이터만 이동 중에도 유지가 됨
- 조정 - TTL과 같은 보안 엔진에 대한 전역 구성 값들을 조정할 수 있다.
- 여러가지 Secret Engine (각 페이지로 자세하게 다룰 예정)
- KV (key-value)
- 일반 적인 키-값 저장소 키에 대한 단일 값을 저장하도록 구성(kv1) 각 키에 대해 구성 가능한 버전 수가 저장되도록(k2)가 존재
- k1→k2 로 업데이트 가능
- SSH (signed ssh key)
- 사용자의 공개키와 개인키를 Vault 서버에 인증 받아, 인증된 새로운 공개키(signed key)를 받고 ssh 접속 시 signed-key와 개인키를 통해 접속한다.
- OTP를 사용하지 않고 CA를 사용한다면 에이전트 설치도 필요없다
- 단 Trust key를 등록하는 것과 sshd 서비스를 재시작해야 한다는 문제는 있다 (리붓 없이 가능하다)
- Database MYSQL (certification)
- 데이터베이스 암호 엔진은 구성된 역할을 기반으로 자격 증명을 생성한다.
- Secret엔진을 활성화 한 후, 해당 DBMS에 대한 플러그인을 맵핑한다.
- 새 자격증명을 받아와서 해당 정보로 접근한다.
- KV (key-value)
고려해야 할 점
- Signed SSH key를 할당 받으면 할당된 일정 시간 동안 접근이 가능하다.
- GUI 버그 - 설정 정보를 GUI에서 수정하다보면 일부 설정 정보가 날라감
- 실행 중 PTY allocation request failed on channel 0 문제 발생
- SSH 세션이 고갈되어서 발생하는 문제인가 의심해봤지만 아님
- gui 상에서 edit 버튼 클릭하면서 ssh 시크릿엔진에서 default_extensions의 permit-pty 설정 부분이 사라지는 문제가 발생 ( pty 생성 불가 )
- Vault 계정이 아닌 AWS 인스턴스 생성 시 접근하기 위해 발급한 Pem키를 사용해도 접근이 가능함
- Vault 서버에 문제가 발생할 때, 차선책이 존재한다는 의미
추후 해야할 것
- KV, SSH, Database 각 시크릿 엔진에 대한 테스트 (ssh키를 롤링으로 바꿀 수 있나??)
- 다른 Putty 등 GUI 프로그램에서 ssh 공개키를 추가로 넣을 수 있는 방법이 있나 확인해보기
- 운영환경 구축 및 장애 테스트 해보기(추후)
참고자료
Secrets Engines | Vault | HashiCorp Developer
Secrets engines are components which store, generate, or encrypt data. Secrets engines are incredibly flexible, so it is easiest to think about them in terms of their function. Secrets engines are provided some set of data, they take some action on that data, and they return a result.

Static Secrets: Key/Value Secrets Engine | Vault | HashiCorp Developer
Vault can be used to store any secret in a secure manner. The secrets may be SSL certificates and keys for your organization's domain, credentials to connect to a corporate database server, etc. Storing such sensitive information in plaintext is not desirable. NOTE: This tutorial demonstrates the use of Key/Value Secrets Engine Version 1.

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.

Database - Secrets Engines | Vault | HashiCorp Developer
The database secrets engine generates database credentials dynamically based on configured roles. It works with a number of different databases through a plugin interface. There are a number of built-in database types and an exposed framework for running custom database types for extendability.

728x90
반응형
'Devops 솔루션 > Vault' 카테고리의 다른 글
[Vault] 기능 별 내용 -1 (Polices) (0) | 2023.01.19 |
---|---|
[Vault] 기초 개념 & 테스트 환경 구축 (0) | 2023.01.19 |