Commit Graph
3726 Commits
Author SHA1 Message Date
Todd e429e91bc4 Do not cache or allow searching for old controllers (#4136)
* Do not cache or allow searching for old controllers

* Identify resourceless responses as coming from supported or unsupported controllers

* Do not report refresh token status info for unsupported controllers
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn d94a25bbd2 internal/host: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn d4f5677858 internal/iam: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn f9950a7e1c internal/authtoken: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn d4d1efce93 internal/session: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 6238a533b0 internal/credential: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn fc9b26efa7 internal/target: sort public_id descending
The previous sort would run the risk of missing items which
collide on update or create times because of the compound
comparison using strictly less than for both the timestamp
and the public_id. Sorting both descending avoids thi issue.
2024-01-05 07:43:21 -08:00
Michael Li 3bf925ca32 test(e2e): Decrease rate limit in config (#4183) 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 050bcdfec9 handlers/host_sets: implement pagination for host sets
Adds protobuf types and handler logic to support pagination of host sets.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn e14c1382b3 internal/host: add static host set pagination 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 4ba521a3e0 internal/host: add plugin host set pagination 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 27393a8227 internal/db: add host set indexes 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 6757510205 internal/session: add helper for listing sessions
This is used in an enterprise test
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn f29d559d60 handlers/session_recordings: add pagination support 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 24130c4313 handlers/storage_buckets: add pagination fields 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 516d7b3486 internal/storage: support pagination for storage buckets 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 8c3e309816 internal/storage/plugin: run tests in parallel 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 1a6e2fc5b1 internal/storage: fix options test
An assert created in the parent was being used in subtests,
which will attribute test failures incorrectly.
Also run tests in parallel.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 16eab12458 internal/plugin: fix typo 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 5ef1a39727 internal/credential: use simpler query arg 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 61642f8b5f internal/authtoken: use simpler query arg 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 9b40cf0801 internal/iam: validate token resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 025ef0d9ca internal/target: validate token resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 3288f78f12 internal/session: validate token resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 12403d49ad internal/credential: validate token resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 799009fc04 internal/authtoken: validate token resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 597ac645b2 internal/handlers: fix some comments 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 7190042f8e internal/credential: 🤦 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn bf1e44afd6 internal/pagination: add notes about plugin map 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn a237157b91 internal/listtoken: remove validation depending on application time
All times in the list tokens are sourced from the database,
and any comparisons to times in the application can
cause false positive validation errors. We've observed
this from multiple users of the pagination logic, and
the value of this validation is very little compared
to the cost of a single false positive error like this
happening to a real world customer. Therefore, remove
any list token validation using the application time,
except the one monitoring for token expiry, which
should not suffer from the issue to a degree
that matters to our users.

Also refactor validation such that the list token subtype
constructors only perform sanity checks on the values
while punting business logic validation to the validate
method on the new token. This means we avoid
duplicating logic.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn f89e53d5f0 internal/handlers: tidy up test times 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn bcddef87a2 internal/pagination: stop using unknown resource type 2024-01-05 07:43:21 -08:00
Todd d453a2a48a Check in client wrapper if cache daemon is already in use (#4172) 2024-01-05 07:43:21 -08:00
Michael Li 3e4feac261 test(e2e): Add test for pagination of hosts 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 17b6ad5c5c handlers/hosts: implement pagination for hosts
Adds protobuf types and handler logic to support pagination of hosts.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn cea80413c9 internal/host: add static host pagination 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 473facbc5f internal/host: add plugin host pagination 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn faf7ebce85 internal/host: add pagination options
Add options to support pagination of hosts, host sets and host catalogs.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 21c593ab71 internal/db: add host indexes 2024-01-05 07:43:21 -08:00
Todd 6f488d7c59 Evanulate if cache daemon should be skipped after the flags are parsed (#4168) 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 8175086be7 internal/pagination: avoid import cycle
The iam package is very foundational, and now depends
on the pagination package. Thus, the pagination package
must not import any packages that may import iam,
such as the plugin package. Move the plugin helpers
to a subdirectory to avoid this import cycle.
2024-01-05 07:43:21 -08:00
Todd 5aa560387c Add pagination for iam Roles (#4161)
* Add pagination for iam Roles
2024-01-05 07:43:21 -08:00
Todd 9ebb69f2a4 Add target type and session user_id as searchable (#4076)
* Add target type and session user_id to search
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn df93313b9a all: fix test failures after rebase
The stability of the authorized_actions have been removed in main,
so we need to add these sorts to all our new tests.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 77b76ae685 internal/db: reorder pagination schema files 2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 6c9bc84790 testing/e2e: add credential store pagination test 2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 0259f2f26b internal/handlers: add credential store pagination 2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn a7ebb7a3ef internal/credential: add store pagination logic 2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 3197ab763f internal/credential/static: add store pagination logic 2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 7efb43ac03 internal/credential/vault: add store pagination logic 2024-01-05 07:43:20 -08:00