teleport/examples/desktop-registration
Mike Jensen cd34f3b5f8
Update remaining google.golang.org/grpc to v1.57.1 (#33486)
This are primarily examples, but we still want to update to ensure coverage against CVE-2023-44487.
2023-10-16 15:08:48 +00:00
..
go.mod Update remaining google.golang.org/grpc to v1.57.1 (#33486) 2023-10-16 15:08:48 +00:00
go.sum Update remaining google.golang.org/grpc to v1.57.1 (#33486) 2023-10-16 15:08:48 +00:00
main.go add example for registering desktops via API (#21154) 2023-02-08 18:08:32 +00:00
README.md add example for registering desktops via API (#21154) 2023-02-08 18:08:32 +00:00

Desktop Registration

In some cases, you may wish to disable Teleport's LDAP-based discovery and register Windows desktops manually. While you can register desktops via a config file, this approach doesn't work well for ephemeral environments where desktops can come and go.

This example shows how to use Teleport's API client to register desktops. It is intended to be used as a starting point for developing your own integrations in cases where LDAP discovery is not available or insufficient.

Authentication

This example authenticates to Teleport by using the tsh profile from disk. This means you must run a tsh login prior to running the example. The Teleport API can also load credentials from identity files generated via tctl auth sign or with Teleport Machine ID.

RBAC

The example must run with a role that grants create and update permission on the windows_desktop resource.

kind: role
version: v6
metadata:
  name: heartbeat-desktops
spec:
  allow:
    rules:
    - resources:
      - windows_desktop
      verbs:
      - create
      - update