Commit Graph
6 Commits
Author SHA1 Message Date
429247f407 [COMPLIANCE] Update Copyright Headers (#6282)
* [COMPLIANCE] Update Copyright and License Headers

* chore: make gen to generate files with copyright headers

* chore: update missed copyright headers

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
2026-01-28 11:05:07 -06: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
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
Todd 3558589c90 Return and consume InvalidListToken error code (#4141)
* Return and consume InvalidListToken error code
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn af61b688c6 internal/listtoken: remove overzealous validation
Validating that the update time of the last item is after the
create time of the token cannot account for items whose
update time are earlier than the original query because of
the added database transaction timeout buffer. Remove the
check.
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 3019038eab refreshtoken: move package to listtoken
The listtoken package encapsulates the logic used for all
types of pagination and refreshing across all list endpoints.
2024-01-05 07:43:20 -08:00