Commit Graph
10 Commits
Author SHA1 Message Date
Zac Bergquist 2ae9d770fc Refactor tctl's dependencies (#22693)
* Move configuration from lib/service to lib/service/servicecfg

The new servicecfg package will hold only configuration for services.
This will allow other packages (like tctl and tsh) to depend on
servicecfg without pulling in all of lib/service (which has a number
of platform-specific details).

This is the first step towards being able to build tctl for Windows.

* Move PAM and BPF config into servicecfg

This breaks a compile-time dependency on BPF/PAM for tctl.
2023-03-09 17:48:36 +00:00
Steven Martin a4e80bc458 Provides output for windows_desktop and kube tokens type (#19979) 2023-01-12 17:40:17 +00:00
Vitor Enes a566bd8018 Ensure tctl windows_desktops ls produces expected output (#18779)
This commit ensures that `tctl desktops ls --format json|yaml` outputs a
list of `windows_desktop` resources. Note that `tctl desktops ls`
displays additional information that is only present in the
`windows_desktop_service`.

With `tctl windows_desktops ls --format json` now we get something like the
following:
```json
[
    {
        "kind": "windows_desktop",
        "version": "v3",
        "metadata": {
            ...
        },
        "spec": {
            ...
        }
    },
    ...
]
```

`tctl windows_desktops ls --format text` now also displays the same information
as `tctl get windows_desktop --format text` (removing all the info about the
`windows_desktop_service`):

```bash
❯ tctl get windows_desktop --format text 
Name                        Address           AD Domain   Labels 
--------------------------- ----------------- ----------- ------ 
EC2AMAZ-QME01PL-example-com 172.31.4.209:3389 example.com        

❯ tctl windows_desktops ls             
Name                        Address           AD Domain   Labels 
--------------------------- ----------------- ----------- ------ 
EC2AMAZ-QME01PL-example-com 172.31.4.209:3389 example.com      
```
2022-12-02 18:25:57 +00:00
Vitor Enes 3031147920 Add tctl windows_desktops as the default and keep tctl desktops as an alias (#18769)
Before this commit, users would `tctl get windows_desktop/<name>` and
`tctl desktops ls`. For consistency, `tctl windows_desktops ls` is now
the default but `tctl desktops ls` is kept as an alias for backwards
compatibility.
2022-11-28 17:57:14 +00:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Noah Stride 18558b88e9 thread context.Context from tctl Run() to subcommands (#13029) 2022-06-01 12:49:59 +01:00
Alex McGrath 40200e8536 Reslove comments, move all occurences of teleport.dev to use a constant 2022-03-15 13:22:45 +00:00
Alex McGrath 19270c1e71 Resolve comments 2022-03-15 13:22:45 +00:00
Alex McGrath b6df9a742a Add verbosity to tctl * ls commands and resource get. 2022-03-15 13:22:45 +00:00
Alex McGrath cdae4e3ee2 ls consistency: add support for tctl desktop ls
```
Host Public Address       AD Domain   Labels               Version
---- -------------------- ----------- -------------------- ---------
corn 192.168.122.144:3389 example.com teleport..3 (9       9.0.0-dev
corn 192.168.122.51:3389  example.com teleport.rd Evle.com 9.0.0-dev
```

```yaml
kind: windows_desktop
metadata:
  expires: "2022-02-18T16:12:52.422659238Z"
  id: 1645200172423989197
  labels:
    teleport.dev/computer_name: WIN-LA2V0OD7SK0
    teleport.dev/dns_host_name: WIN-LA2V0OD7SK0.example.com
    teleport.dev/is_domain_controller: "true"
    teleport.dev/origin: dynamic
    teleport.dev/os: Windows Server 2012 R2 Standard Evaluation
    teleport.dev/os_version: 6.3 (9600)
    teleport.dev/windows_domain: example.com
  name: WIN-LA2V0OD7SK0-example-com
spec:
  addr: 192.168.122.51:3389
  domain: example.com
  host_id: 2c807641-92ae-4c70-88fe-b93e7b0aa179
version: v3
```
2022-03-15 13:22:45 +00:00