Commit Graph
4004 Commits
Author SHA1 Message Date
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 203ea57165 Target aliases added to changelog (#4357)
* Target aliases added to changelog
2024-02-29 15:52:26 -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
Michael Milton df35f85971 bump version and update changelog (#4471)
* bump version and update changelog
2024-02-29 18:16:53 -05:00
Dan Heath e83c5c17ef docs: Update 0.15.x release notes (#4460) 2024-02-29 09:40:01 -08:00
Dan Heath dbdc75c87e docs: Fix broken link in worker config topic (#4464) 2024-02-28 16:57:53 -05: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
Michael Li 2111e1a5cc doc(kms): Fix typo (#4449) 2024-02-23 16:31:36 -05:00
Michael Li fee2b99ade refact(e2e): Create vault-generic credential library helper method (#4437)
* refact(e2e): Create vault-generic credential library helper method

* fixup! refact(e2e): Create vault-generic credential library helper method
2024-02-23 15:46:11 -05:00
Timothy Messier 3856573eeb Merge pull request #4445 from hashicorp/llb-monthly-active-users
This adds support for tracking and reporting monthly active users for
the purpose of billing. It adds a new API endpoint,
`/v1/billing:monthly-active-users` and new cli command, `boundary
billing monthly-active-users` that can be used to view the monthly
active user counts.

This adds a new accumulating fact table to the data warehouse for auth
tokens. This fact table is used to calculate the number of active users
within a month, where an active user is a user that has at least one
issued auth token within the time range of the month.
2024-02-23 11:07:51 -05: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
Timothy Messier 03d1cc4572 feat(dw): Add auth token accumulating fact table 2024-02-23 15:44:08 +00:00
Timothy Messier 005f3d0843 chore(sqltest): Make it possible to enable/disable db container logs
When running the sqltests, sometimes it is helpful to see the full
database container logs, especially when there is an error in a
migration or database setup. However, it also makes it difficult to see
the test results.

This adds a new variable to the makefile to easily toggle the output of
these logs on or off. To run the tests without printing the dtabase logs
use:

    DB_LOGS=0 make test

To enable the logs use:

    DB_LOGS=1 make test

By default the logs are not printed.
2024-02-23 15:44:08 +00:00
Timothy Messier e51d0e0b4f feat(vault): Remove database notice when setting credential type
This notice just generated noise, particuarlly in some of the sqltests.
2024-02-23 15:44:08 +00:00
Timothy Messier 9d82958c9f test(sqltest): Shorten prepared statement identifiers
Some of the prepared statement identifies used in these tests exceeded
the identifier character limit. This results in postgres truncating the
name, which is fine for a test, but does result in some noise in the
test output. This change shortens the identifies to eliminate noise like
the following:

    psql:/test/credential/vault/credential_vault_library_ssh_private_key_mapping_override.sql:49: NOTICE:  identifier "insert_credential_vault_library_ssh_private_key_mapping_override" will be truncated to "insert_credential_vault_library_ssh_private_key_mapping_overrid"

The tests should no longer create notices like these.
2024-02-23 15:44:08 +00:00
Jeff Mitchell c3297bb96f Remove worker type from CLI output (#4396)
This does not currently remove the field from the message on the API but
since it will now always show `pki` it's meaningless and causing
confusion for some users.
2024-02-23 10:33:57 -05:00
Michael Li 694db71004 fix(e2e): Add extra buffer in -session-max-seconds test again (#4440) 2024-02-23 10:33:43 -05:00