* internal/clientcache: add -force-reset-schema flag
* clientcache: stream list pages directly to DB
---------
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
(cherry picked from commit ccea8a4ce53f7b0d1105c1c1e4875e443635d96a)
Fix ensures that the TestServer returned uses the
correct directory for writing its sqlite files,
which was created via t.TempDir()
(cherry picked from commit 85f91043a164bdacc1c6738ae0e7c50077d55c79)
This ensures we don't have competing update processes running. When doing the
inline RefreshForSearch, a specific error will be returned so we can hint in
the API that we're in the middle of a refresh.
(cherry picked from commit 54776091e32af2f2f110f2bf10d0617bd5677aba)
This allows getting a list of scope IDs known by the cache via cached
targets and sessions. It is not refreshed from the controller. The name
contains `implicit` in case we ever want e.g. `scopes`.
(cherry picked from commit c0a318c58367d8ec55365447f41cf007eab64ce3)
By default, we will use a persistent cache for the
client cache. This will allow us to keep the cache
across restarts of the server and it will also
reduce the amount of time it takes to start the
server while reducing the amount of memory used.
This change also includes a validation of the cache
schema version. If the schema version is different
from the one expected, the cache will be
reset/recreated.
(cherry picked from commit cf8a51f3834033b7f986a9a7e091ab31c4328415)
A query parameter `max_result_set_size` can be specified to set a
per-request limit, with `-1` meaning all values. If there were more
entries than the max size used for the request, an `incomplete` boolean
is set in the response.
(cherry picked from commit 3cdd07889be5e4e6f21d044cb60fad1face4be08)
* refact: to use go-dbw CreateItems, DeleteItems
Latest version of go-dbw updated the signature of
CreateItems(...) and DeleteItems(...) on a happy
note this latest version of go-dbw actually does
batch inserts and updates for this functions.
* all: regenerate protos with new protoc-gen-go version
* internal/cmd/wrapper: add deprecation wrapper
The deprecation wrapper can be used to display a warning to callers
when a command is deprecated.
* all: rename daemon to cache
Rename the boundary daemon command to boundary cache. This
avoids confusion with future client/daemons.
* changes daemon to cache in nav
---------
Co-authored-by: Robin Beck <stellarsquall@protonmail.ch>
AuthToken selection involves checking to seeing if the one we are picking has been canceled or expired on the boundary controller. If we are only searching locally and not performing a refresh, there is no need to check if the tokens have expired or not.
* Save and assign hclogger throughout the client cache daemon
* Don't event for errors happening outside of the handlers or tickers.
* Hide and ignore -store-debug and expose the -log-level flag
* Use the intercepted token if present, use it through the keyring if keyring contains it
* fixup! Use the intercepted token if present, use it through the keyring if keyring contains it
* Apply suggestions from code review
Co-authored-by: Jim <jlambert@hashicorp.com>
---------
Co-authored-by: Jim <jlambert@hashicorp.com>
* Fix calculating uptime after system sleep
* Update internal/clientcache/internal/daemon/status_handler.go
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
---------
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
* Decrease number of flags shown for daemon/search
* Update changelog
---------
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
* 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