Commit Graph
324 Commits
Author SHA1 Message Date
Hugo b8046a3ef3 feat(handlers/host_catalogs): Support plugin host catalog worker filter 2024-09-30 21:24:18 +01:00
Jeff Mitchell 62d4f8453b Don't explode grants from the DB (#5104)
This removes the Cartesian product in the DB for GrantsForUser in favor
of returning the actual grant scope information and dealing with it in
application code.

(cherry picked from commit 913cd536823d73994acc4f4d833208c1cc05f91b)
2024-09-24 14:18:53 +00:00
Irena Rindos 2945692bf4 Client cache API paging (#5107)
* 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)
2024-09-24 14:18:53 +00:00
Jeff Mitchell 3a4ee032d9 Paginate targets in cache (#5101)
* Update Go API to support pagination
* Implement pagination of targets in cache

(cherry picked from commit cd25fad42f325fc050b7ea3bec3336780d2b5e16)
2024-09-24 14:18:53 +00:00
Damian Debkowski 9576ed40dc test: improve test to ensure ipv6 compatability (#5113) 2024-09-19 08:55:27 -07:00
Michael Gaffney 68c83eb419 chore: Bump to Go version 1.23.1
Go 1.23.1 includes security fixes to the encoding/gob,
go/build/constraint, and go/parser packages, as well as bug fixes to the
compiler, the go command, the runtime, and the database/sql, go/types,
os, runtime/trace, and unique packages.

See: https://groups.google.com/g/golang-announce/c/K-cEzDeCtpc
2024-09-09 13:41:49 -04:00
Jeff Mitchell 35d1df7388 Two fixes in our Go API code: (#5066)
* Replace `interface{}` with `any`
* For options that are bools, don't always set true; set to the actual
  value passed in (some options already behaved this way, but they all
  should)
2024-09-04 11:40:43 -04:00
Johan Brandhorst-Satzkorn 4a031d9910 api: remove items deleted during refresh pagination (#5056)
The API automatically paginates to the end of a pagination,
and would take into account any items updated and subsequently
removed since the last pagination. It now also removes any items
removed during the current pagination.
2024-08-29 12:43:54 -07:00
Hugo 6f370c1189 fix(api): Check MaxRetries integer bounds 2024-08-21 13:55:58 +01:00
Johan Brandhorst-Satzkorn 6c4db8b6c0 all: upgrade Go to 1.23.0 2024-08-15 12:23:12 -07:00
Damian Debkowski c0cf5c4e1b feat(api): return remote storage states for worker 2024-07-17 14:23:11 -04:00
Damian Debkowski 88c67e4eea feat(proto): define storage bucket state in worker status 2024-07-17 14:23:11 -04:00
Johan Brandhorst-SatzkornandJeff Mitchell c6f3c375f3 api: remove deprecated grant_scope_id field (#4886)
* api: remove deprecated grant_scope_id field

The grant_scope_id field was deprecated in 0.15.0, so we can remove
it for 0.17.0.

* Fix tests

* Fix more tests

* Remove an option and some related code that stuck around

* Fix bats tests

---------

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2024-06-17 12:09:33 -07:00
ToddandJohan Brandhorst-Satzkorn 5ff3216565 Instead of relying on termination reason use status (#4852)
* Instead of relying on termination reason use status

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-05-31 08:12:31 -07:00
Todd 98b5e3fa52 Close proxy listener if session is no longer active (#4850)
* Close proxy listener if session is no longer active
2024-05-30 16:12:17 -07:00
Todd 6c378e7723 Create an option to set the session teardown timeout (#4834) 2024-05-29 10:23:23 -07:00
Todd 590182cf72 Updated the expected status code for unimplemented api errors. (#4802)
* Updated the expected status code for unimplemented api errors.
2024-05-15 12:48:09 -07:00
Todd e675aed978 Add the unimplemented api error. (#4799) 2024-05-14 15:03:36 -07:00
Todd 608b6bb2b7 Add ListResolvableAliases SDK changes (#4653)
* Add API changs for list resolvable aliases
2024-04-17 11:13:08 -07:00
Elim Tsiagbey 2c140b1e09 feat: Local Storage State API & CLI
- add `local_storage_state` value to API & CLI
2024-04-05 16:47:22 -04:00
Louis Ruch e9e3d7cad5 feat(session): Include session recording id in auth-session resp (#4593) 2024-04-03 17:54:37 -07:00
Todd c42a940332 Updating deps (#4537) 2024-03-25 10:09:44 -07:00
Todd 868228847d Add handler and API support for alias creation with target (#4508)
* Add handler and API support for alias creation with target
2024-03-12 13:57:47 -07:00
Todd 305bb09c35 Treat alias values like other required fields in API and CLI (#4404)
* Treat Alias values like other required fields in API and CLI

* Fix protoc versions since we recently rebased on main which uses updated version
2024-02-29 15:52:27 -08:00
Todd a6c96d69ae Add TargetAliasAuthorizeSessionArgumentsHostId api options (#4397)
* Add host id api option
2024-02-29 15:52:27 -08:00
Todd 78e10864c4 Add alias CLI CRUDL commands (#4353)
* Add alias CLI CRUDL commands
2024-02-29 15:51:24 -08:00
Todd 3f3b624b54 Add alias resolution to target service (#4277)
* Add aliases to target resource and alias resolution to target service

* Wire up the target alias domain package to the target service handler

* Adding alias resolution to target api tests
2024-02-29 15:51:24 -08:00
Todd 92181e272a Create the alias service and resource (#4276)
* Create the alias service and resource

* Add alias generated API files and tests
2024-02-29 15:51:24 -08:00
Michael Milton 2e69d59dd2 feat(billing): Add cli subcommand for monthly active user counts 2024-02-23 15:44:10 +00: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
Elim Tsiagbey 1b1c8b3bf9 fix: Proxy closing listener with 0 connections left (#4389)
* fix: Proxy closing listener with 0 connections left

A bug was introduced in `0.15.0` where sessions with max connection counts were closed when the connections left hit 0. This issue was highlighted by a user: https://github.com/hashicorp/boundary/issues/4364. What was happening was when we have zero connections left the proxy code was closing the listener which closed its connections

To fix this:
- `boundary connect  -target-id=xx -host-id=xx` command with no connections left will now wait for all connections to be closed and before exiting the session just like it did in `0.14.3`
- As soon as there are no more connections left, the listener will close to stop accepting new connections
- Fix issue where the websocket connection was throwing closing errors during the session teardown.
2024-02-09 18:15:00 -05:00
Louis Ruch d59f089819 feat(policies): Update SDK/API to support setting/clearing attributes (#4385) 2024-02-09 09:37:34 -08:00
f5dd457b34 Multiple grant scope IDs (#4251)
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
Co-authored-by: Todd <github@quaddi.com>
2024-01-23 14:33:09 -05:00
Jeff MitchellandJohan Brandhorst-Satzkorn fff5f9506f Migrate proxy logic to the API package (#4216)
This allows arbitrary programs to have an easy mechanism to make
connections through Boundary using Go. Internal cluster tests and test
helpers have been migrated to use this package, as well as the `connect`
command.

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-01-21 22:34:33 -05:00
Damian Debkowski 9e533912cd feat(api): session recording reapply storage policy 2024-01-16 13:53:44 -08:00
Louis Ruch f26243e9af feat(recording): Delete Session Recording 2024-01-16 13:53:44 -08:00
Hugo 0d71976437 feat(proto): Add RetainUntil and DeleteAfter timestamps on Session Recordings 2024-01-16 13:53:44 -08:00
Louis Ruch 45de26bfe9 feat(scope): Add API for Attach/Detach StoragePolicy to scope 2024-01-16 13:53:44 -08:00
Hugo c9f1c53693 feat(api): Policies 2024-01-16 13:53:44 -08:00
Damian Debkowski 50990d1b19 chore: generated files 2024-01-16 13:53:44 -08:00
Todd 2d18f82c9f Rename refresh token errors to list error (#4138) 2024-01-05 07:43:20 -08:00
Todd 9aab26e91b clientcache commands now can output curl strings (#4042) 2024-01-05 07:43:20 -08:00
Todd b71d134e06 Create Client and update Errors for client daemon commands (#4011)
* Create a client cache daemon client

* Fix error formatting for the client cache cmds
2024-01-05 07:43:20 -08:00
Todd b2fec2e4f0 Store and use refresh tokens in the client cache (#3857)
* Refresh resources using refresh tokens
2024-01-05 07:43:20 -08:00
Jim fba9d1cdf1 Add client daemon repo, server, and cmd
The commands added are:
boundary daemon start
boundary daemon stop
boundary daemon add-token
boundary daemon status
boundary search

If these actions are performed on a platform that doesn't support sqlite
natively in go an error is returned.

Besides some hooks into the cmd package all the significant logic
resides in internal/clientcache

feat (cmds/authenticate): output the token name when storing token

feat: update go-dbw which now uses pure go sqlite driver

refact (base.Command): export FlagOutputCurlString

Exporting FlagOutputCurlString allows other commands that embed
the base.Command to access the flag as needed

feat: add a cache Repository to manage cache storage

feat: add a "cache" CLI command

This new command will support both managing and searching the
local CLI cache daemon.

feat: start cache daemon as needed when issue CLI commands

Move files to new directories and add persona table (#3526)

* Add persona table and move files to new directories

Client daemon now uses unix sockets and update pathing (#3535)

* Add unix socket listen and dialers with file permissions applied

* Update the pathing to match RFC

Cache refreshing now uses all stored personas. (#3545)

Updating headers for LLB files

Decouple daemon and cache server (#3566)

* Separate daemon from server

* Add persona handler to daemon server (#3579)

Moved search to use mql and added tests for the search command (#3589)

* search uses hashicorp/mql

Windows support for client side daemon (#3618)

* exec.Command for background process

* Log to stderr when in foreground and file always

* Use pid files across platform for start and stop

Requests with version info must match the daemon's version (#3640)

* requests with version info must match daemons

Update dependencies and breakout cgo/pure go sqlite drivers  (#3657)

upgrade go-dbw deps and add cgo build tags

Enable graceful shutdown in windows (#3695)

* Enable graceful shutdown in windows

Co-authored-by: Jim <jlambert@hashicorp.com>

Targets delete when a persona changes address or user id (#3673)

* Handle cache refresh in repo

Add sessions to the client side cache (#3682)

* Add sessions to repository

* Search command supports sessions

* adding session related tests to db and refresh

Change cache schema from personas to tokens+users (#3737)

* Change from personas to tokens+users

* Separate keyring tokens from auth tokens

Add support for keyringless auth tokens (#3765)

* Add support for keyringless auth tokens

Remove expired auth tokens from cache (#3768)

* Remove expired auth tokens from cache

Complete the TODO of checking for inflight tx (#3779)

Delete tokens that the controller says are invalid (#3782)

fix search test with boundary token check (#3799)

Collect resource info in repository_<resource>s.go (#3769)

* Collect resource info in repository_<resource>s.go

* Move search logic into the domain (#3794)

Daemon and search restricted to supported platforms (#3801)

* Daemon and search restricted to supported platforms

Reorganize the clientcache packages (#3814)

* Refactor for self contained domain logic

* Put clientcache stuff under internal
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn acc048a1d1 internal/genapi: correct list response body and map
When using the new auto-pagination logic, we would previously return
the Body and Map of the last response, instead of one corresponding
to the returned result. Correct this by overwriting the Body and Map
after pagination has finished.
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 3b54611d14 api: update api listing
Change from refresh token to list token
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn ef3bdfd5eb api: add automatic list pagination
Updates all List endpoints to automatically paginate
through results to preserve backwards compatibility.
Adding support for user controllable pagination could
be considered at a later time.
2024-01-05 07:43:20 -08:00
Timothy Messier c70a6ff6ba chore: Bump to Go version 1.21.5
Go 1.21.5 fixes a few vulnerabilities. Most notably for boundary is a
fix in net/http to limit chunked data overhead.

See: https://groups.google.com/g/golang-announce/c/iLGK3x6yuNo
(cherry picked from commit 575cd9d63b1ac4787d048d86b0b209c61a7f3946)
2023-12-07 19:42:45 +00:00
Timothy Messier da5dd383ad feat(api): Use Retry-After header when retrying a request
If the api.Client receives a 429 or 503 along with a Retry-After header,
the client will automatically wait the amount of time specified, and
then re-try the request.
2023-12-04 18:07:01 +00:00