Commit Graph
2906 Commits
Author SHA1 Message Date
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
Jim af1092e8e8 feat (boundary/dev): add connection info for dev ldap server when running via boundary dev (#3193)
* chore (dev/ldap): update gldap dependency

This update fixes the dup entries returned when searching for users
and/or groups

* feat (boundary/dev): add connection info for dev ldap server
2023-05-01 13:03:58 -04:00
Jim 667ea285be feature (boundary dev): add support for dev ldap auth method (#3192) 2023-04-28 11:35:54 -04:00
Josh Brand 9a050ec15a chore(e2e): Update test attributes for new builds (#3189) 2023-04-27 14:59:46 -04:00
Michael Li b88050a4c4 test(e2e): Fix assertion statement (#3190) 2023-04-27 13:35:52 -04:00
Hugo 5f45fb620b fix(perms): Tests use action.List in resource action set (#3188)
`action.List` is a collection action, that is, it is not part of the set
of actions that can be executed against a single instance of any given
resource.

As part of the `ListPermissions` call, `idActions` is expected, that is,
all the actions that can be executed against a resource instance.
`action.List` will never be part of this. This commit updates the tests
to reflect this fact.
2023-04-27 17:48:11 +01:00
Jeff Mitchell d28ea130ee Fix ListPermissions when separate id/type grants are used (#3183)
This makes two changes:

1. ListPermissions assumed every grant string had a type field, which
   does not match all grant formats. It now infers type from ID for
   formats which do not specify type.

2. Allow ID-only grant strings to be valid so long as the type specified
   matches the type of the specified ID.
2023-04-27 10:37:07 -04:00
Jeff Mitchell c4b987849b Bump go-bexpr dep to v0.1.12 (#3186)
This normalizes behavior around missing map keys. See
https://github.com/hashicorp/go-bexpr/pull/38 for more information.
2023-04-26 17:08:30 -04:00
Michael Li 6cdf9154a5 chore: Rename workflow file (#3184) 2023-04-26 12:34:27 -04:00
Michael Li cecc959a94 test(e2e): Clean up user if test fails (#3180) 2023-04-25 09:47:08 -04:00
Michael Li 33f3a5ff9c test(e2e): Add test that uses new worker resource (#3177) 2023-04-24 16:58:39 -04:00
Zhihe Li 98a6318760 Bump UI commit (#3178) 2023-04-24 11:28:36 -04:00
Jeff Mitchell 413ec67ace Fix description of port to not be optional 2023-04-21 12:40:17 -04:00
Jeff Mitchell bc47a60f2f Update sdk dep 2023-04-21 10:38:35 -04:00
Jeff Mitchell 8ae839f9ee Update api dep 2023-04-21 10:04:17 -04:00
Jeff Mitchell e7bf134710 Enhance tcp client port vet logic (#3175) 2023-04-21 09:34:59 -04:00
Jeff Mitchell 20391e3503 Add default client port to targets and use in connect command (#2767) 2023-04-21 06:50:53 -04:00
Dan Heath 6db6cc18e2 docs: Credential management documentation (#3147)
* docs: Create credential management documentation

* docs: Copy edits

* docs: Update graphics

* docs: Additional copy edits

* docs: Fix typos

* docs: Reduce size of graphics

* docs: Fix pixel density in brokering graphic

* docs: Increase size of graphics

* docs: Fix pixel density in brokering graphic

* docs: Fix issue with brokering image size

* docs: Adjust cred brokering image width

* docs: Adjust width of brokering graphic

* docs: Specify width for gifs

* docs: Undo width settings on gifs

* docs: Test brokering gif at 75%

* doc: Test resized images in preview deployment

* docs: Resize gifs smaller

* docs: Resize gifs a bit larger

* doc: Cleanup extra graphics, test zoomable link

* docs: Test gif loop with original

* docs: Update gif with loop, fix legacy link

* docs: Clean up file names, add updated graphics

* docs: Increase size of terminal gif

* docs: Update terminal graphic

* docs: Update with larger terminal graphic

* docs: Move large graphics to DatoCMS
2023-04-20 16:11:37 -04:00
Jim 40d888c7f2 fix (test): update how we determine when/if a test is running. (#3169) 2023-04-20 08:34:43 -04:00
Michael Li d25f4493d3 test(e2e): Improve reliability of enos docker scenario (#3167) 2023-04-19 17:03:38 -04:00
Damian Debkowski c5b1b7bbc7 fix(handler): return human readable error for json cred w/ empty object (#3109)
* fix(handler): return human readable error for json cred w/ empty object

* fix(handler): sync error messages for create/update json cred

* fix(handler): sync error logic for create/update json cred
2023-04-19 10:17:07 -07:00
Stan Ryzhov 5e9ffd57d4 test(e2e): add test to verify user is logged out on its auth-token deletion (#3160) 2023-04-17 22:16:55 -04:00
Hugo a69e963c87 chore: Update host plugins to the latest versions (#3164) 2023-04-17 17:40:04 +01:00
Jim a4f54cb98f refactor (events): QOL fix: turn off events for tests. (#3163) 2023-04-14 20:01:14 -04:00
dependabot[bot] 8c265bf7c1 chore(deps): bump actions/cache from 3.2.6 to 3.3.1 (#3131)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.6 to 3.3.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/69d9d449aced6a2ede0bc19182fadc3a0a42d2b0...88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8)

---
updated-dependencies:
- dependency-name: actions/cache
  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-04-14 14:43:21 -04:00
Michael AnthonyandJosh Brand 073f8fe98e [QT-405] Create solo worker module (#3148)
* Create solo worker module

---------

Co-authored-by: Josh Brand <jbrand@hashicorp.com>
2023-04-12 14:21:23 -06:00
Michael Li 8c5464802d chore: Add write permission to milestone checker (#3155) 2023-04-10 08:46:49 -04:00
Michael Li f816611dd0 chore: Update milestone-checker to use newer version of node (#3154) 2023-04-07 14:36:35 -04:00
Michael Li 29c268d5ac chore: Fix issues detected by GitHub actions linter (#3139) 2023-04-07 12:05:05 -04:00
Stan Ryzhov c675dc07ec test(e2e): Verify different credentials are brokered to target (#3149)
* test(e2e): Verify json credentials are brokered back

* test(e2e): Get expected json credentials from file

* test(e2e): Check private key credentials are brokered to target

* test(e2e): Regenerate test .pem file for every test
2023-04-05 19:42:46 -04:00
Johan Brandhorst-Satzkorn c1a61b9e34 internal/tests/cluster: switch flaky test to polling (#3153)
* internal/tests/cluster: switch flaky test to polling

Also extend deadline from 10 seconds to 1 minute, hopefully
this should fix any flakiness in this test.

* fixup! internal/tests/cluster: switch flaky test to polling
2023-04-05 18:45:52 -04:00
Johan Brandhorst-Satzkorn ecdb77b584 internal/db/sqltest: fix sessions aggregate (#3152)
The sessions aggregate was inserting host_id and host_set_id,
columns which are no longer present on the session table. Also
fix the test that guards against regressions like this in the future.
2023-04-05 12:57:25 -04:00