This is a pass on replacing modulestest.SetTestModules with supplying modules
where already possible. Some additional uses of modules.GetModules were also
replaced with localized modules injection to permit the removal of
modulestest.SetTestModules in tests. Most of the changes here are mechanical,
the one notable change is in TestSSHCommands. The test was not passing locally
because the shell (fish) builtin echo behaves differently. The easiest way
to produce expected output was to change the command invocation to use
/bin/echo to bypass any shell builtins for consistent behavior.
Inject modules into tool tests
Inject modules into integration tests
Inject modules into join server
Remove superflous enterprise modules in TestAuthenticationConfig_Parse_deviceTrustPB
Inject modules into signature algorithm config tests
Inject modules into TestGithubConnectorCRUDEventsEmitted
Inject modules into TestGetHierarchyForUser
Inject modules into kube proxy tests
Inject modules into controller tests
make fix-imports
add integration/app/fixture as test package
* Port `github` join method to new join service
This ports the `github` join method to the new join service, used to
join from GHA workflows.
* Add github to joinclient whitelist
* Test new joinclient
* Fix failing tests
- Resolves some TODOs
- Replaces `require.ErrorIs()` with `require.ErrorContains()` for
compatibility with networked error responses which don't preserve
the exact error chain.
- Adds missing bail on error for joinclient cases
* Fix lints and run checkAndSetDefaults()
* Fix batch of code review suggestions
* Fix additional review comments
* Add support for `include_enterprise_slug` in `github` joining
* Correct assertiosn in github validator token test
* Remove `want` in TestIDTokenValidator_Validate
* Fix missing `should` in docs
Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>
* Fix spelling of customize in docs
* Update operator CRDs
* Regen protos
* Apply suggestions from code review
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
* Try both under same header
* Try H4
* Remove spurious period
* Use bold rather than heading
---------
Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
* Require enterprise license to create tokens including GHES support
* Enforce Enterprise on joining as well as token creation
* Fix tests and file formats for GHES enteprrise licenseing
* Use ErrRequiresEnterprise
* Fix imports >:(
* Add support for GHES joining
* Add tests for GHES ID Token validation
* Add test covering Auth server github join with GHES override
* Use correct ctx
* Name interface method parameters for clarity
* Use "scheme" instead of "proto"
* Improve docs, validation and add tests
* Add API types for CircleCI joining
* Add validation for CircleCI configuration
* Add JoinMethodCircleCI across codebase
* Add token validator and token source for circleci
* Update join methods RFD
* Add CircleCI token source to register.go
* Add serverside support for circleci joining
* Add test for TokenSource
* Add success case for token validation test
* Add expired test case
* Add test case for token from another org
* Test RegisterWithToken for CircleCI
* Refactor GitHub RegisterUsingToken tests
* Refactor CircleCI RegisterUsingToken tests
* Add tests for ProvisionTokenSpecV2
* Appease linters
* Go Imports files
* Fix failing test for msising IDtoken
* Update lib/auth/join_circleci.go
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
* Move test server cleanup closer to initialisation
* Fix weird import reordering
* Include unexpected type in error message
* Simplify boolean algebra :)
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
* Introduce Github Actions join support
* Go mod tidy
* run goimports on source files
* Address PR comments
* More PR review comments
* Changes to tests based on PR feedback
* Improve error message in github rule validation
* Add support for SHA
* Add short message describing which fields shouldb be included