인프라 코드
이 섹션에서는 인프라 코드(IaC) 도구를 사용하여 Teleport를 관리하는 방법을 설명합니다. Teleport는 인프라 코드 도구로 Teleport를 관리하기 위한 세 가지 방법을 제공합니다: IaC 도구로 사용자, 역할, 신뢰할 수 있는 클러스터 및 기타 리소스를 관리하는 방법에 대한 지침은 인프라 코드로 리소스 관리를 참조하세요.
이 섹션에서는 인프라 코드(IaC) 도구를 사용하여 Teleport를 관리하는 방법을 설명합니다.
Teleport는 인프라 코드 도구로 Teleport를 관리하기 위한 세 가지 방법을 제공합니다:
IaC 도구로 사용자, 역할, 신뢰할 수 있는 클러스터 및 기타 리소스를 관리하는 방법에 대한 지침은 인프라 코드로 리소스 관리를 참조하세요.
IaC가 Teleport와 함께 작동하는 방식#
Teleport 클러스터를 구성하는 두 가지 방법이 있습니다:
- 정적 구성 파일: 시작 시 Teleport 프로세스는 로컬 파일 시스템에서 구성 파일을 읽습니다(기본 경로는
/etc/teleport.yaml). 정적 구성 설정은 서비스가 수신하는 포트와 같이 자주 변경될 것으로 예상되지 않는 클러스터 측면을 제어합니다. (모든 정적 구성 옵션은 구성 참조를 참조하세요.) - 동적 리소스: 동적 리소스는 역할, 로컬 사용자, Teleport로 보호되는 인프라 리소스와 같이 시간이 지남에 따라 변경될 가능성이 있는 클러스터 측면을 제어합니다.

Teleport Auth Service는 클러스터 상태 백엔드에 동적 리소스를 저장하고, 클라이언트는 권한에 따라 동적 리소스를 읽거나 쓰기 위해 Auth Service에 인증할 수 있습니다. 인프라 코드 도구는 Teleport 클러스터에 인증하여 동적 리소스를 관리할 수 있습니다.
정적 및 동적 구성 조정#
일부 동적 리소스는 Teleport의 정적 구성 파일 내 필드와 동일한 설정을 할당합니다. 이러한 필드의 경우, Teleport Auth Service는 시작 시 및 Teleport 리소스를 생성하거나 제거할 때 정적 및 동적 구성을 조정합니다.
Teleport Enterprise Cloud는 운영자에게 정적 구성 파일을 노출하지 않지만, 특정 설정을 위한 정적 구성 파일을 사용합니다.
정적 구성 필드에 적용되는 구성 리소스#
정적 구성 파일과 필드를 공유하는 네 가지 동적 리소스가 있습니다:
session_recording_configcluster_auth_preferencecluster_networking_configui_config
session_recording_config#
| 동적 리소스 필드 | 정적 구성 필드 |
|---|---|
spec.mode |
auth_service.session_recording |
spec.proxy_checks_host_keys |
auth_service.proxy_checks_host_keys |
cluster_auth_preference#
| 동적 리소스 필드 | 정적 구성 필드 |
|---|---|
spec.type |
auth_service.authentication.type |
spec.second_factor |
auth_service.authentication.second_factor |
spec.second_factors |
auth_service.authentication.second_factors |
spec.connector_name |
auth_service.authentication.connector_name |
spec.u2f |
auth_service.authentication.u2f |
spec.disconnect_expired_cert |
auth_service.disconnect_expired_cert |
spec.allow_local_auth |
auth_service.authentication.local_auth |
spec.message_of_the_day |
auth_service.message_of_the_day |
spec.locking_mode |
auth_service.authentication.locking_mode |
spec.webauthn |
auth_service.authentication.webauthn |
spec.require_session_mfa |
auth_service.authentication.require_session_mfa |
spec.allow_passwordless |
auth_service.authentication.passwordless |
spec.device_trust |
auth_service.authentication.device_trust |
spec.idp |
proxy_service.idp |
spec.allow_headless |
auth_service.authentication.headless |
cluster_networking_config#
| 동적 리소스 필드 | 정적 구성 필드 |
|---|---|
spec.client_idle_timeout |
auth_service.client_idle_timeout |
spec.keep_alive_interval |
auth_service.keep_alive_interval |
spec.keep_alive_count_max |
auth_service.keep_alive_count_max |
spec.session_control_timeout |
auth_service.session_control_timeout |
spec.idle_timeout_message |
auth_service.client_idle_timeout_message |
spec.web_idle_timeout |
auth_service.web_idle_timeout |
spec.proxy_listener_mode |
auth_service.proxy_listener_mode |
spec.routing_strategy |
auth_service.routing_strategy |
spec.tunnel_strategy |
auth_service.tunnel_strategy |
spec.proxy_ping_interval |
auth_service.proxy_ping_interval |
spec.case_insensitive_routing |
auth_service.case_insensitive_routing |
ui_config#
| 동적 리소스 필드 | 정적 구성 필드 |
|---|---|
spec.scrollback_lines |
proxy_service.ui.scrollback_lines |
spec.show_resources |
proxy_service.ui.show_resources |
Origin 레이블#
Teleport Auth Service는 구성 리소스에 teleport.dev/origin 레이블을 적용하여 리소스가 정적 구성 파일, 동적 구성 리소스 또는 기본값에서 비롯되었는지를 나타냅니다.
teleport.dev/origin 레이블의 가능한 값은 다음과 같습니다:
defaultsconfig-filedynamicterraformkubernetes
Auth Service가 시작될 때 동적 구성 리소스의 필드에 해당하는 정적 구성 필드의 값을 조회합니다. 값이 있는 경우 해당 동적 구성 리소스를 만들어 백엔드에 저장합니다.
값이 없는 정적 구성 필드에 대해 Auth Service는 백엔드에 해당 동적 구성 리소스가 포함되어 있는지 확인합니다. 없는 경우 기본값과 teleport.dev/origin=defaults 레이블을 사용하여 리소스를 만듭니다.
Auth Service가 정적 구성 파일에서 구성을 이미 로드한 후 동적 구성 리소스를 만들려고 하면 Auth Service가 오류를 반환합니다.
동적 구성 리소스를 제거하면 Auth Service가 구성 필드를 기본값으로 복원하고 teleport.dev/origin=defaults 레이블을 추가합니다.
팁
클라우드 호스팅 Teleport 배포는 구성 파일을 사용하지만 운영자가 수정할 수 없습니다. Teleport Enterprise Cloud 사용자는
teleport.dev/origin=config-file레이블이 있는 구성 리소스를 볼 수 있습니다.
동적 리소스 참조#
Teleport 동적 리소스에서 지원되는 필드의 종합적인 목록은 다음 참조 가이드를 읽어보세요:
tctl 리소스#
tctl을 사용하여 적용할 수 있는 동적 구성 리소스에 대한 참조 가이드는 구성 리소스 참조를 읽어보세요. 애플리케이션 및 데이터베이스에 대한 전용 구성 리소스 참조도 있습니다.
Terraform 리소스 및 데이터 소스#
Teleport Terraform 제공자로 관리할 수 있는 리소스 및 데이터 소스에 대한 종합적인 참조 가이드는 Teleport Terraform 제공자 참조를 참조하세요.
Kubernetes 오퍼레이터 리소스#
Kubernetes 오퍼레이터로 관리할 수 있는 리소스에 대한 종합적인 참조 가이드는 Teleport Kubernetes 오퍼레이터 리소스 참조를 참조하세요.
동적 리소스 API를 사용하는 다른 방법#
Teleport Kubernetes 오퍼레이터, Terraform 제공자, tctl은 모두 Teleport Auth Service의 gRPC API 클라이언트입니다. 조직의 요구에 맞게 Teleport를 확장하기 위한 자체 API 클라이언트를 구축하려면 API 가이드를 읽어보세요.
