InfoGrab Docs

셀프 호스팅 클러스터에서 Teleport Identity Security 실행

요약

이 가이드는 셀프 호스팅 Teleport 클러스터에서 Teleport Access Graph를 설정하는 방법을 보여줍니다. Auth Service, Proxy Service, 에이전트 서비스와 같은 Teleport 서비스와 달리, Teleport Access Graph는 teleport 바이너리에서 실행되지 않고 컨테이너 이미지로 Teleport에서 제공되는 별도의 소프트웨어로 실행됩니다.

이 가이드는 셀프 호스팅 Teleport 클러스터에서 Teleport Access Graph를 설정하는 방법을 보여줍니다.

작동 방식#

Auth Service, Proxy Service, 에이전트 서비스와 같은 Teleport 서비스와 달리, Teleport Access Graph는 teleport 바이너리에서 실행되지 않고 컨테이너 이미지로 Teleport에서 제공되는 별도의 소프트웨어로 실행됩니다. Teleport Access Graph는 TLS 자격 증명을 사용하여 Teleport Auth Service에 인증합니다. 또한 백킹 스토리지를 위해 PostgreSQL에 연결해야 합니다. Teleport 클러스터에서 자격 증명을 획득한 후, Teleport Access Graph에 대한 구성 파일을 만들고 구성 파일과 Teleport 자격 증명을 로드하는 컨테이너를 시작합니다.

사전 조건#

  • 실행 중인 Teleport Enterprise 클러스터.
  • Teleport Identity Security가 활성화된 업데이트된 Teleport Enterprise 라이선스 파일.
  • Docker 버전 v[docker.version] 이상.
  • PostgreSQL 데이터베이스 서버 v14 이상.
    • Access Graph는 데이터를 저장할 전용 데이터베이스가 필요합니다. Access Graph가 데이터베이스에 연결하는 사용자는 이 데이터베이스의 소유자이거나 유사한 광범위한 권한이 있어야 합니다: public 스키마에 대한 최소 CREATE TABLE 권한, CREATE SCHEMA 권한.
    • Amazon RDS for PostgreSQL을 지원합니다.
    • Session Recording Search는 Access Graph v1.30.0 이상과 pg_trgmpgvector 확장을 사용할 수 있는 PostgreSQL 인스턴스가 필요합니다. Access Graph가 자동으로 활성화합니다.
  • Access Graph 서비스에 대한 TLS 인증서
    • TLS 인증서는 "서버 인증" 키 사용으로 발급해야 하며, X.509 v3 subjectAltName 확장에 Access Graph 서비스의 IP 또는 DNS 이름을 나열해야 합니다.
    • Access Graph 서비스 버전 1.20.4부터 컨테이너는 기본적으로 비루트 사용자로 실행됩니다. 컨테이너를 실행하는 사용자가 인증서 파일을 읽을 수 있는지 확인하세요. 다음 명령으로 올바른 권한을 설정할 수 있습니다:
      $ sudo chown 65532 /etc/access_graph/tls.key
      
  • Access Graph 서비스를 실행하는 노드는 Teleport Auth Service 및 Proxy Service에서 접근할 수 있어야 합니다.
Warning

Docker를 사용한 배포는 테스트 및 개발 목적에 적합합니다. 프로덕션 배포의 경우 Kubernetes에서 이 서비스를 배포하기 위해 Access Graph Helm 차트를 사용하는 것을 고려하세요. 지침은 Access Graph용 Helm 차트를 참조하세요.

1단계/3단계. Access Graph 설정#

Access Graph 서비스를 호스팅하는 머신에 Teleport 클러스터의 호스트 인증 기관(CA) 사본이 필요합니다. 이 서비스는 Auth Service와 Proxy Service에 호스트 CA가 발급하는 호스트 인증서를 통해 들어오는 연결을 인증해야 합니다.

호스트 CA는 다음 방법 중 하나로 검색하여 파일에 저장할 수 있습니다:

$ sudo mkdir /etc/access_graph
$ curl -s 'https:///webapi/auth/export?type=tls-host' | sudo tee /etc/access_graph/teleport_host_ca.pem
$ sudo mkdir /etc/access_graph
$ tsh login --proxy=
$ tctl get cert_authorities --format=json \
    | jq -r '.[] | select(.spec.type == "host") | .spec.active_keys.tls[].cert' \
    | base64 -d | sudo tee /etc/access_graph/teleport_host_ca.pem

그런 다음, 같은 머신에서 다음과 유사한 Access Graph 서비스 구성 파일을 만듭니다:

# Teleport Access Graph 서비스 구성.
# 예: /etc/access_graph/config.yaml
backend:
  postgres:
    # PostgreSQL 연결 URI 형식 사용, https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS 참조
    # 더 엄격한 `sslmode` 값을 강력히 권장합니다,
    # 예: `sslmode=verify-full&sslrootcert=/etc/access_graph/my_postgres_ca.crt`.
    # 가능한 매개변수에 대한 전체 참조는 https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS 참조
    connection: postgres://access_graph_user:my_password@db.example.com:5432/access_graph_db?sslmode=require

    # Amazon RDS에서 실행 시 환경에 설정된 자격 증명을 통해 IAM 인증을 사용할 수 있습니다:
    # iam:
    #   aws_region: us-west-2

# Access Graph 서비스가 수신할 IP 주소(선택 사항)와 포트.
# 이것이 기본값입니다. 모든 인터페이스에서 50051 포트를 수신하려면 이 키를 생략할 수 있습니다.
address: ":50051"

# Identity Activity Center 구성 예시.
# identity_activity_center:
#   region: eu-central-1
#   database: example-db
#   table: example-table
#   s3: s3://example-long-term-bucket/data/
#   s3_results: s3://example-transient-bucket/results/
#   s3_large_files: s3://example-transient-bucket/large_files
#   workgroup: example-workgroup
#   sqs_queue_url: https://sqs.eu-central-1.amazonaws.com/aws-account-id/example-sqs-queue
#   maxmind_geoip_city_db_path: "/etc/maxmindGeoIP/GeoLite2-City.mmdb" # 선택 사항

tls:
  # Access Graph 서버용 PEM 인코딩 TLS 인증서 및 개인 키 파일 경로.
  cert: /etc/access_graph/tls.crt
  key: /etc/access_graph/tls.key

# 이 Access Graph 서비스에 등록이 허용된 Teleport 클러스터의 호스트 CA 파일 경로를 나열합니다.
# 여러 Teleport 클러스터가 Access Graph 서비스에 연결할 수 있도록 여러 경로를 포함할 수 있습니다.
registration_cas:
  - /etc/access_graph/teleport_host_ca.pem # Teleport 클러스터의 호스트 CA 인증서를 포함하는 파일의 전체 경로.

마지막으로 다음과 같이 Docker를 사용하여 Access Graph 서비스를 시작합니다:

$ docker run -p 50051:50051 -v <path-to-config>:/app/config.yaml -v /etc/access_graph:/etc/access_graph public.ecr.aws/gravitational/access-graph:(=access_graph.version=)

2단계/3단계. Teleport Auth Service 구성 업데이트#

Auth Service의 YAML 구성에 Access Graph 구성을 위한 새 최상위 섹션을 추가합니다.

access_graph:
  enabled: true
  # Access Graph 서비스가 수신 대기 중인 host:port
  endpoint: access-graph.example.com:50051
  # Access Graph 서버 인증서가 서명된 신뢰할 수 있는 CA를 지정합니다.
  # 지정하지 않으면 시스템 신뢰 저장소가 사용됩니다.
  ca: /etc/access_graph_ca.pem

그런 다음 Auth Service 인스턴스를 재시작한 후 Proxy Service 인스턴스를 재시작합니다.

3단계/3단계. Graph Explorer에서 Access Graph 데이터 보기#

Access Graph 서비스의 데이터를 시각화하려면 Web UI의 Graph Explorer를 사용합니다. Identity Security --> Graph Explorer를 클릭한 다음 Graph Explorer에서 볼 리소스를 선택합니다.

인터페이스에 접근하려면 사용자에게 access_graph 리소스에 대한 listread 동사를 허용하는 역할이 있어야 합니다. 예:

kind: role
version: v7
metadata:
  name: my-role
spec:
  allow:
    rules:
    - resources:
      - access_graph
      verbs:
      - list
      - read

기본 설정 editor 역할에는 기본적으로 필요한 권한이 있습니다.

다음 단계#

셀프 호스팅 클러스터에서 Teleport Identity Security 실행

원문 보기
요약

이 가이드는 셀프 호스팅 Teleport 클러스터에서 Teleport Access Graph를 설정하는 방법을 보여줍니다. Auth Service, Proxy Service, 에이전트 서비스와 같은 Teleport 서비스와 달리, Teleport Access Graph는 teleport 바이너리에서 실행되지 않고 컨테이너 이미지로 Teleport에서 제공되는 별도의 소프트웨어로 실행됩니다.

이 가이드는 셀프 호스팅 Teleport 클러스터에서 Teleport Access Graph를 설정하는 방법을 보여줍니다.

작동 방식#

Auth Service, Proxy Service, 에이전트 서비스와 같은 Teleport 서비스와 달리, Teleport Access Graph는 teleport 바이너리에서 실행되지 않고 컨테이너 이미지로 Teleport에서 제공되는 별도의 소프트웨어로 실행됩니다. Teleport Access Graph는 TLS 자격 증명을 사용하여 Teleport Auth Service에 인증합니다. 또한 백킹 스토리지를 위해 PostgreSQL에 연결해야 합니다. Teleport 클러스터에서 자격 증명을 획득한 후, Teleport Access Graph에 대한 구성 파일을 만들고 구성 파일과 Teleport 자격 증명을 로드하는 컨테이너를 시작합니다.

사전 조건#

  • 실행 중인 Teleport Enterprise 클러스터.
  • Teleport Identity Security가 활성화된 업데이트된 Teleport Enterprise 라이선스 파일.
  • Docker 버전 v[docker.version] 이상.
  • PostgreSQL 데이터베이스 서버 v14 이상.
    • Access Graph는 데이터를 저장할 전용 데이터베이스가 필요합니다. Access Graph가 데이터베이스에 연결하는 사용자는 이 데이터베이스의 소유자이거나 유사한 광범위한 권한이 있어야 합니다: public 스키마에 대한 최소 CREATE TABLE 권한, CREATE SCHEMA 권한.
    • Amazon RDS for PostgreSQL을 지원합니다.
    • Session Recording Search는 Access Graph v1.30.0 이상과 pg_trgmpgvector 확장을 사용할 수 있는 PostgreSQL 인스턴스가 필요합니다. Access Graph가 자동으로 활성화합니다.
  • Access Graph 서비스에 대한 TLS 인증서
    • TLS 인증서는 "서버 인증" 키 사용으로 발급해야 하며, X.509 v3 subjectAltName 확장에 Access Graph 서비스의 IP 또는 DNS 이름을 나열해야 합니다.
    • Access Graph 서비스 버전 1.20.4부터 컨테이너는 기본적으로 비루트 사용자로 실행됩니다. 컨테이너를 실행하는 사용자가 인증서 파일을 읽을 수 있는지 확인하세요. 다음 명령으로 올바른 권한을 설정할 수 있습니다:
      $ sudo chown 65532 /etc/access_graph/tls.key
      
  • Access Graph 서비스를 실행하는 노드는 Teleport Auth Service 및 Proxy Service에서 접근할 수 있어야 합니다.
Warning

Docker를 사용한 배포는 테스트 및 개발 목적에 적합합니다. 프로덕션 배포의 경우 Kubernetes에서 이 서비스를 배포하기 위해 Access Graph Helm 차트를 사용하는 것을 고려하세요. 지침은 Access Graph용 Helm 차트를 참조하세요.

1단계/3단계. Access Graph 설정#

Access Graph 서비스를 호스팅하는 머신에 Teleport 클러스터의 호스트 인증 기관(CA) 사본이 필요합니다. 이 서비스는 Auth Service와 Proxy Service에 호스트 CA가 발급하는 호스트 인증서를 통해 들어오는 연결을 인증해야 합니다.

호스트 CA는 다음 방법 중 하나로 검색하여 파일에 저장할 수 있습니다:

$ sudo mkdir /etc/access_graph
$ curl -s 'https:///webapi/auth/export?type=tls-host' | sudo tee /etc/access_graph/teleport_host_ca.pem
$ sudo mkdir /etc/access_graph
$ tsh login --proxy=
$ tctl get cert_authorities --format=json \
    | jq -r '.[] | select(.spec.type == "host") | .spec.active_keys.tls[].cert' \
    | base64 -d | sudo tee /etc/access_graph/teleport_host_ca.pem

그런 다음, 같은 머신에서 다음과 유사한 Access Graph 서비스 구성 파일을 만듭니다:

# Teleport Access Graph 서비스 구성.
# 예: /etc/access_graph/config.yaml
backend:
  postgres:
    # PostgreSQL 연결 URI 형식 사용, https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS 참조
    # 더 엄격한 `sslmode` 값을 강력히 권장합니다,
    # 예: `sslmode=verify-full&sslrootcert=/etc/access_graph/my_postgres_ca.crt`.
    # 가능한 매개변수에 대한 전체 참조는 https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS 참조
    connection: postgres://access_graph_user:my_password@db.example.com:5432/access_graph_db?sslmode=require

    # Amazon RDS에서 실행 시 환경에 설정된 자격 증명을 통해 IAM 인증을 사용할 수 있습니다:
    # iam:
    #   aws_region: us-west-2

# Access Graph 서비스가 수신할 IP 주소(선택 사항)와 포트.
# 이것이 기본값입니다. 모든 인터페이스에서 50051 포트를 수신하려면 이 키를 생략할 수 있습니다.
address: ":50051"

# Identity Activity Center 구성 예시.
# identity_activity_center:
#   region: eu-central-1
#   database: example-db
#   table: example-table
#   s3: s3://example-long-term-bucket/data/
#   s3_results: s3://example-transient-bucket/results/
#   s3_large_files: s3://example-transient-bucket/large_files
#   workgroup: example-workgroup
#   sqs_queue_url: https://sqs.eu-central-1.amazonaws.com/aws-account-id/example-sqs-queue
#   maxmind_geoip_city_db_path: "/etc/maxmindGeoIP/GeoLite2-City.mmdb" # 선택 사항

tls:
  # Access Graph 서버용 PEM 인코딩 TLS 인증서 및 개인 키 파일 경로.
  cert: /etc/access_graph/tls.crt
  key: /etc/access_graph/tls.key

# 이 Access Graph 서비스에 등록이 허용된 Teleport 클러스터의 호스트 CA 파일 경로를 나열합니다.
# 여러 Teleport 클러스터가 Access Graph 서비스에 연결할 수 있도록 여러 경로를 포함할 수 있습니다.
registration_cas:
  - /etc/access_graph/teleport_host_ca.pem # Teleport 클러스터의 호스트 CA 인증서를 포함하는 파일의 전체 경로.

마지막으로 다음과 같이 Docker를 사용하여 Access Graph 서비스를 시작합니다:

$ docker run -p 50051:50051 -v <path-to-config>:/app/config.yaml -v /etc/access_graph:/etc/access_graph public.ecr.aws/gravitational/access-graph:(=access_graph.version=)

2단계/3단계. Teleport Auth Service 구성 업데이트#

Auth Service의 YAML 구성에 Access Graph 구성을 위한 새 최상위 섹션을 추가합니다.

access_graph:
  enabled: true
  # Access Graph 서비스가 수신 대기 중인 host:port
  endpoint: access-graph.example.com:50051
  # Access Graph 서버 인증서가 서명된 신뢰할 수 있는 CA를 지정합니다.
  # 지정하지 않으면 시스템 신뢰 저장소가 사용됩니다.
  ca: /etc/access_graph_ca.pem

그런 다음 Auth Service 인스턴스를 재시작한 후 Proxy Service 인스턴스를 재시작합니다.

3단계/3단계. Graph Explorer에서 Access Graph 데이터 보기#

Access Graph 서비스의 데이터를 시각화하려면 Web UI의 Graph Explorer를 사용합니다. Identity Security --> Graph Explorer를 클릭한 다음 Graph Explorer에서 볼 리소스를 선택합니다.

인터페이스에 접근하려면 사용자에게 access_graph 리소스에 대한 listread 동사를 허용하는 역할이 있어야 합니다. 예:

kind: role
version: v7
metadata:
  name: my-role
spec:
  allow:
    rules:
    - resources:
      - access_graph
      verbs:
      - list
      - read

기본 설정 editor 역할에는 기본적으로 필요한 권한이 있습니다.

다음 단계#