Commit Graph
2937 Commits
Author SHA1 Message Date
Michael Milton 9ae2bdfae6 feat: license util config (#3248)
* feat: license util config

* address comments

* introduce census job

* add job

* fix import groups

* remove pointers
2023-05-30 18:20:49 -04:00
Jeff Mitchell 7bdbe8ab8e Update changelog (#3250) 2023-05-30 16:16:31 -04:00
Jeff Mitchell c149bc4a79 Allow slashes in authorize-session when using target name (#3249)
This requires specifying `**` as the selector in the proto, which will
match any segments and simply requires that the verb is the last part of
the URL, which it already is.
2023-05-30 16:03:27 -04:00
Jim 4d08c52afd feat (authenticate/oidc): support outputting auth url (#3247) 2023-05-30 12:04:05 -04:00
Jeff Mitchell 769a7c9e1c Remove cleanup calls for test controller/worker (#3245)
A previous commit added a call to t.Cleanup in the
NewTestController/NewTestWorker commands; as a result these statements
are no longer needed.
2023-05-26 14:57:32 -04:00
Dan Heath d49b7ae629 docs: Restructure table of contents (#3230)
* docs: Restructure table of contents

* docs: Copy edits to Develop/Get started sections

* docs: Add index to HCP Boundary section

* docs: Move OSS/Install section to top-level

* docs: Move Concepts above Configuration
2023-05-26 13:11:43 -04:00
Hugo dba7d88523 fix(handlers/scopes): Whitespace on Name and Description fields (#3235)
This commit fixes the behaviour of scopes where whitespace was allowed
(and thus persisted) in the Name and Description fields.

It also adds some more tests for scope Create and Updateto cover more
error cases.

For scope update, `handlers.ValidateUpdateRequest` exists, however this
was not used as it does not work properly for requests where the
`global` scope is updated.

In `ValidateUpdateRequest`, an ID check is performed and it assumes
there's always a resource prefix (eg: "p", "o") and an identifier
(random numbers and letters) after the prefix. This fails for `global`.
See `handlers.ValidId`.
2023-05-25 15:43:52 +01:00
Jeff Mitchell e8559d142a Fix worker auth rotation test (#3243)
Most of the changes here are changes or enhancements that are useful for
tests. The crux of the issue was that I had pulled up one var to the
package level so it could be read from tests, but that var was not being
reset between tests. It's not even used in tests anymore, so I put it
back to function-local.
2023-05-24 23:33:51 -04:00
ace2def49d Add daily sessions pending view and accompanying snapshot table (#3217)
* feat: add a new daily billing view

* update views and table based on early feedback

* address review comments

* update CTE to be an accurate result of what we expect

* remove 'with time zone' from daily range

* remove timezone

* Update internal/db/schema/migrations/oss/postgres/70/01_hcp_billing_daily.up.sql

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Timothy Messier <tim.messier@gmail.com>

* go mod updates

* fix tests

---------

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2023-05-24 15:52:34 -04:00
Jeff Mitchell d5ad1f078a Fix test timing (#3241) 2023-05-24 15:37:22 -04:00
Jeff Mitchell 5b98aecaba Bump deps (#3240)
These are deps either maintained by the Boundary team or approved by
members of the team. A few specific notes on some of the non-HC and
non-DB ones:

github.com/fatih/color: fixes some windows issues
github.com/zalando/go-keyring: fixes a windows crash
2023-05-24 14:36:17 -04:00
Jeff Mitchell c8f37ca4dc Perform mod tidy 2023-05-23 15:56:45 -04:00
Jeff Mitchell 5a7cbaa989 Bump gkw dep 2023-05-23 12:41:45 -04:00
Jeff Mitchell bec9e80586 Bump internal deps
These have been checked with the various owners to ensure they should be
fine.
2023-05-23 12:41:10 -04:00
Jeff Mitchell 4c024858c4 Bump nodeenrollment dep 2023-05-23 01:44:27 -04:00
Michael Li 357e835fa5 doc: Add missing copyright headers (#3238) 2023-05-22 11:49:27 -04:00
Jeff Mitchell e0787f4de0 Simplify worker auth rotation timing logic (#3237)
* Simplify worker auth rotation timing logic

* Add some jitter
2023-05-20 21:05:19 -04:00
Jeff Mitchell 6f4f51cc9f Fix display of next rotation time (#3236) 2023-05-20 08:25:16 -04:00
Jeff Mitchell 5716a30813 Update nodeenrollment to fix TLS issue; add debug (#3231)
* Add more logging to worker auth rotation and test flags

This makes it much easier to figure out when and why rotation is
happening and control it for tests/debugging.

* Update auth rotation logic

Because we were looking at validity period of client certs, which may
not have matched the actual rotation interval, it was possible (mostly
in test scenarios) for the rotation to happen multiple times on the
roots before we actually hit the worker rotation interval.

This changes how the interval is calculated by looking at the difference
between not-after values on the certs to understand the rotation
interval being used by the controller. We then use that as the starting
point for calculating a next-rotation time.
2023-05-19 17:18:26 -04:00
Jeff Mitchell 77fd51fb12 Add more logging to worker auth rotation and test flags
This makes it much easier to figure out when and why rotation is
happening and control it for tests/debugging.

Remove cert skew

Cherry-picked from release/0.12.x
2023-05-19 17:14:33 -04:00
Michael Li 253d191440 chore: Bump version of security scanner (#3234)
This mitigates the GitHub deprecation of set-output and node 12.
2023-05-19 12:06:10 -04:00
Haotian d4bcdd8a06 fix(cli): correctly print secrets in authorize-session for current vault credential source subtypes (#3218)
* updates authorize-session case statement with current vault credential source types
2023-05-18 09:54:23 -07:00
dependabot[bot] 48fb60adef chore(deps): bump slackapi/slack-github-action from 1.23.0 to 1.24.0 (#3233)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](https://github.com/slackapi/slack-github-action/compare/007b2c3c751a190b6f0f040e47ed024deaa72844...e28cf165c92ffef168d23c5c9000cffc8a25e117)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-18 09:51:02 -04:00
Jeff Mitchell 33ccb121c8 Bump nodeenrollment version 2023-05-17 17:33:02 -04:00
Michael Anthony 1a5b9cf5d9 Add enos bucket module (#3225) 2023-05-16 11:49:23 -06:00
Michael Li 615fa686c4 test(e2e): Add test that checks that session ends after deleting project (#3221)
* test(e2e): Add test that checks that session ends after deleting project

* CR: Update to create target with address

* CR: Rename method for clarification
2023-05-16 13:06:11 -04:00
Irena Rindos 6b00f69e58 chore: backport 0.12.2 release (#3220) 2023-05-15 13:05:18 -04:00
Timothy Messier d792cf4487 test(vault): Increase threshold for period assertion (#3216)
This allows for a greater delta between the period returned by vault and
they expected value to account for some delay due to load on the test
runners.
2023-05-11 08:46:59 -04:00
Josh Brand 5ac29eb2e5 feat(e2e): Add configurable timeout for go test execution within scenarios (#3213) 2023-05-09 14:55:19 -04:00
Irena Rindos 736cde3584 Update references to deprecated controllers field (#3212) 2023-05-09 13:51:42 -04:00
Chris van Meer 2c23848da5 Remove quotations when not needed (#3207) 2023-05-09 13:00:05 -04:00
Jeff Mitchell a6fe1a5815 Update gen templates for license/gen info (#3211) 2023-05-09 12:03:54 -04:00
Jeff Mitchell 869310d7da Only create WithAutomaticVersioning if versioning is used (#3210)
This option did not respect whether or not versioning was enabled when
writing it out during generation.

This does mean that there is a breaking change for auth tokens, but as
it was a no-op anyways it's easy to fix and not something I want to /v2
about.
2023-05-09 11:12:03 -04:00
Josh Brand 603c3c8c9c fix(e2e): Fix path to echo in connect_test & update scenarios for local builds (#3208) 2023-05-08 15:04:26 -04:00
Michael Li 6f6f4ade0a test(e2e): Modify port to avoid conflicts (#3205) 2023-05-05 14:33:37 -04:00
Jeff Mitchell 037dc0cf18 Add missing nil check in test 2023-05-05 11:56:28 -04:00
Jeff Mitchell f9f7ee2cc4 Fix build 2023-05-05 11:52:41 -04:00
Jeff Mitchell bbe9719e19 Add tracking of worker used for injection (#3204) 2023-05-05 09:22:54 -04:00
Josh Brand 8b8b665483 chore(e2e): Update CI user for testing (#3203) 2023-05-04 18:16:00 -04:00
Hugo 22ecf95449 docs: Explain -format json behaviour on boundary authenticate cmd (#3202) 2023-05-04 16:29:08 +01:00
Timothy Messier 7f7a5ac9c3 ci(test): Remove matrix for running tests per package (#3200)
The original motivation for the matrix was to mitigate an issue some
tests failing that used a vault docker container. When the tests ran in
a single step, these tests would almost always fail. By splitting the
tests per package, the failure rate of these tests was around 20%.

GitHub was able to identify the cause. There was an issue with localhost
resolution that causes requests to the vault containers to sometimes
fail, resulting in the kinds of failures that were seen. Note that the
same issue was not seen when accessing the test postgres database that
was running in a container, since the test code connects via 127.0.0.1,
while the vault container used localhost. This commit includes the
recommended fix so that localhost name resolution works as expected on
the GitHub hosted runners.

It also removes the test matrix since it is no longer needed as a work
around. In addition it seems advisable to remove the matrix given the
recent discovery that some tests were not running with the matrix. While
this was fixed, removing the matrix reduces the risk of any future
mistakes from the test splitting.

This also seems to result in a faster pipeline execution time. The
overhead to determine the matrix values, wait for a runner to be
available, and restore from the cache seems to add up to a longer
overall execution time.

Eliminating the matrix can also help with another type of failure seen.
Sometimes restoring from the cache fails. By eliminating the test
matrix, it will greatly reduce the number of cache restoring done by the
workflow, which will reduce the chances of an issue restoring from
cache.

The only remaining benefit from the matrix, was that if there was a
transient test failure, a re-run of only the failed jobs would be
relatively quick (depending on which package had the failure), while
without the matrix the entire test suite will need to be re-run.

See: https://github.com/hashicorp/boundary/pull/3199
Refs:
    86214a85e1
    e04438b7f8
2023-05-03 14:18:13 -04:00
Elim Tsiagbey a2f8d87bfb Add support for setting, adding & deleting LDAP account assoicated to a user (#3198) 2023-05-03 09:45:29 -04:00
Johan Brandhorst-Satzkorn e04438b7f8 authmethods: fix test broken by LDAP
These tests were never updated for LDAP
2023-05-02 18:00:24 -07:00
Johan Brandhorst-Satzkorn c503fca894 .github: fix test matrix script
The test matrix script was excluding directories that
only contained external package tests (i.e. tests packages
with _test suffix). The following tests were not being run:

    ./internal/daemon/controller/common/scopeids
    ./internal/daemon/controller/handlers/authtokens
    ./internal/daemon/controller/handlers/groups
    ./internal/daemon/controller/handlers/host_catalogs
    ./internal/daemon/controller/handlers/host_sets
    ./internal/daemon/controller/handlers/hosts
    ./internal/daemon/controller/handlers/roles
    ./internal/daemon/controller/handlers/scopes
    ./internal/daemon/controller/handlers/sessions
    ./internal/daemon/controller/handlers/targets/tcp
    ./internal/daemon/controller/handlers/users
    ./internal/db/schema/internal/edition
    ./internal/db/schema/internal/provider
    ./internal/db/schema/migrations/oss
    ./internal/scheduler/cleaner
    ./internal/tests/api/accounts
    ./internal/tests/api/authmethods
    ./internal/tests/api/authtokens
    ./internal/tests/api/credentiallibraries
    ./internal/tests/api/credentials
    ./internal/tests/api/credentialstores
    ./internal/tests/api/groups
    ./internal/tests/api/hostcatalogs
    ./internal/tests/api/hosts
    ./internal/tests/api/hostsets
    ./internal/tests/api/managedgroups
    ./internal/tests/api/roles
    ./internal/tests/api/scopes
    ./internal/tests/api/sessions
    ./internal/tests/api/targets
    ./internal/tests/api/users
    ./internal/tests/api/workers
    ./internal/util
    ./testing/dbtest
    ./testing/internal/e2e/tests/aws
    ./testing/internal/e2e/tests/database
    ./testing/internal/e2e/tests/static
    ./testing/internal/e2e/tests/static_with_vault
2023-05-02 17:34:39 -07:00
cc94accc4f SEC-090: Automated trusted workflow pinning (2023-04-27) (#3187)
* Result of tsccr-helper -pin-all-workflows .

* chore: Disable cache from setup-go

---------

Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Michael Li <michael.li@hashicorp.com>
2023-05-02 16:37:11 -04:00
XingLu Wang 9d50db4c44 doc: Fix typo (#3185) 2023-05-02 16:36:20 -04:00
Haotian 762e0d7d0d fix(sql): move added file to correct folder (#3197)
* move rename_constraints.up.sql from 67 to 69

* update sql replacement reference comments
2023-05-01 13:16:10 -07:00
Haotian b806297afe style(db): rename constraint names to follow sql style guide (#2973)
* programatically rename unique and foreign key constraints to enforce 'tablename_uq' and 'reftable_fkey' patterns

* manually rename unique constraints for names over 63 characters

* update changed constraint names in db update testcases
2023-05-01 12:40:10 -07:00
Jim b974063a52 chore (boundary/dev): remove typo (#3194) 2023-05-01 15:12:17 -04:00
Jeff Mitchell c6d7dc01a0 Exit before filtering if no workers are listed (#3196)
This is just an early error message to avoid running the filtering
function if there are no workers to begin with.
2023-05-01 14:20:27 -04:00