Teleport
Teleport는 제로 트러스트 원칙 기반의 접근 제어 솔루션입니다. SSH, Kubernetes API, 웹 애플리케이션, 데이터베이스에 대한 통합 접근 관리를 제공하며, 모든 세션을 기록하고 감사합니다.
아키텍처
구성 요소
Teleport Cluster (Standalone)
- 역할: 인증 서버(Auth) + 프록시(Proxy)
- 이미지:
public.ecr.aws/gravitational/teleport-distroless:18.7.6 - 모드: Standalone
- 백엔드: PostgreSQL (infra-db,
postgres역할) - Proxy 복제본: 2개 (워커 노드에 분산, Soft Anti-Affinity)
- 서비스 타입: NodePort
:30443
Teleport Agent (Kube Agent)
- 역할: Kubernetes 및 웹 애플리케이션 접근 프록시
- 이미지:
public.ecr.aws/gravitational/teleport-distroless:18.7.6 - 조인 방식: Kubernetes ServiceAccount 기반
- 특징:
envsubstinit 컨테이너가$ZOT_BASIC_AUTH,$OPENCLAW_GATEWAY_TOKEN환경 변수를teleport.yaml에 주입합니다.
인증 설정
로컬 인증
authentication:
type: local
localAuth: true
secondFactors:
- webauthn # FIDO2/WebAuthn 지원
- otp # TOTP (Google Authenticator 등)
조인 방법
Teleport Agent는 Kubernetes 내장 인증을 사용합니다:
joinParams:
method: kubernetes
tokenName: teleport-agent
# ProvisionToken CRD
apiVersion: resources.teleport.dev/v2
kind: TeleportProvisionToken
metadata:
name: teleport-agent
namespace: teleport
spec:
roles: [App]
join_method: kubernetes
kubernetes:
type: in_cluster
allow:
- service_account: "teleport:teleport-agent"
TLS 설정
cert-manager 연동
# Certificate 리소스
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: teleport-tls
namespace: teleport
spec:
secretName: teleport-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
dnsNames:
- lumie-infra.com
- "*.lumie-infra.com"
# Teleport에서 사용
tls:
existingSecretName: teleport-tls
데이터베이스 백엔드
PostgreSQL 설정
# Vault에서 DB 자격증명 가져오기
extraEnv:
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: infra-db-credentials
key: password
# Teleport 설정
auth:
teleportConfig:
teleport:
storage:
type: postgresql
conn_string: "host=infra-db-rw.infra-db.svc.cluster.local port=5432 dbname=teleport user=bluemayne sslmode=disable"