Commit graph

22 commits

Author SHA1 Message Date
Andrew Burke b7efbcebb0
Add error message for failed SSO authorization (#9622)
This change, along with gravitational/webapps#530, adds a new error message for when a user successfully authenticates with SSO but fails to match any roles.
2022-07-15 23:55:25 +00:00
Russell Jones 2552b4ab25 Refactor tests under auth package.
Refactored all tests under "lib/auth" to use testify instead
of gocheck.

Switched backend for most tests to "memory".
2022-07-08 17:41:59 -07:00
Russell Jones f7144fe860 Refactor tests under services package.
Refactored "lib/services/suite" and "lib/services/local" packages to use
testify instead of gocheck.

Swapped backend from "lite" to "memory" to cut time to run tests in
half.
2022-07-07 17:40:34 -07:00
Joel efd10847bf
Modernize role mapping in github connectors (#10456) 2022-06-08 15:34:15 +00:00
Krzysztof Skrzętnicki 9377f7c681
New commands: tctl sso test, tctl sso configure for GitHub (#12783)
* Implement `tctl sso` commands for GitHub auth.

* Mark RFDs as implemented.
2022-05-26 23:26:35 +00:00
Zac Bergquist 3b0127f00b Move MockEmitter to eventstestpackage 2022-03-29 12:12:01 -06:00
Alex McGrath 34a087ff43 Convert auth test from gocheck to standard lib 2022-02-10 16:04:27 +00:00
Alex McGrath 1ca73cd1e7 Add github teams to available traits 2022-01-24 10:59:59 +00:00
Brian Joerger 9b8b9d6d0c
rollback - Upgrade api version. (#7751) 2021-07-30 15:34:19 -07:00
Brian Joerger c040aca4c1
Upgrade api version. (#7609) 2021-07-28 13:51:21 -07:00
Andrej Tokarčík d63d144e8e
Move ClusterID field from ClusterConfig to ClusterName (#7050) 2021-06-18 18:42:09 +02:00
Brian Joerger 7bff7c41bd
Remove API aliases (#6983) 2021-06-04 13:29:31 -07:00
Andrew Lytvynov fc1c1dbd14 Move all utils.InitLoggerForTests calls to TestMain
This prevents data races between changing the standard logger and it
acutally being used.
2021-02-23 18:04:55 -08:00
Andrew Lytvynov 5ca68f2351
Remove 'var _ = fmt.Printf' from *_test.go files (#5438)
These declarations serve no purpose, likely leftover from old debugging.
2021-01-29 17:01:10 -08:00
a-palchikov 7c87576a8b
flaky tests: consistent logging (#4849)
* Update logrus package to fix data races
* Introduce a logger that uses the test context to log the messages so they are output if a test fails for improved trouble-shooting.
* Revert introduction of test logger - simply leave logger configuration at debug level outputting to stderr during tests.
* Run integration test for e as well
* Use make with a cap and append to only copy the relevant roles.
* Address review comments
* Update integration test suite to use test-local logger that would only output logs iff a specific test has failed - no logs from other test cases will be output.
* Revert changes to InitLoggerForTests API
* Create a new logger instance when applying defaults or merging with file service configuration
* Introduce a local logger interface to be able to test file configuration merge.
* Fix kube integration tests w.r.t log
* Move goroutine profile dump into a separate func to handle parameters consistently for all invocations
2020-12-07 15:35:15 +01:00
Lisa Kim f7360b72ea
Fix incorrect github login success event code (#4509) 2020-10-13 09:14:46 -07:00
Andrew Lytvynov 92ed2db38a Fixing golint warnings, batch 1
Mostly cosmetic changes:
- making receiver names consistent
- renaming `foo.FooBar` to `foo.Bar` (using package name as prefix)
- removing redundant `else` branches
- changing `a += 1` to `a++`
2020-10-13 00:22:49 +00:00
Forrest Marshall 05f3eeaf00 Support resource-based bootstrapping for backend. (#2871)
* Support resource-based bootstrapping for backend.

Outside of static configuration, most of the persistent state of an
auth server exists as a collection of resources, stored in its
backend.  The resource API also forms the basis of Teleport's more
advanced dynamic configuration options.

This commit extends the usefulness of the resource API by adding
the ability to bootstrap backend state with a set of previously
exported resources.  This allows the resource API to serve as a
rudimentary backup/migration tool.

Notes: This features is a work in progress, and very easy to misuse;
while it will prevent you from overwriting the state of an existing
auth server, it won't stop you from bootstrapping into a wildly
misconfigured state.  In general, resource-based bootstrapping is
not a complete solution for backup or migration.

* update e-ref
2019-08-29 16:16:03 -07:00
Russell Jones 75fe74da86 Consolidate external identity user creation code. 2019-02-18 18:30:52 -08:00
Russell Jones ca81521966 Moved expires to resource metadata for services.Users.
Moved expiry field from spec to metadata for services.Users and updated
expiry check to prefer metadata and fallback to spec if not found. Added
test coverage.
2019-02-18 18:30:52 -08:00
Roman Tkachenko 59c265894f Use Github username instead of email 2017-12-14 18:07:20 -08:00
Roman Tkachenko c0cf7df7c9 Github connector 2017-12-14 13:41:38 -08:00