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
Ryan Clark 806a568ada Introduce config v3, add auth_server and proxy_server, remove auth_addresses (#15761) 2022-09-28 15:30:15 +00:00
Edoardo Spadolini fa65fd02b1 Refactor Supervisor.WaitForEvent (#14940) 2022-07-28 13:34:27 +00:00
Noah StrideandTim Buckley c18d914745 Machine ID CA rotation (#13231)
* start hashing out machine id CA rotation

* filter out incoming ca events by type

* support multiple trusted certificate authorities in known_hosts

* remove redundant trace.Debug from `tbot` `main()`

* filter to only recieve relevant CA events

* add exponential backoff to renewal

* remove unnecessary `.Ping()` check with new client

* add unit test for filtering CA events

* debounce reloads

* add retry limit and backoff for CA watching

* add integration test for CA rotation

* modify CA rotation watcher loop to retry forever

Co-authored-by: Tim Buckley <tim@goteleport.com>
2022-07-13 16:52:44 +00:00
Ryan Clark 3e3b9b42b5 Change tbot to allow reading the token from a file (#14087)
This changes tbot's configuration to access the token via a
getter/setter instead of a direct property, to allow us to fetch the
token (possibly reading it from a file) when we need it instead of when
the configuration is created.

This also changes the identity fetching logic, to try and read the token
when there is an identity present but not error, allowing for the token
file to have been deleted between restarts. If it can read the token,
it'll check to see if it has changed and refetch the identity if so.
2022-07-13 15:48:08 +00:00
Noah Stride 5e8cfb345c Correct terminology from SSHAddr to ListenAddr for Auth server (#13725)
Rename auth SSHAddr to ListenAddr
2022-06-22 23:03:08 +00:00
Edoardo Spadolini 1e49830ff9 Comments 2022-06-10 11:12:01 +02:00
Edoardo Spadolini bafbef35ba Fix listener flakiness in tbot tests 2022-06-10 11:12:01 +02:00
Tim Buckley 6a9b770fb9 Make TestDefaultTemplateRendering less failure prone (#13002)
* Make `TestDefaultTemplateRendering` less failure prone

The test requires the Teleport server to report a sane public proxy
address, however occasionally it takes some time to initialize and
returns an invalid value until that point.

This adds a wait loop to the client initialization helper to wait up
to 10 seconds for the server to return a sane value, which should
improve reliability of the test.

* Use `require.Eventually()`, reduce tick interval
2022-06-06 22:25:26 +00:00
Noah Stride 8b346ef06b Refactor tbot (#12855)
* start refactoring tbot to have a core struct

* refactor tbot into lib/

* move `tbot` subpackages to `lib/tbot`

* remove mutex pointer

* move `tshwrap` to `lib/` from `/tool/tbot/`

* move new template ssh client render test to lib/

* address pr feedback

* add request changed
2022-06-01 17:15:26 +00:00