Commit Graph
306 Commits
Author SHA1 Message Date
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
Damian Debkowski 3394d3e13a chore: update go mod and dependencies (#4073) 2023-11-30 11:45:00 -08:00
Elim Tsiagbey 8b8d2822df feat(oidc): OIDC Prompt (#4053)
Boundary OIDC method does not currently support passing in prompts during authentication. This change adds the capability of passing OIDC prompts. Prompts are optional OIDC parameters that determine the behaviour of the authentication server: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

## Changes

- New `auth_oidc_prompt` table which contains all the prompts for OIDC auth method
- New `auth_oidc_prompt_enm` table which contains possible enum values for a prompt
  - Currently supported:
    - `none`: 
The Authorization Server MUST NOT display any authentication or consent user interface pages
    - `login`: The Authorization Server SHOULD prompt the End-User for reauthentication
    - `consent`: The Authorization Server SHOULD prompt the End-User for consent before returning information to the Client
    - `select_account`: The Authorization Server SHOULD prompt the End-User to select a user account
- `oidc_auth_method_with_value_obj` view has been updated to return `prompt` value
- Add `prompt` option for OIDC auth method CLI create and update
- Pass configured prompt during OIDC authentication
- Add `prompt` API validation for create and update
2023-11-21 11:30:02 -05:00
Jeff Mitchell cb1386932d Use sdk wspb library and remove internal (#4025) 2023-11-08 14:02:58 -05:00
Jeff Mitchell 34b558fdc0 Update api deps (#3970) 2023-11-01 14:17:45 -04:00
dani c89777de41 Expose Valid Principals for Vault SSH Signed Certs (#3791)
* allow additional valid principals when creating vault ssh signed cert cred lib

* add additional_valid_principals field to credential libraries documentation page
2023-10-24 12:44:51 -04:00
Jeff MitchellandJohan Brandhorst-Satzkorn fb4a5a98dc Add some target fields and move some things around (#3879)
In preparation for putting proxy code in the api package this creates some necessary fields in the target output and it pre-moves credential parsing and proxy handshake code to their new places. This will make the diff for the actual proxy code move quite a bit smaller.

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-10-22 20:48:54 -04:00
Jeff Mitchell eb20b80c71 Migrate some credential bits around (#3864) 2023-10-18 17:48:44 -04:00
daniandDanielle Miu a7c1876d7b remove deprecated option application-credential-source (#3728)
Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
2023-09-22 15:58:18 -04:00
Jim dc89ca28a1 feat: add API support for additional LDAP auth method fields. (#3679)
* feat (auth/ldap): add Repo support for max page size and deref aliases (#3670)

* chore: update cap/ldap dependency

This latest version of cap/ldap adds support for MaxPageSize and
DerefAliases

* feat (auth/ldap): add MaxPageSize and DerefAliases to storage proto

* feat (api/authmethods): add new ldap fields.

Add support for maximum_page_size and dereference_aliases

* feat (auth/ldap): schema changes to support new LDAP attributes

* feat (auth/ldap): add Repo support for max page size and deref aliases

* feat (handlers/ldap): add support for new fields (#3674)

Added API support for new ldap fields: MaximumPageSize and
DereferenceAliases

* chore: add CHANGELOG entry for new api auth ldap fields
2023-09-06 15:07:45 -04:00
Johan Brandhorst-Satzkorn e108ae40ad Upgrade to Go 1.21 (#3573)
* Upgrade to Go 1.21

* event: remove tests depending on pointer comparison

The test now just tests that the logger is non-nil. For
some reason the old test was broken by upgrading
to Go 1.21.0.

* api: use dummy Host header for unix sockets

When using unix sockets with the net/http.Client,
we cannot use the unix socket address directly
in the Host header, as it fails the validation step.
Instead, use a dummy address in the Host header.
2023-08-15 12:04:58 -07:00
hashicorp-copywrite[bot]andJohan Brandhorst-Satzkorn 29da0bcb92 [COMPLIANCE] License changes (#3567)
* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Adding explicit MPL license for sub-package

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Updating the license from MPL to Business Source License

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl.

* Update copyright file headers to BUS-1.1

* Rerun make gen

This will pick up the last of the license changes

* Revert "Rerun make gen"

This reverts commit dbe0968bffd92745d8663c6940debae098395a6b.

* Remove copywrite from generation script

The current version of copywrite is not sophisticated enough
to only apply the copywrite changes to certain subdirectories,
so to avoid accidentally relicensing our api and sdk modules,
we will stop running the copywrite script until such time
that it can do the right thing.

* License protobuf API as MPL

The protobuf API files are used to generate the SDK,
since we want the SDK to be MPL, the protobuf files
must also be MPL. This extends to all protobuf files
whose sources end up in the SDK directory, including:

- internal/proto/controller/api
- internal/proto/controller/custom_options
- internal/proto/plugin

It also includes the generated service directory in
internal/gen/controller/api/services, since they are
generated from the protobuf sources used for the SDK.

* Change website license file name

This makes the naming scheme consistent with the rest
of the repository.

* Add note on licensing to README

* Set copywrite license to BUSL

* Revert "Add note on licensing to README"

This reverts commit 4d865a91a7a4f11605f0dc4609355d7e3c3cfffe.

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-08-11 10:31:53 -07:00
Todd 8d9222bec3 Add credential and libraries to session recording resource (#3374) 2023-06-28 09:55:29 -07:00
Johan Brandhorst-Satzkorn 9474b373b8 api: remove create from auth-tokens help (#3341)
The auth-tokens help command included a reference to
a non-existent auth-tokens create command. Replace the
default help and also add a helpful pointer to the authenticate
command.
2023-06-20 13:17:43 -07:00
Jeff Mitchell feb3aea38f Support multiple IDs in grants (#3263)
This allows specifying multiple IDs in grants via an `ids` field, which
will eventually become the normal way to specify IDs. Internally, each
grant with multiple IDs turns into multiple ACL grants each with a
single ID; to make this distinction clearer and allow for better
separation of concerns an AclGrant type has been introduced, so really
multiple IDs in a Grant turn into multiple AclGrants.

The nice thing about doing it this way is that it becomes purely a
parsing concern; no actual validation logic has changed.

For backwards compatibility with grants already stored in roles, we do
not error out if `id` is specified. However, eventually we will simply
not support grants with `id` coming via the API; they will fail API
validation, such that new grants will require the use of the updated
`ids` field.

A follow-on PR will plumb this through the service handlers/API/CLI, but
I decided to do it in separate chunks to make reviewing easier, given
that they are easily separable into the internal and external aspects of
the change.

* Add CLI/API checks around using ID in grants (#3264)

* Plumb through some contexts to remove a lot of deprecated errors (#3268)
2023-06-14 21:55:24 -04:00
Johan Brandhorst-Satzkorn ebcd6d2828 api: remove connection ID (#3298)
Removing this until we figure out why it's sometimes missing.
May add it back again later.
2023-06-08 09:15:12 -07:00
Johan Brandhorst-Satzkorn 610df9892b all: propagate more history metadata (#3279)
A few target and host properties were missed when reading historical
data from the history tables.
2023-06-05 10:19:11 -07:00
Todd 2359d5b7a5 remove filter flags and options for session recordings 2023-05-31 12:18:23 +00:00
Todd d1a5f3a2ff Update attribute fields to be proto struct so generated api becomes map[string]any 2023-05-31 12:18:22 +00:00