Commit Graph
229 Commits
Author SHA1 Message Date
Johan Brandhorst-SatzkornandMichael Li 262693f47c Restore soft deleted users on authentication (#5549)
* internal/clientcache: restore user on login

A user that previously had its last auth token deleted
(for example, if they logged out), should be restored
again when they successfully authenticate again.

* internal/clientcache: delete keyringless expired auth tokens

Previously, we would only correctly delete auth tokens
that were expired (or deleted) if they were also in the
keyring.

* internal/clientcache: remove tautological condition

At this stage we already know that at is non-nil, because
the case above would have been true if it was nil.

* internal/clientcache: improve error handling

The previous error handling would have ignored API errors that were not ErrUnauthorized or ErrNotFound.
Handle all API errors the same as other unexpected errors.

* internal/clientcache: make errors distinct

These two error conditions are otherwise impossible
to tell apart.

* test(e2e): Update search test to catch bug (#5551)

---------

Co-authored-by: Michael Li <michael.li@hashicorp.com>
2025-02-24 09:16:07 -08:00
Michael Li 14808d197f test(e2e): Differentiate between public and private vault addresses (#5553) 2025-02-20 10:27:43 -05:00
Michael Li 00a5a8f4c5 test(e2e): Address flakiness in bytes up/down test (#5450) 2025-01-22 11:14:00 -05:00
dd9c7b9d60 Create IPv6 and dual stack enos tests (#5212)
Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com>
2025-01-21 07:37:04 -08:00
Michael Li 554195f49f test(e2e): Add test for connect http (#5423)
* test(e2e): Add comment to test

* test(e2e): Add test for connect http

* CR
2025-01-09 12:43:21 -05:00
Michael Li 91c060ca44 test(e2e): Add increased retries due to worker status report changes (#5424) 2025-01-08 15:46:37 -05:00
Michael Li 02fe1b42d3 test(e2e): Extend vault oidc test to authenticate using the OIDC auth method (#5409)
* refact(e2e): Rename file for consistency

* test(e2e): Extend test to authenticate using oidc auth method

* CR: Add checks for account attributes

* CR: Use any instead of interface

* CR: Use %q
2025-01-07 14:04:54 -05:00
Michael LiandJohan Brandhorst-Satzkorn 6ed077c69e test(e2e): Add test for vault oidc provider (#5384)
* test(e2e): Simplify vault address in docker network

* test(e2e): Add oidc test using vault

* Update enos/modules/docker_vault/main.tf

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-12-19 17:06:01 -05:00
Elim Tsiagbey a4f2a704fd test(e2e): add GCP dynamic host catalog e2e tests (#5294)
* test(e2e): add GCP infra resources and tests for enos testing

- add 1 new `gcp_target` module that creates a GCP VM instance with labels for filtering
- add GCP dynamic host catalog e2e tests
2024-12-17 14:06:14 -05:00
Michael Li 08c245cd00 test(e2e): Update test to mitigate timing flake
Observed one instance of a test failure when the test failed to connect to the target after changing an API tag on the worker.
2024-12-10 16:38:29 -05:00
Michael Li 66e8ec0f41 test(e2e): Fix failure in migration test (#5277)
* test(e2e): Fix log path to avoid error

* test(e2e): Be explicit about port definition to avoid dockertest issue

* test(e2e): Add check for health
2024-11-22 15:05:46 -05:00
Michael Li 504050acb9 test(e2e): Add debug to search test (#5274)
* test(e2e): Fix typo

* test(e2e): Add cache log to output on failure
2024-11-21 13:50:19 -05:00
Michael Li 50db63be95 test(e2e): Add retry to search test (#5187) 2024-10-18 18:06:56 -04:00
Michael Li 40efebf7ab test(e2e): Add check for target authorize-session using scope name and target name (#5118) 2024-09-20 15:28:05 -04:00
Johan Brandhorst-Satzkorn 59fd2d4595 e2e: replace '%s' with %q (#5058)
%q handles quotes inside the quoted strings better.
2024-08-29 15:50:19 -07:00
Michael Li 05f281673e test(e2e): Add test for worker api tags (#5005)
* test(e2e): Add test for worker api tags

* CR: Add additional check for an API tag that's the same as a config tag
2024-08-14 11:58:27 -04:00
Michael Li 3da1615ddb test(e2e): Add check for ldap account attribute mapping (#4867) 2024-06-04 14:24:15 -04:00
Michael Li c986d20cef test(e2e): Rename daemon command to cache (#4833) 2024-05-29 12:02:26 -04:00
Michael Li a22f031ce0 chore(e2e): Use region specified in variable (#4814) 2024-05-28 09:46:01 -04:00
Stan Ryzhov 76a5530b53 test(e2e): Verify host id and invalid input for aliases (#4691) 2024-05-02 11:05:03 -04:00
Michael Li 67e6664de9 test(e2e): Close http requests in rate limit test (#4733)
* test(e2e): Close http requests

* test(e2e): Address timing flakiness
2024-04-26 15:36:11 -04:00
Michael Li 846ecedef6 test(e2e): Address flake in rate limit test (#4670)
* test(e2e): Fix warning

* test(e2e): Fix flake
2024-04-19 11:12:19 -04:00
Elim Tsiagbey c67f468e94 test(e2e): add helper function for finding worker by filter
- Add `GetWorkerWithFilterCLI` helper function for finding a worker by Address
2024-04-05 16:47:28 -04:00
Michael Li 51d33f3393 refact(e2e): Add err to helper methods (#4581)
* refact(e2e): Add err to CreateOrgApi

* refact(e2e): Add err to CreateProjectApi

* refact(e2e): Add err to CreateOrgCli

* refact(e2e): Add err to CreateProjectCli

* refact(e2e): Add err to CreateHostCatalogApi

* refact(e2e): Add err to CreateHostSetApi

* refact(e2e): Add err to CreateHostApi

* refact(e2e): Add err to AddHostToHostSetApi

* refact(e2e): Add err to CreateHostCatalogCli

* refact(e2e): Add err to CreateHostSetCli

* refact(e2e): Add err to CreateHostCli

* refact(e2e): Add err to AddHostToHostSetCli

* refact(e2e): Add err to CreateAwsHostCatalogCli

* refact(e2e): Add err to CreateAwsHostSetCli

* refact(e2e): Add err to CreateTargetApi

* refact(e2e): Add err to AddHostSourceToTargetApi

* refact(e2e): Add err to CreateTargetCli

* refact(e2e): Add err to AddHostSourceToTargetCli

* refact(e2e): Add err to SetHostSourceToTargetCli

* refact(e2e): Add err to RemoveHostSourceFromTargetCli

* refact(e2e): Add err to AddBrokeredCredentialSourceToTargetCli

* refact(e2e): Add err to RemoveBrokeredCredentialSourceFromTargetCli

* refact(e2e): Add err to CreateUserApi

* refact(e2e): Add err to CreateUserCli

* refact(e2e): Add err to SetAccountToUserCli

* refact(e2e): Add err to CreateRoleApi

* refact(e2e): Add err to CreateRoleCli

* refact(e2e): Add err to AddGrantToRoleCli

* refact(e2e): Add err to AddPrincipalToRoleCli

* refact(e2e): Add err to CreateManagedGroupApi

* refact(e2e): Add err to CreateGroupApi

* refact(e2e): Add err to CreateGroupCli

* refact(e2e): Add err to AddUserToGroup

* refact(e2e): Add err to CreateCredentialStoreStaticApi

* refact(e2e): Add err to CreateCredentialStoreVaultApi

* refact(e2e): Add err to CreateCredentialStoreVaultCli

* refact(e2e): Add err to CreateCredentialStoreStaticCli

* refact(e2e): Add err to CreateVaultGenericCredentialLibraryCli

* refact(e2e): Add err to CreateStaticCredentialPrivateKeyCli

* refact(e2e): Add err to CreateStaticCredentialPasswordCli

* refact(e2e): Add err to CreateStaticCredentialJsonCli

* refact(e2e): Add err to CreateStaticCredentialPasswordApi

* refact(e2e): Add err to CreateAuthMethodApi

* refact(e2e): Add err to CreateOidcAuthMethodApi

* refact(e2e): Add err to CreateAccountApi

* refact(e2e): Add err to CreateAccountCli
2024-04-03 09:44:44 -04:00
Michael Li 8533433868 refact(e2e): Consolidate tests (#4569)
* refact(e2e): Move -remote-command check into ssh test

* refact(e2e): Remove duplicate test

* fix(e2e): Modify unnecessary use of Logf

* fix(e2e): Add error checks

* fix(e2e): Remove unused parameter
2024-03-27 09:49:06 -04:00
Michael Li e0305f11aa test(e2e): Add check for boundary search -force-refresh (#4566) 2024-03-26 12:56:17 -04:00
Stan Ryzhov 41d3dffa9b test(e2e): Add multi-scope grants test (#4446) 2024-03-01 12:53:42 -05:00
Michael Li 2e55ae72ba test(e2e): Add test for alias (#4436) 2024-02-29 15:52:27 -08:00
Michael Li fee2b99ade refact(e2e): Create vault-generic credential library helper method (#4437)
* refact(e2e): Create vault-generic credential library helper method

* fixup! refact(e2e): Create vault-generic credential library helper method
2024-02-23 15:46:11 -05:00
Michael Li 694db71004 fix(e2e): Add extra buffer in -session-max-seconds test again (#4440) 2024-02-23 10:33:43 -05:00
Stan Ryzhov 2497078df6 test(e2e): Add ssh log for failed requests (#4431) 2024-02-20 14:37:14 -05:00
Michael Li 4d344edecc test(e2e): Add extra buffer in -session-max-seconds test (#4428)
This test would sometimes fail due to the diff sometimes exceeding `sessionMaxSeconds+1` by less than 1 second.
2024-02-20 11:09:36 -05:00
Michael Li a48698a315 test(e2e): Add test to check target's -session-max-seconds (#4411)
* test(e2e): Add test to check target's -session-max-seconds

* test(e2e): Add additional test to check new connections are rejected

* test(e2e): Fix test check
2024-02-20 09:26:55 -05:00
Stan Ryzhov 7de0699a0d test(e2e): Verify long-lasting scripts complete successfully on tcp targets (#4423) 2024-02-16 15:22:47 -05:00
Jeff MitchellandDamian Debkowski 35cef97bd4 Linter fixes PR 3 (#4415)
* Linter fixes

* fix(bsr): update test to register TEST protocol once

---------

Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com>
2024-02-16 08:30:16 -05:00
Jeff Mitchell 4068829509 Merge pull request #4401 from hashicorp/jefferai-linter-fixes
Fix linter warnings, parts 1 and 2
2024-02-14 17:55:41 -05:00
Stan RyzhovandMichael Li a22459342b test(e2e): Add option to wait for multiple sessions (#4410)
Co-authored-by: Michael Li <michael.li@hashicorp.com>
2024-02-14 15:02:41 -05:00
Michael Li c72c614200 test(e2e): Add test to validate session connection limits (#4395)
* test(e2e): Move default client port test to its own file

* test(e2e): Add test to validate session connection limits
2024-02-13 16:28:49 -05:00
Jeff Mitchell 25bce9e8ff Fix linter warnings 2024-02-13 15:50:11 -05:00
Michael Li 61fb079371 test(e2e): Add test for authentication when no keyring is available (#4378) 2024-02-09 13:07:17 -05:00
Johan Brandhorst-Satzkorn be252e3447 testing/e2e: add option to skip slow test (#4380) 2024-02-08 10:19:09 -08:00
Michael Li 4ebdd9458a test(e2e): Fix error in migration test (#4354) 2024-02-06 11:54:29 -05:00
Johan Brandhorst-Satzkorn c334ec700c enos: support max_page_size in AWS scenarios (#4352) 2024-02-02 09:21:21 -08:00
Michael Milton 207d814135 testing/e2e: add auth method pagination tests (#4333)
* testing/e2e: add auth method pagination tests

* list with scope, spell check

* removed unnecessary recursion
2024-02-01 12:46:43 -05:00
Johan Brandhorst-Satzkorn 7fe9198bce testing/e2e: paginate managed groups (#4315) 2024-01-29 13:56:25 -08:00
Johan Brandhorst-Satzkorn 0bddb346e5 testing/e2e: add account pagination test (#4314) 2024-01-29 13:22:21 -08:00
Johan Brandhorst-Satzkorn d47d2ad2e4 testing/e2e: add auth token pagination tests (#4311) 2024-01-29 11:51:40 -08:00
Timothy Messier 1e51dbef4f feat(test): Add docker images for additional postgres versions 2024-01-18 19:37:46 +00:00
Timothy Messier e255284996 feat(test): Disable JIT for test database image 2024-01-18 19:37:46 +00:00
Johan Brandhorst-Satzkorn ada0c273b0 testing/e2e: add scope pagination test (#4233) 2024-01-16 09:22:28 -08:00