Microsoft Teams를 통한 Access Request
이 가이드는 Teleport에서 Access Request 메시지를 수신하도록 Microsoft Teams를 설정하는 방법을 설명합니다. In Teleport Enterprise Cloud, Teleport manages the Microsoft Teams integration for you, and you can enroll the Microsoft Teams integration from the...
이 가이드는 Teleport에서 Access Request 메시지를 수신하도록 Microsoft Teams를 설정하는 방법을 설명합니다.
이 통합은 Teleport Enterprise (Cloud)에서 호스팅됩니다
In Teleport Enterprise Cloud, Teleport manages the Microsoft Teams integration for you, and you can enroll the Microsoft Teams integration from the Teleport Web UI.
Visit the Teleport Web UI and on the left sidebar, click Add New followed by Integration:

On the "Select Integration Type" menu, click the tile for your integration. You will see a page with instructions to set up the integration, as well as a form that you can use to configure the integration.

등록 후 통합 상태 페이지에서 필요한 app.zip 파일을 다운로드할 수 있습니다.

작동 방식#
Teleport의 Microsoft Teams 통합은 개인에게 Access Request를 알립니다. 사용자는 메시지 링크를 따라 Access Request를 승인하거나 거부할 수 있으므로, 생산성을 저해하지 않으면서 보안 모범 사례를 더 쉽게 구현할 수 있습니다.

사전 요구사항#
-
A running Teleport Enterprise cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.
-
The
tctlandtshclients.Installing `tctl` and `tsh` clients
-
Determine the version of your Teleport cluster. The
tctlandtshclients must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at/v1/webapi/findand 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')" -
Follow the instructions for your platform to install
tctlandtshclients:
-
Recommended: Configure Machine & Workload Identity to provide short-lived
Teleport credentials to the plugin. Before following this guide, follow a
Machine & Workload Identity deployment guide
to run the tbot binary on your infrastructure.
- Microsoft Teams 라이선스 (Microsoft 365 Business).
- Microsoft Teams 라이선스를 보유한 조직/디렉터리의 Azure 콘솔 접근 권한.
- 동일한 디렉터리의 Azure 리소스 그룹. Microsoft Teams Access Request 플러그인의 리소스를 호스팅합니다. 이 리소스 그룹에서 Azure Bot Services를 생성하고 편집할 수 있는 충분한 권한이 있어야 합니다.
- 플러그인에 권한을 부여하기 위해 Microsoft Entra ID에 대한 전역 관리자 권한을 가진 사람.
- Microsoft Teams 앱의 설치 요청을 승인할 수 있는
Teams administrator역할을 가진 사람. - Teleport Microsoft Teams 플러그인을 실행할 Azure 가상 머신 또는 Kubernetes 클러스터.
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/9단계. RBAC 리소스 정의#
Microsoft Teams 플러그인을 설정하기 전에, Teleport 클러스터에서 Role Access Request를 활성화해야 합니다.
For the purpose of this guide, we will define an editor-requester role, which
can request the built-in editor role, and an editor-reviewer role that can
review requests for the editor role.
Create a file called editor-request-rbac.yaml with the following content:
kind: role
version: v7
metadata:
name: editor-reviewer
spec:
allow:
review_requests:
roles: ['editor']
---
kind: role
version: v7
metadata:
name: editor-requester
spec:
allow:
request:
roles: ['editor']
thresholds:
- approve: 1
deny: 1
Create the roles you defined:
$ tctl create -f editor-request-rbac.yaml
role 'editor-reviewer' has been created
role 'editor-requester' has been created
(!docs/pages/includes/create-role-using-web.mdx!)
Allow yourself to review requests by users with the editor-requester role by
assigning yourself the editor-reviewer role.
(!docs/pages/includes/add-role-to-user.mdx role="editor-reviewer"!)
Create a user called myuser who has the editor-requester role. This user
cannot edit your cluster configuration unless they request the editor role:
$ tctl users add myuser --roles=editor-requester
tctl will print an invitation URL to your terminal. Visit the URL and log in
as myuser for the first time, registering credentials as configured for your
Teleport cluster.
Later in this guide, you will have myuser request the editor role so you can
review the request using the Teleport plugin.
2/9단계. Teleport Microsoft Teams 플러그인 사용자 정의#
플러그인에 필요한 권한은 사전 설정된 access-plugin 역할에 구성되어 있습니다. 플러그인에 대한 자격 증명을 생성하려면, Machine ID 봇 사용자 또는 일반 Teleport 사용자를 정의합니다.
If you haven't set up a Machine ID bot yet, refer to the
deployment guide
to run the tbot binary on your infrastructure.
Next, allow the Machine ID bot to generate credentials for the access-plugin
role. You can do this using tctl, replacing my-bot with the name of your bot:
$ tctl bots update my-bot --add-roles access-plugin
As with all Teleport users, the Teleport Auth Service authenticates the
access-plugin user by issuing short-lived TLS credentials. In this case, we
will need to request the credentials manually by impersonating the
access-plugin role and user.
If you are running a self-hosted Teleport Enterprise deployment and are using
tctl from the Auth Service host, you will already have impersonation
privileges.
To grant your user impersonation privileges for access-plugin, define a user
named access-plugin and a role named access-plugin-impersonator by adding
the following YAML document into a file called access-plugin-impersonator.yaml:
kind: user
metadata:
name: access-plugin
spec:
roles: ['access-plugin']
version: v2
---
kind: role
version: v7
metadata:
name: access-plugin-impersonator
spec:
allow:
impersonate:
roles:
- access-plugin
users:
- access-plugin
Create the user and role:
$ tctl create -f access-plugin-impersonator.yaml
user "access-plugin" has been created
role "access-plugin-impersonator" has been created
(!docs/pages/includes/create-role-using-web.mdx!)
Assign this role to the user you plan to use to generate credentials for the
access-plugin role and user:
(!docs/pages/includes/add-role-to-user.mdx role="access-plugin-impersonator"!)
You will now be able to generate signed certificates for the access-plugin
role and user.
3/9단계. 액세스 플러그인 ID 내보내기#
플러그인에 Teleport ID 파일 접근 권한을 부여합니다. 유출 시 위험도가 낮은 단기 ID 파일을 생성하기 위해 Machine ID를 사용하는 것을 권장하지만, 데모 배포에서는 tctl로 장기 ID 파일을 생성할 수 있습니다:
Configure tbot with an output that will produce the credentials needed by
the plugin. As the plugin will be accessing the Teleport API, the correct
output type to use is identity.
For this guide, the directory destination will be used. This will write these
credentials to a specified directory on disk. Ensure that this directory can
be written to by the Linux user that tbot runs as, and that it can be read by
the Linux user that the plugin will run as.
Modify your tbot configuration to add an identity output.
If running tbot on a Linux server, use the directory output to write
identity files to the /opt/machine-id directory:
services:
- type: identity
destination:
type: directory
# For this guide, /opt/machine-id is used as the destination directory.
# You may wish to customize this. Multiple outputs cannot share the same
# destination.
path: /opt/machine-id
If running tbot on Kubernetes, write the identity file to Kubernetes secret
instead:
services:
- type: identity
destination:
type: kubernetes_secret
name: teleport-plugin-msteams-identity
If operating tbot as a background service, restart it. If running tbot in
one-shot mode, execute it now.
You should now see an identity file under /opt/machine-id or a Kubernetes
secret named teleport-plugin-msteams-identity. This contains the private key and signed
certificates needed by the plugin to authenticate with the Teleport Auth
Service.
Like all Teleport users, access-plugin needs signed credentials in order to
connect to your Teleport cluster. You will use the tctl auth sign command to
request these credentials.
The following tctl auth sign command impersonates the access-plugin user,
generates signed credentials, and writes an identity file to the local
directory:
$ tctl auth sign --user=access-plugin --out=identity
The plugin connects to the Teleport Auth Service's gRPC endpoint over TLS.
The identity file, identity, includes both TLS and SSH credentials. The
plugin uses the SSH credentials to connect to the Proxy Service, which
establishes a reverse tunnel connection to the Auth Service. The plugin
uses this reverse tunnel, along with your TLS credentials, to connect to the
Auth Service's gRPC endpoint.
Certificate Lifetime
By default, tctl auth sign produces certificates with a relatively short
lifetime. For production deployments, we suggest using Machine
& Workload Identity to programmatically issue and renew
certificates for your plugin. See our Machine & Workload Identity getting started
guide to learn more.
Note that you cannot issue certificates that are valid longer than your existing credentials.
For example, to issue certificates with a 1000-hour TTL, you must be logged in with a session that is
valid for at least 1000 hours. This means your user must have a role allowing
a max_session_ttl of at least 1000 hours (60000 minutes), and you must specify a --ttl
when logging in:
$ tsh login --proxy=teleport.example.com --ttl=60060
If you are running the plugin on a Linux server, create a data directory to hold certificate files for the plugin:
$ sudo mkdir -p /var/lib/teleport/plugins/api-credentials
$ sudo mv identity /var/lib/teleport/plugins/api-credentials
If you are running the plugin on Kubernetes, Create a Kubernetes secret that contains the Teleport identity file:
$ kubectl -n teleport create secret generic --from-file=identity teleport-plugin-msteams-identity
Once the Teleport credentials expire, you will need to renew them by running the
tctl auth sign command again.
4/9단계. Teleport Microsoft Teams 플러그인 설치#
워크스테이션에 Microsoft Teams 플러그인을 설치합니다. Kubernetes에 플러그인을 배포하는 경우에도 이 가이드의 뒷부분에서 업로드할 애플리케이션 아카이브를 생성하기 위해 로컬에 플러그인을 설치해야 합니다.
5/9단계. Azure 봇 등록#
Microsoft Teams용 Access Request 플러그인은 Teleport Auth Service에서 Access Request 이벤트를 수신하고, 이를 Microsoft Teams 메시지로 포맷하여 워크스페이스에 게시하기 위해 Microsoft Teams API로 전송합니다. 이를 위해 새 Azure 봇을 등록해야 합니다. Azure 봇은 Microsoft가 제공하는 관리 서비스로, Microsoft Teams를 포함한 다양한 채널을 통해 사용자와 상호작용하는 봇을 개발할 수 있게 합니다.
새 Azure 봇 등록#
https://portal.azure.com/#create/Microsoft.AzureBot을 방문하여 새 봇을 생성합니다. Azure 콘솔에서 나중에 봇을 찾을 수 있도록 봇 핸들을 선택합니다 (봇 핸들은 사용자에게 표시되거나 Microsoft Teams 플러그인 설정에 사용되지 않습니다). Azure 구독, 리소스 그룹 및 봇 가격 등급도 편집합니다.
"Microsoft App ID" 섹션에서 "Single Tenant"와 "Create new Microsoft App ID"를 선택합니다.

Microsoft Teams에 봇 연결#
봇이 생성되면 Azure 콘솔의 봇 리소스 페이지를 열고 "채널" 탭으로 이동합니다. "Microsoft Teams"를 클릭하고 Microsoft Teams 채널을 추가합니다.
결과는 다음과 같아야 합니다:

Microsoft App에 대한 정보 가져오기#
봇의 "구성" 탭에서 "Microsoft App ID"와 "App Tenant ID" 값을 복사하여 안전한 곳에 보관합니다. 이 두 UUID는 플러그인 설정에 사용됩니다.
"Microsoft App ID" 옆의 "관리" 링크를 클릭합니다. 앱 관리 보기가 열립니다.

그런 다음 "인증서 및 비밀" 섹션으로 이동하여 "새 클라이언트 비밀"을 생성하도록 선택합니다. "복사" 아이콘을 사용하여 새로 생성된 비밀을 복사하고 이전에 가져온 App ID 및 Tenant ID와 함께 보관합니다.
클라이언트 비밀은 Teleport 플러그인이 봇의 앱으로 인증하여 사용자를 검색하고 메시지를 게시할 때 사용됩니다.
앱에서 사용하는 권한 지정#
앱 관리 보기("구성", 그런 다음 Microsoft App ID "관리")에서 "API 권한" 탭으로 이동합니다.
다음 Microsoft Graph 애플리케이션 권한을 추가합니다:
| 권한 이름 | 이유 |
|---|---|
AppCatalog.Read.All |
Teams 앱을 나열하고 앱이 설치되어 있는지 확인하는 데 사용됩니다. |
User.Read.All |
알림 수신자를 가져오는 데 사용됩니다. |
TeamsAppInstallation.ReadWriteSelfForUser.All |
이전에 Teams 앱과 상호작용한 적이 없는 사용자와 통신을 시작하는 데 사용됩니다. |
TeamsAppInstallation.ReadWriteSelfForTeam.All |
앱이 팀에 설치되어 있는지 확인하는 데 사용됩니다. |
이 시점에서 앱은 필요한 권한을 선언했지만 아직 부여되지 않았습니다.
관리자인 경우 "<디렉터리 이름>에 대한 관리자 동의 부여"를 클릭합니다. 관리자가 아닌 경우 관리자에게 권한 부여를 요청합니다.

권한이 승인되면 페이지를 새로 고치고 승인 상태를 확인합니다. 결과는 다음과 같아야 합니다:

6/9단계. Teleport Microsoft Teams 플러그인 설정#
이 시점에서 Teleport Microsoft Teams 플러그인은 Teleport 클러스터와 Azure API와 통신하는 데 필요한 자격 증명을 갖추고 있지만, 앱은 아직 Microsoft Teams에 설치되지 않았습니다.
이 단계에서는 Azure 자격 증명을 사용하도록 Microsoft Teams 플러그인을 설정하고, Microsoft Teams 앱을 설치하는 데 사용될 Teams 앱 패키지를 생성합니다. 또한 Access Request 업데이트를 수신할 때 올바른 Microsoft Teams 사용자에게 알리도록 플러그인을 설정합니다.
설정 파일 및 에셋 생성#
플러그인의 설정 파일을 생성합니다. 지침은 가상 머신에 플러그인을 배포하는지 Kubernetes에 배포하는지에 따라 다릅니다:
Teleport Microsoft Teams 플러그인은 TOML 형식의 설정 파일을 사용합니다. configure 서브명령은 TOML 설정 파일과 나중에 Teams 앱을 조직 카탈로그에 추가하는 데 사용될 app.zip 파일이 포함된 /var/lib/teleport/plugins/msteams/assets 디렉터리를 생성합니다.
가상 머신에서 다음 명령을 실행합니다:
$ export AZURE_APPID="your-appid"
$ export AZURE_TENANTID="your-tenantid"
$ export AZURE_APPSECRET="your-appsecret"
$ teleport-msteams configure /var/lib/teleport/plugins/msteams/assets --appID "$AZURE_APPID" --tenantID "$AZURE_TENANTID" --appSecret "$AZURE_APPSECRET"
결과는 아래와 같은 설정 파일이어야 합니다:
<div class="admonition note"><div class="admonition-title">Note</div><p>이 섹션의 내용은 원문 문서를 참조하세요. (<code>teleport-msteams.toml</code>)</p></div>
/var/lib/teleport/plugins/msteams/assets/app.zip 파일을 로컬 컴퓨터에 복사합니다. 나중에 Microsoft Teams에 업로드해야 합니다.
Microsoft Teams 플러그인을 실행할 호스트에서 /var/lib/teleport/plugins/msteams/assets/teleport-msteams.toml 파일을 /etc/teleport-msteams.toml로 이동합니다. 그런 다음 /etc/에 있는 복사본을 편집할 수 있습니다.
로컬 머신에서 다음 명령을 실행합니다:
$ export AZURE_APPID="your-appid"
$ export AZURE_TENANTID="your-tenantid"
$ export AZURE_APPSECRET="your-appsecret"
$ teleport-msteams configure /var/lib/teleport/plugins/msteams/assets --appID "$AZURE_APPID" --tenantID "$AZURE_TENANTID" --appSecret "$AZURE_APPSECRET"
이 명령은 /var/lib/teleport/plugins/msteams/assets/app.zip에 애플리케이션 아카이브를 생성합니다. 이 가이드의 뒷부분에서 Microsoft Teams에 업로드합니다.
워크스테이션에 다음 내용으로 teleport-msteams-helm.yaml 파일을 생성합니다:
<div class="admonition note"><div class="admonition-title">Note</div><p>이 섹션의 내용은 원문 문서를 참조하세요. (<code>teleport-msteams-helm.yaml</code>)</p></div>
다음 섹션에서 이 파일을 편집합니다.
configure 명령은 멱등성이 없습니다. 각 실행마다 새 Microsoft Teams 애플리케이션 UUID를 생성합니다. 두 번의 다른 실행으로 생성된 app.zip과 TOML 설정을 함께 사용하는 것은 불가능합니다.
설정 파일 편집#
아래 지침에 따라 설정 파일을 편집합니다.
[teleport]#
Microsoft Teams 플러그인은 이 섹션을 사용하여 Teleport 클러스터에 연결합니다.
If you are providing credentials to the plugin using a tbot binary that runs
on a Linux server, make sure the value of identity is the same as the path of
the identity file you configured tbot to generate, /opt/machine-id/identity.
Configure the plugin to periodically reload the identity file, ensuring that it does not attempt to connect to the Teleport Auth Service with expired credentials.
Add the following to the teleport section of the configuration:
refresh_identity = true
[msapi]/msTeams#
이 가이드의 앞부분에서 얻은 올바른 정보로 app_id, app_secret, tenant_id, teams_app_id 필드가 채워져 있는지 확인합니다.
이 가이드의 앞부분에서 얻은 올바른 정보로 appID, tenantID, teamsAppID 필드가 채워져 있는지 확인합니다.
[role_to_recipients]#
role_to_recipients 맵(Helm 사용자의 경우 roleToRecipients)은 사용자가 특정 역할에 대한 액세스를 요청할 때 Microsoft Teams 플러그인이 알릴 사용자와 채널을 설정합니다. Microsoft Teams 플러그인이 Auth Service에서 Access Request를 수신하면, 요청된 역할을 조회하고 알릴 Microsoft Teams 사용자와 채널을 식별합니다.
다음은 role_to_recipients 맵의 예시입니다. 각 값은 단일 문자열 또는 문자열 배열이 될 수 있습니다:
[role_to_recipients]
"*" = "alice@example.com"
"dev" = ["alice@example.com", "bob@example.com"]
"dba" = "https://teams.microsoft.com/l/channel/19%3somerandomid%40thread.tacv2/ChannelName?groupId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&tenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Helm 차트에서 role_to_recipients 필드는 roleToRecipients로 불리며, 키는 문자열이고 값은 문자열 배열인 다음 형식을 사용합니다:
roleToRecipients:
"*": "alice@example.com"
"dev": ["alice@example.com", "bob@example.com"]
"dba": "https://teams.microsoft.com/l/channel/19%3somerandomid%40thread.tacv2/ChannelName?groupId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&tenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
role_to_recipients 맵에서 각 키는 Teleport 역할의 이름입니다. 각 값은 알릴 Teams 사용자(또는 사용자들)를 설정합니다. 각 문자열은 Microsoft Teams 사용자의 이메일 주소 또는 채널 URL이어야 합니다.
채널을 열고 "채널 링크 가져오기" 버튼을 클릭하여 채널의 URL을 찾을 수 있습니다:

role_to_recipients 맵에는 "*" 항목도 포함해야 합니다. 이 항목은 다른 항목이 특정 역할 이름과 일치하지 않을 때 플러그인이 조회합니다. 위 예시에서 dev와 dba 이외의 역할에 대한 요청은 alice@example.com에 알림을 보냅니다.
제안된 검토자
사용자는 Access Request를 생성할 때 검토자를 제안할 수 있습니다. 예를 들어:
$ tsh request create --roles=dbadmin --reviewers=alice@example.com,ivan@example.com
Access Request에 제안된 검토자가 포함된 경우, Microsoft Teams 플러그인은 이들을 알릴 채널 목록에 추가합니다. 제안된 검토자가 이메일 주소인 경우, 플러그인은 해당 주소의 직접 메시지 채널을 조회하고 해당 채널에 메시지를 게시합니다.
TELEPORT_USERNAME을 이전에 editor-reviewer 역할을 할당한 사용자의 이메일로 교체하여 role_to_recipients 설정에 다음을 추가함으로써 사용자가 editor 역할을 요청할 때 알림을 받도록 Microsoft Teams 플러그인을 설정합니다:
[role_to_recipients]
"*" = "TELEPORT_USERNAME"
"editor" = "TELEPORT_USERNAME"
roleToRecipients:
"*": "TELEPORT_USERNAME"
"editor": "TELEPORT_USERNAME"
최종 설정 파일은 다음과 유사해야 합니다:
<div class="admonition note"><div class="admonition-title">Note</div><p>이 섹션의 내용은 원문 문서를 참조하세요. (<code>teleport-msteams.toml</code>)</p></div>
<div class="admonition note"><div class="admonition-title">Note</div><p>이 섹션의 내용은 원문 문서를 참조하세요. (<code>teleport-msteams-helm.yaml</code>)</p></div>
7/9단계. Teams 앱 추가 및 설정#
Teams 앱 업로드#
Microsoft Teams를 열고 "앱", "앱 관리"로 이동한 다음 추가 선택 메뉴에서 "앱 업로드"를 선택합니다.

Teams 관리자인 경우 "조직의 앱 카탈로그에 앱 업로드"를 선택합니다. 이렇게 하면 승인 단계를 건너뛸 수 있습니다. Microsoft Teams 관리자가 아닌 경우 "조직에 앱 제출"을 선택합니다.
이전에 생성한 app.zip 파일을 업로드합니다.
Teams 앱 승인#
Teams 관리자가 아니고 "조직에 앱 제출"을 선택한 경우, Teams 관리자에게 승인을 요청해야 합니다.
Teams 관리 대시보드에 연결하여 "TeleBot"을 검색하고, 선택한 다음 "허용"을 선택하면 됩니다.

팀에 Teams 앱 추가#
앱이 승인되면 "조직용 앱" 섹션에 나타나야 합니다. 새로 업로드된 앱을 팀에 추가합니다. 앱을 열고 "팀에 추가"를 클릭하고 팀의 "일반" 채널을 선택한 다음 "봇 설정"을 클릭합니다.

참고: 앱이 팀에 추가되면 모든 채널에 게시할 수 있습니다.
8/9단계. Teams 앱 테스트#
Teleport가 실행 중이고, Teams 앱을 생성했고, 플러그인이 설정된 후, 이제 플러그인을 실행하고 워크플로를 테스트할 수 있습니다.
Microsoft Teams 연결 테스트#
유효성 검사 모드에서 플러그인을 시작합니다:
$ teleport-msteams validate <teams 계정 이메일>
모든 것이 잘 작동하면, 로그 출력은 다음과 같아야 합니다:
teleport-msteams v(=teleport.plugin.version=) go(=teleport.golang=)
- Checking application xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx status...
- Application found in the team app store (internal ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
- User xxxxxx@xxxxxxxxx.xxx found: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- Application installation ID for user: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- Chat ID for user: 19:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@unq.gbl.spaces
- Chat web URL: https://teams.microsoft.com/l/chat/19%3Axxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%40unq.gbl.spaces/0?tenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- Hailing the user...
- Message sent, ID: XXXXXXXXXXXXX
Check your MS Teams!
플러그인이 종료되고 Microsoft Teams를 통해 두 개의 메시지를 받아야 합니다.

MS Teams 플러그인 시작#
MS Teams 플러그인을 설정하고 유효성을 검사한 후, 이제 플러그인을 실행하고 워크플로를 테스트할 수 있습니다.
다음 명령을 실행하여 Teleport MS Teams 플러그인을 시작합니다. -d 플래그는 플러그인이 MS Teams와 Teleport 클러스터에 연결할 수 있는지 확인하기 위한 디버그 정보를 제공합니다:
$ teleport-msteams start -d
DEBU DEBUG logging enabled msteams/main.go:120
INFO Starting Teleport MS Teams Plugin (=teleport.plugin.version=): msteams/app.go:74
DEBU Attempting GET teleport.example.com:443/webapi/find webclient/webclient.go:129
DEBU Checking Teleport server version msteams/app.go:242
INFO MS Teams app found in org app store id:292e2881-38ab-7777-8aa7-cefed1404a63 name:TeleBot msteams/app.go:179
INFO Preloading recipient data... msteams/app.go:185
INFO Recipient found, chat found chat_id:19:a8c06deb-aa2b-4db5-9c78-96e48f625aef_a36aec2e-f11c-4219-b79a-19UUUU57de70@unq.gbl.spaces kind:user recipient:jeff@example.com msteams/app.go:195
INFO Recipient data preloaded and cached. msteams/app.go:198
DEBU Watcher connected watcherjob/watcherjob.go:121
INFO Plugin is ready msteams/app.go:227
플러그인 실행:
$ docker run -v <path-to-config>:/etc/teleport-msteams.toml public.ecr.aws/gravitational/teleport-plugin-msteams:(=teleport.version=) start
플러그인 설치:
$ helm upgrade --install teleport-plugin-msteams teleport/teleport-plugin-msteams --values teleport-msteams-helm.yaml
플러그인의 로그를 검사하려면, 다음 명령을 사용합니다:
$ kubectl logs deploy/teleport-plugin-msteams
teleport-msteams-helm.yaml에서 log.severity를 DEBUG로 설정하고 위의 helm upgrade ... 명령을 다시 실행하여 디버그 로그를 활성화할 수 있습니다. 그런 다음 다음 명령으로 플러그인을 재시작할 수 있습니다:
$ kubectl rollout restart deployment teleport-plugin-msteams
Access Request 생성#
다음 단계에 따라 Access Request를 생성하고 플러그인이 예상대로 작동하는지 확인합니다.
이전에 요청을 검토하도록 설정한 사용자는 Microsoft Teams에서 "TeleBot"으로부터 Teleport Web UI의 링크를 방문하여 요청을 승인하거나 거부할 수 있는 직접 메시지를 받아야 합니다.
요청 해결#
Once you receive an Access Request message, click the link to visit Teleport and approve or deny the request:

Reviewing from the command line
You can also review an Access Request from the command line:
요청이 해결되면 Microsoft Teams 봇은 새 상태를 반영하도록 Access Request 메시지를 업데이트합니다.
Microsoft Teams 플러그인이 채널에 Access Request 알림을 게시하면, 채널에 접근할 수 있는 모든 사람이 알림을 보고 링크를 따라갈 수 있습니다. 사용자가 Teleport 역할을 통해 Access Request를 검토하도록 권한을 받아야 하지만, 올바른 사용자가 올바른 요청을 검토하고 있는지 확인하기 위해 Teleport 감사 로그를 확인해야 합니다.
Access Request 검토를 감사할 때, Teleport Web UI에서 Access Request Reviewed 유형의 이벤트를 확인합니다.
9/9단계. systemd 설정#
이 섹션은 가상 머신에서 Teleport Microsoft Teams 플러그인을 실행하는 경우에만 해당됩니다.
프로덕션 환경에서는 systemd와 같은 init 시스템을 통해 Teleport 플러그인 데몬을 시작하는 것을 권장합니다. systemd를 위한 권장 Teleport 플러그인 서비스 유닛 파일은 다음과 같습니다:
<div class="admonition note"><div class="admonition-title">Note</div><p>이 섹션의 내용은 원문 문서를 참조하세요. (<code>teleport-msteams.service</code>)</p></div>
이를 /usr/lib/systemd/system/ 또는 systemd가 지원하는 다른 유닛 파일 로드 경로에 teleport-msteams.service로 저장합니다.
플러그인을 활성화하고 시작합니다:
$ sudo systemctl enable teleport-msteams
$ sudo systemctl start teleport-msteams
문제 해결#
이 섹션의 내용은 원문 문서를 참조하세요. (access-plugin-troubleshooting.mdx)
다음 단계#
- 리소스 Access Request 및 역할 Access Request 설정에 대한 가이드를 읽어 Access Request 플러그인을 최대한 활용하세요.
