InfoGrab Docs

Teleport로 GitHub의 Git 명령어 프록시

요약

Teleport는 Git 명령어를 프록시하고 단기 SSH 인증서를 사용하여 GitHub 조직을 인증할 수 있습니다. GitHub는 조직이 인증을 위한 SSH 인증 기관(CA) 목록을 설정할 수 있게 합니다. Teleport 사용자는 Git 저장소를 Teleport를 통해 프록시하도록 설정할 수 있습니다.

Teleport는 Git 명령어를 프록시하고 단기 SSH 인증서를 사용하여 GitHub 조직을 인증할 수 있습니다.

이 가이드에서 다음을 수행합니다:

  • GitHub OAuth 애플리케이션 생성.
  • GitHub 조직의 SSH 인증 기관 설정.
  • GitHub 통합을 위한 Teleport 리소스 생성.
  • Teleport를 통한 Git 명령어 실행.

작동 방식#

GitHub는 조직이 인증을 위한 SSH 인증 기관(CA) 목록을 설정할 수 있게 합니다. 이 기능을 통해 Teleport CA와 같이 승인된 CA가 서명한 단기 SSH 인증서를 사용하여 조직의 저장소에 접근할 수 있습니다. 선택적으로, 조직은 접근에 이러한 서명된 SSH 인증서를 요구하도록 더 엄격한 보안을 적용하여 개인 SSH 키 및 접근 토큰의 사용을 효과적으로 비활성화할 수 있습니다.

Teleport 사용자는 Git 저장소를 Teleport를 통해 프록시하도록 설정할 수 있습니다. 설정 후 Git 명령어는 자동으로 Teleport를 통해 라우팅되며, Teleport는 GitHub 인증을 위해 Teleport CA가 서명한 단기 SSH 인증서를 사용하여 사용자의 GitHub ID를 가장합니다. Teleport를 통해 프록시된 각 Git 명령어는 Teleport의 감사 이벤트에도 기록됩니다.

사용자의 GitHub ID를 조회하기 위해, tsh는 사용자가 GitHub 자격 증명으로 로그인할 수 있도록 브라우저 창을 열어 GitHub OAuth 플로우를 시작합니다.

GitHub SSH 인증 기관

Teleport는 SSH를 통해 Git 명령어를 프록시하지만 사용자는 계속해서 브라우저를 통해 GitHub에 접근해야 합니다.

사전 요건#

  • A running Teleport Enterprise (v17.2 or higher) 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:

  • GitHub Enterprise Cloud 접근 권한과 GitHub의 SSH 인증 기관을 수정하고 OAuth 애플리케이션을 구성할 수 있는 권한.
    GitHub Enterprise 호환성

GitHub 통합은 GitHub Enterprise 플랜이 필요하며 현재 GitHub Enterprise Cloud에 대해서만 지원됩니다. **GitHub Enterprise Server(자체 호스팅)**에 대한 지원은 현재 릴리즈에서는 제공되지 않습니다.

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단계/4단계. GitHub OAuth 애플리케이션 설정#

GitHub 통합에는 사용자의 GitHub ID를 얻기 위한 GitHub OAuth 애플리케이션이 필요합니다. Teleport 사용자가 GitHub SSO를 사용하여 Teleport에 로그인하는 경우 이 단계를 건너뛸 수 있습니다.

조직 설정의 "Developer Settings" 아래에서 "OAuth Apps"로 이동합니다. "New OAuth App"을 클릭합니다.

세부 정보를 입력합니다. "Authentication callback URL"에 다음을 사용합니다. 를 Teleport Proxy Service의 호스트 및 HTTPS 포트로 교체합니다:

https:///v1/webapi/github/

OAuth 애플리케이션이 생성되면 클라이언트 시크릿을 생성하고 다음 단계를 위해 클라이언트 ID와 시크릿을 기억해 두세요:

클라이언트 ID와 시크릿이 강조된 GitHub OAuth 앱

2단계/4단계. GitHub 통합 생성 및 CA 내보내기#

이제 Github 통합을 나타내는 yaml 파일을 생성합니다. 를 조직 이름으로 교체하고, 와 를 이전 단계의 값으로 교체합니다.

# github_integration.yaml
kind: integration
sub_kind: github
version: v1
metadata:
  name: github-





4단계/4단계. 연결#

Note

이 섹션의 내용은 원문 문서를 참조하세요. (tsh-git.mdx)

추가 자료#

Teleport로 GitHub의 Git 명령어 프록시

원문 보기
요약

Teleport는 Git 명령어를 프록시하고 단기 SSH 인증서를 사용하여 GitHub 조직을 인증할 수 있습니다. GitHub는 조직이 인증을 위한 SSH 인증 기관(CA) 목록을 설정할 수 있게 합니다. Teleport 사용자는 Git 저장소를 Teleport를 통해 프록시하도록 설정할 수 있습니다.

Teleport는 Git 명령어를 프록시하고 단기 SSH 인증서를 사용하여 GitHub 조직을 인증할 수 있습니다.

이 가이드에서 다음을 수행합니다:

  • GitHub OAuth 애플리케이션 생성.
  • GitHub 조직의 SSH 인증 기관 설정.
  • GitHub 통합을 위한 Teleport 리소스 생성.
  • Teleport를 통한 Git 명령어 실행.

작동 방식#

GitHub는 조직이 인증을 위한 SSH 인증 기관(CA) 목록을 설정할 수 있게 합니다. 이 기능을 통해 Teleport CA와 같이 승인된 CA가 서명한 단기 SSH 인증서를 사용하여 조직의 저장소에 접근할 수 있습니다. 선택적으로, 조직은 접근에 이러한 서명된 SSH 인증서를 요구하도록 더 엄격한 보안을 적용하여 개인 SSH 키 및 접근 토큰의 사용을 효과적으로 비활성화할 수 있습니다.

Teleport 사용자는 Git 저장소를 Teleport를 통해 프록시하도록 설정할 수 있습니다. 설정 후 Git 명령어는 자동으로 Teleport를 통해 라우팅되며, Teleport는 GitHub 인증을 위해 Teleport CA가 서명한 단기 SSH 인증서를 사용하여 사용자의 GitHub ID를 가장합니다. Teleport를 통해 프록시된 각 Git 명령어는 Teleport의 감사 이벤트에도 기록됩니다.

사용자의 GitHub ID를 조회하기 위해, tsh는 사용자가 GitHub 자격 증명으로 로그인할 수 있도록 브라우저 창을 열어 GitHub OAuth 플로우를 시작합니다.

GitHub SSH 인증 기관

Teleport는 SSH를 통해 Git 명령어를 프록시하지만 사용자는 계속해서 브라우저를 통해 GitHub에 접근해야 합니다.

사전 요건#

  • A running Teleport Enterprise (v17.2 or higher) 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:

  • GitHub Enterprise Cloud 접근 권한과 GitHub의 SSH 인증 기관을 수정하고 OAuth 애플리케이션을 구성할 수 있는 권한.
    GitHub Enterprise 호환성

GitHub 통합은 GitHub Enterprise 플랜이 필요하며 현재 GitHub Enterprise Cloud에 대해서만 지원됩니다. **GitHub Enterprise Server(자체 호스팅)**에 대한 지원은 현재 릴리즈에서는 제공되지 않습니다.

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단계/4단계. GitHub OAuth 애플리케이션 설정#

GitHub 통합에는 사용자의 GitHub ID를 얻기 위한 GitHub OAuth 애플리케이션이 필요합니다. Teleport 사용자가 GitHub SSO를 사용하여 Teleport에 로그인하는 경우 이 단계를 건너뛸 수 있습니다.

조직 설정의 "Developer Settings" 아래에서 "OAuth Apps"로 이동합니다. "New OAuth App"을 클릭합니다.

세부 정보를 입력합니다. "Authentication callback URL"에 다음을 사용합니다. 를 Teleport Proxy Service의 호스트 및 HTTPS 포트로 교체합니다:

https:///v1/webapi/github/

OAuth 애플리케이션이 생성되면 클라이언트 시크릿을 생성하고 다음 단계를 위해 클라이언트 ID와 시크릿을 기억해 두세요:

클라이언트 ID와 시크릿이 강조된 GitHub OAuth 앱

2단계/4단계. GitHub 통합 생성 및 CA 내보내기#

이제 Github 통합을 나타내는 yaml 파일을 생성합니다. 를 조직 이름으로 교체하고, 와 를 이전 단계의 값으로 교체합니다.

# github_integration.yaml
kind: integration
sub_kind: github
version: v1
metadata:
  name: github-





4단계/4단계. 연결#

Note

이 섹션의 내용은 원문 문서를 참조하세요. (tsh-git.mdx)

추가 자료#