InfoGrab Docs

Azure 관리 ID를 통한 서비스 참여

요약

이 가이드에서는 Azure 참여 방법을 사용하여 Azure Virtual Machine에서 실행 중인 Teleport 인스턴스가 비밀을 공유하지 않고 Teleport 클러스터에 참여하도록 구성하는 방법을 설명합니다.

이 가이드에서는 Azure 참여 방법을 사용하여 Azure Virtual Machine에서 실행 중인 Teleport 인스턴스가 비밀을 공유하지 않고 Teleport 클러스터에 참여하도록 구성하는 방법을 설명합니다.

Azure 참여 방법은 Azure Virtual Machine에서 실행되는 모든 Teleport 프로세스에서 사용할 수 있습니다.

Teleport 프로세스를 클러스터에 참여시키는 다른 방법은 Teleport 서비스를 클러스터에 참여시키기를 참조하십시오.

작동 방식#

내부적으로, Teleport 프로세스는 서명된 증명 데이터 문서와 액세스 토큰을 Teleport Auth Service에 전송하여 Azure 구독에서 실행 중임을 증명합니다. VM의 ID는 Azure 참여 토큰에 구성된 허용 규칙과 일치해야 합니다.

사전 요구 사항#

  • A running Teleport cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.

  • The tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at /v1/webapi/find and use a JSON query tool to obtain your cluster version. Replace with the web address of your Teleport Proxy Service:

      $ TELEPORT_DOMAIN=
      $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')"
      
    2. Follow the instructions for your platform to install tctl and tsh clients:

  • Teleport 바이너리가 설치된 Linux를 실행하는 Azure Virtual Machine. 해당 Virtual Machine에는 관리 ID가 할당되어 있어야 합니다.

To check that you can connect to your Teleport cluster, sign in with tsh login, then verify that you can run tctl commands using your current credentials.

For example, run the following command, assigning to the domain name of the Teleport Proxy Service in your cluster and to your Teleport username:

$ tsh login --proxy= --user=
$ tctl status
# Cluster  (=teleport.url=)
# Version  (=teleport.version=)
# CA pin   (=presets.ca_pin=)

If you can connect to the cluster and run the tctl status command, you can use your current credentials to run subsequent tctl commands from your workstation. If you host your own Teleport cluster, you can also run tctl commands on the computer that hosts the Teleport Auth Service for full permissions.

1/5단계. 관리 ID 설정#

Azure 방법을 사용하여 Teleport 클러스터에 참여하는 Teleport 프로세스를 호스팅하는 모든 가상 머신에는 관리 ID가 할당되어 있어야 합니다.

관리 ID를 설정하려면:

  1. Azure VM에서 Teleport를 호스팅하는 경우 Virtual machines 보기로 이동하거나, Azure VMSS에서 Teleport를 호스팅하는 경우 Virtual machine scale sets 보기로 이동합니다.
  2. Teleport 서비스를 호스팅하는 VM 또는 VMSS를 선택합니다.
  3. 오른쪽 패널에서 Security/Identity 탭을 클릭합니다.
  4. Identity 섹션 아래에서 System assigned 탭을 선택합니다.
  5. Status 스위치를 On으로 전환합니다.
  6. Save를 클릭합니다.

VMSS를 사용하고 수동 업그레이드 모드로 구성된 경우, ID 변경 사항이 적용되려면 VM 인스턴스를 업데이트해야 합니다:

  • 오른쪽 패널에서 Instances 탭을 클릭합니다.
  • 업데이트할 VM 인스턴스를 선택합니다.
  • Restart를 클릭합니다.

일반 VM에 시스템 할당 ID를 연결하려면 다음을 실행합니다:

$ az vm identity assign --resource-group <resource-group> --name <vm-name>

Azure VMSS에 시스템 할당 ID를 연결하려면 다음을 실행합니다:

$ az vmss identity assign --resource-group <resource-group> --name <vmss-name>

VMSS를 사용하고 수동 업그레이드 모드로 구성된 경우, ID 변경 사항이 적용되려면 VM 인스턴스를 업데이트해야 합니다. 다음 명령을 실행하여 ID 변경 사항을 전파합니다:

$ az vmss update-instances --resource-group <resource-group> --name <vmss-name> --instance-ids *

2/5단계. Azure 참여 토큰 생성#

VM의 ID가 일치해야 하는 Azure 구독 및 리소스 그룹을 지정하는 allow 규칙이 포함된 다음 token.yaml을 생성합니다.

# token.yaml
kind: token
version: v2
metadata:
  # the token name is not a secret because instances must prove that they are
  # running in your Azure subscription to use this token
  name: azure-token
spec:
  # use the minimal set of roles required
  roles: [Node]
  join_method: azure
  azure:
    allow:
      # specify the Azure subscription which Teleport processes may join from
      - subscription: 11111111-1111-1111-1111-111111111111
      # multiple allow rules are supported
      - subscription: 22222222-2222-2222-2222-222222222222
      # resource_groups is optional and allows you to restrict the resource group of
      # joining Teleport processes
      - subscription: 33333333-3333-3333-3333-333333333333
        resource_groups: ["group1", "group2"]

토큰 이름 azure-token은 예시일 뿐이며, 3단계에서 join_params.token_name에 동일한 값을 사용하는 한 원하는 어떤 값이든 사용할 수 있습니다.

다음 명령을 실행하여 토큰을 생성합니다:

$ tctl create -f token.yaml

3/5단계 Teleport 설치#

Azure Linux VM에 Teleport를 설치합니다.

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

4/5단계. Teleport 프로세스 구성#

Azure 참여 방법은 SSH, Proxy, Kubernetes, 애플리케이션, 데이터베이스 또는 Desktop 서비스를 실행하는 Teleport 프로세스에 사용할 수 있습니다.

사용자 정의 teleport.yaml 파일로 Teleport 프로세스를 구성합니다. 다음 예시 구성과 같이 2단계에서 생성한 토큰과 일치하는 token_namemethod: azure가 포함된 join_params 섹션을 사용합니다:

# /etc/teleport.yaml
version: v3
teleport:
  join_params:
    token_name: azure-token
    method: azure
    azure:
      # client_id는 사용자 할당 관리 ID의 클라이언트 ID입니다.
      # 시스템 할당 관리 ID를 사용할 때는 이 값을 생략합니다.
      client_id: 11111111-1111-1111-1111-111111111111
  proxy_server: teleport.example.com:443
ssh_service:
  enabled: true
auth_service:
  enabled: false
proxy_service:
  enabled: false

5/5단계. Teleport 프로세스 시작#

Azure VM에서 Teleport를 시작합니다.

Configure your Teleport instance to start automatically when the host boots up by creating a systemd service for it. The instructions depend on how you installed your Teleport instance.

You can check the status of your Teleport instance with systemctl status teleport and view its logs with journalctl -fu teleport.

Teleport 프로세스가 클러스터에 연결하고 참여할 수 있는지 확인합니다. 모든 설정이 완료되었습니다!

Azure 관리 ID를 통한 서비스 참여

원문 보기
요약

이 가이드에서는 Azure 참여 방법을 사용하여 Azure Virtual Machine에서 실행 중인 Teleport 인스턴스가 비밀을 공유하지 않고 Teleport 클러스터에 참여하도록 구성하는 방법을 설명합니다.

이 가이드에서는 Azure 참여 방법을 사용하여 Azure Virtual Machine에서 실행 중인 Teleport 인스턴스가 비밀을 공유하지 않고 Teleport 클러스터에 참여하도록 구성하는 방법을 설명합니다.

Azure 참여 방법은 Azure Virtual Machine에서 실행되는 모든 Teleport 프로세스에서 사용할 수 있습니다.

Teleport 프로세스를 클러스터에 참여시키는 다른 방법은 Teleport 서비스를 클러스터에 참여시키기를 참조하십시오.

작동 방식#

내부적으로, Teleport 프로세스는 서명된 증명 데이터 문서와 액세스 토큰을 Teleport Auth Service에 전송하여 Azure 구독에서 실행 중임을 증명합니다. VM의 ID는 Azure 참여 토큰에 구성된 허용 규칙과 일치해야 합니다.

사전 요구 사항#

  • A running Teleport cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.

  • The tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at /v1/webapi/find and use a JSON query tool to obtain your cluster version. Replace with the web address of your Teleport Proxy Service:

      $ TELEPORT_DOMAIN=
      $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')"
      
    2. Follow the instructions for your platform to install tctl and tsh clients:

  • Teleport 바이너리가 설치된 Linux를 실행하는 Azure Virtual Machine. 해당 Virtual Machine에는 관리 ID가 할당되어 있어야 합니다.

To check that you can connect to your Teleport cluster, sign in with tsh login, then verify that you can run tctl commands using your current credentials.

For example, run the following command, assigning to the domain name of the Teleport Proxy Service in your cluster and to your Teleport username:

$ tsh login --proxy= --user=
$ tctl status
# Cluster  (=teleport.url=)
# Version  (=teleport.version=)
# CA pin   (=presets.ca_pin=)

If you can connect to the cluster and run the tctl status command, you can use your current credentials to run subsequent tctl commands from your workstation. If you host your own Teleport cluster, you can also run tctl commands on the computer that hosts the Teleport Auth Service for full permissions.

1/5단계. 관리 ID 설정#

Azure 방법을 사용하여 Teleport 클러스터에 참여하는 Teleport 프로세스를 호스팅하는 모든 가상 머신에는 관리 ID가 할당되어 있어야 합니다.

관리 ID를 설정하려면:

  1. Azure VM에서 Teleport를 호스팅하는 경우 Virtual machines 보기로 이동하거나, Azure VMSS에서 Teleport를 호스팅하는 경우 Virtual machine scale sets 보기로 이동합니다.
  2. Teleport 서비스를 호스팅하는 VM 또는 VMSS를 선택합니다.
  3. 오른쪽 패널에서 Security/Identity 탭을 클릭합니다.
  4. Identity 섹션 아래에서 System assigned 탭을 선택합니다.
  5. Status 스위치를 On으로 전환합니다.
  6. Save를 클릭합니다.

VMSS를 사용하고 수동 업그레이드 모드로 구성된 경우, ID 변경 사항이 적용되려면 VM 인스턴스를 업데이트해야 합니다:

  • 오른쪽 패널에서 Instances 탭을 클릭합니다.
  • 업데이트할 VM 인스턴스를 선택합니다.
  • Restart를 클릭합니다.

일반 VM에 시스템 할당 ID를 연결하려면 다음을 실행합니다:

$ az vm identity assign --resource-group <resource-group> --name <vm-name>

Azure VMSS에 시스템 할당 ID를 연결하려면 다음을 실행합니다:

$ az vmss identity assign --resource-group <resource-group> --name <vmss-name>

VMSS를 사용하고 수동 업그레이드 모드로 구성된 경우, ID 변경 사항이 적용되려면 VM 인스턴스를 업데이트해야 합니다. 다음 명령을 실행하여 ID 변경 사항을 전파합니다:

$ az vmss update-instances --resource-group <resource-group> --name <vmss-name> --instance-ids *

2/5단계. Azure 참여 토큰 생성#

VM의 ID가 일치해야 하는 Azure 구독 및 리소스 그룹을 지정하는 allow 규칙이 포함된 다음 token.yaml을 생성합니다.

# token.yaml
kind: token
version: v2
metadata:
  # the token name is not a secret because instances must prove that they are
  # running in your Azure subscription to use this token
  name: azure-token
spec:
  # use the minimal set of roles required
  roles: [Node]
  join_method: azure
  azure:
    allow:
      # specify the Azure subscription which Teleport processes may join from
      - subscription: 11111111-1111-1111-1111-111111111111
      # multiple allow rules are supported
      - subscription: 22222222-2222-2222-2222-222222222222
      # resource_groups is optional and allows you to restrict the resource group of
      # joining Teleport processes
      - subscription: 33333333-3333-3333-3333-333333333333
        resource_groups: ["group1", "group2"]

토큰 이름 azure-token은 예시일 뿐이며, 3단계에서 join_params.token_name에 동일한 값을 사용하는 한 원하는 어떤 값이든 사용할 수 있습니다.

다음 명령을 실행하여 토큰을 생성합니다:

$ tctl create -f token.yaml

3/5단계 Teleport 설치#

Azure Linux VM에 Teleport를 설치합니다.

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

4/5단계. Teleport 프로세스 구성#

Azure 참여 방법은 SSH, Proxy, Kubernetes, 애플리케이션, 데이터베이스 또는 Desktop 서비스를 실행하는 Teleport 프로세스에 사용할 수 있습니다.

사용자 정의 teleport.yaml 파일로 Teleport 프로세스를 구성합니다. 다음 예시 구성과 같이 2단계에서 생성한 토큰과 일치하는 token_namemethod: azure가 포함된 join_params 섹션을 사용합니다:

# /etc/teleport.yaml
version: v3
teleport:
  join_params:
    token_name: azure-token
    method: azure
    azure:
      # client_id는 사용자 할당 관리 ID의 클라이언트 ID입니다.
      # 시스템 할당 관리 ID를 사용할 때는 이 값을 생략합니다.
      client_id: 11111111-1111-1111-1111-111111111111
  proxy_server: teleport.example.com:443
ssh_service:
  enabled: true
auth_service:
  enabled: false
proxy_service:
  enabled: false

5/5단계. Teleport 프로세스 시작#

Azure VM에서 Teleport를 시작합니다.

Configure your Teleport instance to start automatically when the host boots up by creating a systemd service for it. The instructions depend on how you installed your Teleport instance.

You can check the status of your Teleport instance with systemctl status teleport and view its logs with journalctl -fu teleport.

Teleport 프로세스가 클러스터에 연결하고 참여할 수 있는지 확인합니다. 모든 설정이 완료되었습니다!