Commit Graph
2454 Commits
Author SHA1 Message Date
Irena Rindos 5a93a7e9a2 chore(cmd): fix initial alias doc (#4484) 2024-03-05 17:49:27 -05:00
Todd f7631edcab rename target2 import alias to talias (#4482) 2024-03-05 07:41:38 -08:00
Michael Li 18aa96fc61 chore: This bumps the UI commit to the version released in 0.15.1 (#4476) 2024-03-05 10:33:17 -05:00
Todd d5ae3d8dc6 fixup! Add aliases to the client cache daemon and make them searchable (#4418) 2024-02-29 15:52:27 -08:00
Todd 4bd38037b3 fixup! Create the alias service and resource (#4276) 2024-02-29 15:52:27 -08:00
Todd 240f86f0a9 fixup! Resolve aliases prior to subtype attribute transforming interceptor (#4379) 2024-02-29 15:52:27 -08:00
Todd ce250cbc57 fixup! Create the alias service and resource (#4276) 2024-02-29 15:52:27 -08:00
Todd deab1d5f17 fixup! Create the alias service and resource (#4276) 2024-02-29 15:52:27 -08:00
Todd a2ea1f8f90 Add aliases to the client cache daemon and make them searchable (#4418)
* Add aliases to the client cache daemon and make them searchable
2024-02-29 15:52:27 -08:00
Irena Rindos cedff227c3 dev: use URL for web target and add caveat (#4454) 2024-02-29 15:52:27 -08:00
ToddandIrena Rindos c8ca773f9f Add boundary connect alias bats tests (#4441)
* Add boundary connect alias bats tests

Adding tests that validate the authorize-session requests when a host-id is provided when an alias is used, both configured and not configured with a host id already.

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
2024-02-29 15:52:27 -08:00
Irena Rindos e80e9a6da5 feat(dev): create initial alias targets for boundary dev (#4433)
* feat(dev): create initial alias targets for boundary dev
2024-02-29 15:52:27 -08:00
Irena Rindos 48d958e395 fix(aliases): check target alias host id on create and update (#4435)
* fix(aliases): check target alias host id on create and update
2024-02-29 15:52:27 -08:00
Irena Rindos 0429ac678f fix(bats): use different target name in alias tests (#4430) 2024-02-29 15:52:27 -08:00
Todd 24a2089db8 Add aliases to table format output for target reads (#4416) 2024-02-29 15:52:27 -08: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
Irena Rindos ba21e076bb cli(aliases): Support aliases for connect and targets in the CLI (#4356)
* cli(aliases): Support aliases for boundary connect and boundary targets CLI
2024-02-29 15:52:27 -08:00
Todd 5a17c9cd39 Resolve aliases prior to subtype attribute transforming interceptor (#4379)
* Resolve aliases prior to subtype interceptor
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
Irena Rindos eceb1fd40e api(targets): add aliases to targets (#4337)
* api(targets): add aliases to targets
2024-02-29 15:51:24 -08:00
Irena Rindos 96d1f094a3 repo(targets): Add aliases to targets (#4336)
* repo(targets): Add aliases to targets
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
Todd e848e76b48 Create Alias Domain Object and Repo (#4275)
* Create alias domain object resource

* Add paginated listing

* fixing ratelimit related panics

* Address reviewer comments

* remove NewAlias value checks
2024-02-29 15:51:24 -08:00
ToddandIrena Rindos 7e2038bfcc Add alias schema changes (#4230)
* Adding alias resource

* Update website/content/docs/install-boundary/system-requirements.mdx

---------

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
2024-02-29 15:51:24 -08:00
Todd 53c95e1775 Extract out the setup of workers and targets to handle ent specific configurations (#4461) 2024-02-28 08:52:11 -08:00
Timothy Messier 4b0e7ab5a3 chore(authtoken): Fix lint errors in tests 2024-02-23 16:06:36 +00:00
Michael Milton 2e69d59dd2 feat(billing): Add cli subcommand for monthly active user counts 2024-02-23 15:44:10 +00:00
Timothy Messier 111dc87ead feat(billing): Fix end time comparision for all view 2024-02-23 15:44:10 +00:00
Timothy Messier e6c3795f91 refact(db): Renumber migrations for billing 2024-02-23 15:44:10 +00:00
Timothy Messier edfd8b5f54 feat(billing): Support -/+ infinity
This updates the billing repository to use timestmap.Timestamp when
constructing the queries to retrieve monthly active users. This allows
for specifying NegativeInfinity to easily retrieve all monthly active
user counts.
2024-02-23 15:44:10 +00:00
Timothy Messier 0f765e7149 feat(timestamp): Support -/+infinity for Valuer
When converting a timestamp.Timestamp for use in SQL, this now correctly
converts the NegativeInfinity and PositiveInfinity constants into the
corresponding `-infinity` and `infinity` SQL constants.
2024-02-23 15:44:10 +00:00
Timothy Messier e09bf09a95 refact(billing): Use sql functions instead of views
These functions will ensure that UTC time is used for billing queries,
eliminating the need for the repository to set the timezone. This also
means the repository no longern needs a writer.
2024-02-23 15:44:09 +00:00
Timothy Messier 7c14e42897 refact(census): Make emitting events stateful for a census job 2024-02-23 15:44:09 +00:00
Timothy Messier a4b34f67c8 feat(census): Add support for multiple metrics 2024-02-23 15:44:09 +00:00
Timothy Messier 5405a275ab feat(census): Update census tables to support additional metrics 2024-02-23 15:44:09 +00:00
Timothy Messier 5aafe66c3c test(ratelimit): Update tests due to new endpoint 2024-02-23 15:44:09 +00:00
Michael Milton 280e9abb89 feat(billing): Add service handlers for monthly active user counts 2024-02-23 15:44:09 +00:00
Timothy Messier d84eb01516 feat(billing): Add sql functions for monthly active user counts
This adds two sql functions that can be used to access the views to
retrieve monthly active user counts. The functions ensure that any time
calculates are performed in UTC, so that the month bounds align with the
start of the month in UTC.

1. hcp_billing_monthly_active_users_last_2_months() will return monthly
   active users for the current and previous month.
2. hcp_billing_monthly_active_users_all() will return monthly active
   users for all months. This function can also be provided a start time
   and or end time to filter the results to a specific range.
2024-02-23 15:44:09 +00:00
Michael Milton 7d5c3e48cd feat(billing): Add domain level package for monthly active user counts 2024-02-23 15:44:09 +00:00
Timothy Messier 324c474f5d feat(billing): Add views for monthly active user counts 2024-02-23 15:44:09 +00:00
Timothy Messier f3caf21979 test(authtoken): Associate test account with a user
This test started failing now that the data warehouse records a auth
token fact when an auth token is issued and it requires that the auth
token has a user associated with it.

Since this test is testing the interaction with the database directly,
and not via the repository, it by-passes the application checks that
would prevent an auth token without an associated user being inserted.

This test is updated to meet this same pre-condition prior to attempting
to insert into the database.
2024-02-23 15:44:09 +00:00
Timothy Messier bbb43e20a0 test(sqltest): Remove impossible assertion
Now that there is an auth token fact table in the data warehouse, it is
not possible to insert an auth_token with an old public_id even after
that auth_token was deleted, since it now causes a constraint violation
on the data warehouse table.
2024-02-23 15:44:09 +00:00
Timothy Messier 9514a76289 test(sqltest): Fix tests due to new auth_token insert trigger
With the addition of an after insert trigger to the auth_token table,
entries are added to the wh_user_dimension table when auth token's are
inserted with the 'token issued' status. This caused a number of tests
to fail that assumed the user dimension table would be empty prior to
inserting sessions. This introduces a number of changes to the tests:

- In the test setup, auth tokens are not created with an explicit
  expiration time and status. The expiration time ensures that the
  tokens are 'valid' for the test. The status allows test to make
  assertions on tokens in different statuses, and allow the status to
  change during the test.
- Tests make the correct assertions on the number of entries in the user
  dimension table after test setup.
- User dimension tests modify a user after the standard setup to ensure
  that a new user dimension is added when a session is inserted.
2024-02-23 15:44:08 +00:00
Timothy Messier 9e0d96b887 feat(dw): Update auth token fact when auth token is deleted
This adds a function and after delete trigger to the auth_token table to
ensure that a corresponding auth token fact is updated with the deleted
time and sets the auth token valid time range. The data warehouse will
only be updated if the token that was deleted is in the 'token issued'
status.
2024-02-23 15:44:08 +00:00
Timothy Messier b938dd6706 feat(dw): Insert/update auth token fact when auth token updated
This adds a function and update trigger to auth_token to ensure that:

1. If the auth token is updated to the issued state, a auth token fact
   is added to the warehouse.
2. If the auth token's approximate last access time is updated, the
   corresponding auth token fact is updated with the new time.
2024-02-23 15:44:08 +00:00
Timothy Messier 585b344da6 feat(auth_token): Set approximate_last_access_time when token is issued 2024-02-23 15:44:08 +00:00
Timothy Messier 07b3a7a19e feat(dw): Add auth token fact after inserting issued auth token
This adds a trigger and function to ensure that an auth token fact is
created when a new auth token is created with the 'token issued' status.
2024-02-23 15:44:08 +00:00
Timothy Messier eb626bb54c refact(wh): Use auth token id for user dimension
Previously the function used to upsert into the user dimension required
both an auth token id, and a user id. However, the user id can be
determined from the auth token, in fact it already was via the
whx_user_dimension_source view. This refactor removes the user id as an
argument, since it is not needed and will not be directly available when
this function is used when populating the new auth token accumulating
fact.
2024-02-23 15:44:08 +00:00