Commit Graph
132 Commits
Author SHA1 Message Date
Timothy Messier 2ade7f34a8 feat(users): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier 006fa3a85a feat(session): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier 38a3960047 feat(role): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier 6ad9aba505 feat(credentialstore): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier 00e57b20a2 feat(credentiallibrary): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier 95315a3e0a feat(groups): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Timothy Messier e2eca03d26 feat(managedgroups): Classify resources for audit events 2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn fc6cddfc7f feat(authtokens): Add classification to all fields (#1996) 2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn d51ce41db8 feat(hostsets): Classify all proto fields 2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn 8fa3e8dee0 feat(hostcatalogs): Classify all proto fields 2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn 5440195cce feat(hosts): Classify host proto fields 2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn 6e6efeee71 feat(account): Add gotags classification
Add gotag classification to all account proto and service definitions.
2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn b1d6a1da9a Switch to buf for protobuf generation (#1944)
* Install buf with go install

This reduces the impact of using buf on our dependency
closure, which was significant. It also avoids potential
issues with building buf given our own internal dependency
constraints. This has caused issues (including crashes!)
in the past.

See https://github.com/cockroachdb/cockroach/issues/67216#issuecomment-874176186
for more discussion on using tool dependencies generally, and
https://github.com/bufbuild/buf/issues/52
for an example of where this sort of thing caused an issue for a user.

* Upgrade buf version

We should migrate to v1 sooner rather than later, as it has some
breaking changes from v0.

* Change buf lint/breaking commands

These commands were moved up one level for v1

* Migrate to buf.yaml to v1

* Remove unused imports

These were uncovered by using "buf lint".

* Use buf v1.3.1

* Depend on googleapis and grpc-gateway via BSR

* Switch to buf for proto generation

* Remove third party dependency

* Remove unused tools and scripts

* Move local protos up one level

* Temporarily don't fail on breaking changes

* Generate CI config

* Fix generation of controller.json

* Replace use of deprecated flag

* Remove unused import, regenerate files

* Remove temporary skipping over breaking check
2022-04-04 13:55:42 -04:00
Johan Brandhorst-Satzkorn 121a296a7f Refactor file formatting target (#1951)
Use the standard Go heuristic for determining
whether a file should be ignored by formatting
for being a generated file.

This is effectively a no-op change today, but
if we add new generated files in the future,
we should automatically ignore them in formatting.

This is a slightly updated version of #1941 that should
work across all versions of grep.
2022-03-29 15:37:25 -04:00
Johan Brandhorst-Satzkorn 63d3481031 Revert "Refactor file formatting target (#1941)" (#1949)
This reverts commit 9029720664. It
was causing unexpected errors on some platforms. More investigation
will be necessary.
2022-03-25 17:54:02 -04:00
Johan Brandhorst-Satzkorn 9029720664 Refactor file formatting target (#1941)
Use the standard Go heuristic for determining
whether a file should be ignored by formatting
for being a generated file.

This is effectively a no-op change today, but
if we add new generated files in the future,
we should automatically ignore them in formatting.
2022-03-25 13:20:10 -04:00
Jeff Mitchell af1fafab64 Speed up all make targets by only finding generated files when we need to (#1937) 2022-03-21 13:26:01 -04:00
Jeff Mitchell 7eb29261b2 Update to go-kms-wrapping version 2, and plugin-based KMS (#1901) 2022-03-16 17:04:07 -04:00
Timothy Messier 761acd37b8 fix(makefile): Update docker-build-dev to use correct target
When the make targets where updated to switch from `make dev` to
`make build`, the dependency for the `docker-build-dev` target was not
updated.

See: b53e4d4c3e
2022-03-11 13:55:23 -05:00
Jeff Mitchell b53e4d4c3e Update make targets: (#1900)
* Update make targets:

* `make dev` now shows a message indicating the new commands
* `make build` builds the binary into bin/
* `make install` will subsequently `mv` (not copy) the binary into
  GOPATH/bin

The reason for the `mv` is that M1 Macs seem to get pretty unhappy about
executing a copied binary if it's been modified, so an initial binary is
fine, then after changing and recompiling the command keeps getting
killed.

* Make the 'make install' text more clear
2022-03-09 16:20:44 -05:00
84f6cc698c Onboard Boundary to CRT (#1786)
Onboard Boundary to Common Release Tooling

Co-authored-by: mdrake <mdrake@hashicorp.com>
Co-authored-by: jeanneryan <jeanneryan@hashicorp.com>
2022-02-01 07:41:27 -08:00
Louis Ruch 221acff4cc chore(release): Bump Boundary version to 0.7.4 2022-01-13 14:22:47 -08:00
Timothy Messier 36664d433b chore(makefile): Fix docker-build-dev target
This target is updated to set GOOS and GOARCH instead of XC_OSARCH since
the build script was updated to use these environment variables for
cross-compiling.

See: 1c8e0ed1e1
2022-01-13 08:54:50 -05:00
Timothy Messier 0a4df95fdd ci: Run sdk and api tests in ci
This adds new makefile targets and configuration to run the tests in the
api and sdk modules. These do not run by default since `go test ./...`
does not cross module boundaries.
2021-12-02 07:27:54 -05:00
Timothy Messier 0bc9e30aa6 chore(makefile): Mark all phony targets as PHONY
Some phony targets where not included in the single .PHONY line, this
switches to marking targets as PHONY just before the target is defined,
which makes it easier to ensure the targets are correctly marked as
phony.
2021-12-01 16:49:42 -05:00
Jeff Mitchell bc27190474 Prep for 0.7.1 2021-11-18 20:22:01 -05:00
Louis Ruch 384120fd7d chore: bump to version 0.7.0 2021-11-16 17:29:39 -08:00
Todd Knight 884e1f2d18 Merge branch 'main' into plugin-hostcatalogs
# Conflicts:
#	go.mod
#	sdk/go.mod
2021-11-12 08:55:17 -07:00
Jim 048fceaf54 feature (workers): Add audit events for worker requests (#1681)
* feature (audit events): Add interceptor for auditing worker requests

* feature (events): Add default deny filter for worker status events

* feature (worker audit events): Add tags to SessionService req/resp
2021-11-09 11:43:41 -05:00
Jeff Mitchell 48ac8b8f0b Merge branch 'main' into plugin-hostcatalogs 2021-11-07 18:47:28 -05:00
Jim f63ca1313c feature (kms/audit): Add base audit key type (#1651)
* feature (db): Add the ability to enable debug output for a connection

* refactor: Use scope.Global instead of "global"

* feature (db/migrations): Add kms audit keys

Add schema changes to support a new DEK for audit crypto operations.

* feature (kms/audit): Add audit key type

All the bits required to define a new DEK concrete type for
operating on audit entries.

* refactor (db): Remove deprecated migration unit tests.

We added a new audit DEK to kms.CreateKeysTx(...).  Unfortunately,
unit tests like TestMigrations_UserDimension,
Test_PrimaryAuthMethodChanges and TestMigrations_CredentialDimension
have an indirect dependency on a specific historical set of DEKs via
an indirect call kms.CreateKeysTx.  This of course fails because the
new DEK's tables is not a part of pinned migration versions that these
tests depend on.
2021-11-04 09:34:01 -04:00
Jeff Mitchell 80d41b9044 Merge branch 'main' into plugin-hostcatalogs 2021-11-04 09:02:39 -04:00
Timothy Messier 2cc58ff901 refact(target): Change repository to take CredentialLibraries
This change removes the hard-coded credential purpose for the Credential
Libraries. It also moves the logic of creating CredentialLibraries from
CredentialSources out of the repository and into the targets.Service.
This refactor will allow for additional credential purposes to be
supported in both the service and the repository.
2021-10-29 10:01:52 -04:00
Jeff Mitchell 0fd906d964 Merge branch 'main' into plugin-hostcatalogs 2021-10-21 11:47:13 -04:00
Timothy Messier eac433f7ff refact(target): Move tcp into subpackage
This moves all of the tcp target functionality into a tcp package. It
also establishes a Register function in the target package to allow
specific target types to be registered at initilazation time. When
registering, a target type needs to provide its Subtype, as well as some
RepositoryHooks that are used by the target Repository.
2021-10-19 10:44:51 -04:00
Jeff Mitchell 1c8e0ed1e1 Add scaffolding for external host plugins and convert aws/azure over (#1581) 2021-10-14 11:56:08 -04:00
Jeff Mitchell 13ad92d800 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-10-11 12:38:42 -04:00
Timothy Messier 8caaf3e076 refactor(schema): Add support for migration editions
This refactors the schema package and subpackages to support editions.
An Edition is a collection of sql migrations. A given boundary binary
can have multiple migration editions. The `schema.Manager` is updated to
apply the necessary migrations in the correct order, leveraging an
Edition's priority to determine the order in which the separate Editions
are applied.

The sql migration files are now nested under a directory for the
edition.

This also switches from the generated code to using embed, which
eliminates the need for the `make migrations` target and the generated
code. As such this commit removes the target and generated code.

See:
    https://pkg.go.dev/embed
2021-10-08 06:50:26 -04:00
Jeff Mitchell 158ab09952 Merge branch 'main' into plugin-hostcatalogs 2021-10-05 16:27:28 -04:00
Jim 2ee2c50ba3 fix (Makefile): Add proper comment delimiter (#1577) 2021-10-04 13:37:07 -04:00
Jim c8b29ded1c Events: Add outbound detail protobufs, request status code, and update event encrypt filter. (#1569)
* feat (events): Add status code to audit events

* feat (events): Add the resp proto msg to every audit event

* chore (events): Update eventlogger dep

This latest version will redact any map and/or map field which isn't
explicitly classified via a Taggable interface

* feat (events): Begin to add tagging to response proto msgs
2021-09-30 12:55:47 -04:00
Jim 136ac00b49 refact: Changes required for gorm v2 (#1528) 2021-09-30 08:47:34 -04:00
Jim 07c5c00f55 chore: Update version to 0.6.2 2021-09-27 16:38:06 -04:00
Jeff Mitchell ea939a4445 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-09-21 10:33:57 -04:00
Jacob Mammoliti 2f329c4e93 chore: Docker Build fixes (#1502)
Pass correct context to docker build for multiarch and dev build targets.

* fixed missing file errors; bumped boundary version
* downgraded alpine due to build issues
* fixing makefile
* bumping boundary and alpine versions
* fixed docker directory in makefile and dockerfile
* updating dev.dockerfile & makefile
2021-09-21 09:46:17 -04:00
Jeff Mitchell a71cdae204 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-09-16 14:42:52 -04:00
Todd Knight 5d7e723768 Update to version 0.6.1 2021-09-14 13:50:56 -07:00
Todd Knight e208800f77 Merge branch 'main' into plugin-hostcatalogs 2021-09-10 15:40:21 -07:00
Timothy Messier ecdcf72e0e ci: Update Makefile with new targets for testing
This updates the test-ci target to startup the test database container
first, wait for it to be ready, and then start running the tests.

It also creates some new targets for local devs. Prior to running any
tests either via `make test` or `go test`, the database should be
started with:

    make test-database-up

It can take a few seconds for the database to fully initialize, the
status can be checked with:

    docker logs -f boundary-sql-tests

This database can be stopped and destroyed with:

    make test-database-down

In general it should only need to be restarted when new migrations are
added. But it might also be necessary to restart if some tests fail in
an unexpected way and fail to do cleanup steps.
2021-09-09 13:42:01 -04:00
Todd KnightandMichael Gaffney db9e1106a9 feat(host): Add host plugin related schemas and tests (#1475)
* feat(host): Add host plugin related schemas and tests

This adds the schema files for host plugins, plugin based catalogs and
plugin based sets.  This also adds the protos and tests which utilize
gorm to ensure the schemas enforce the constraints we expect.

Along with this change was a migration which moved catalog names to the
base type table so we can ensure all catalogs in a single scope,
regardless of subtype, have a unique name.

* Updated plugin schemas to do the following:
- Add plugin_executable table
- plugin table now also has scope_id and name w/ uniqueness constraints
- host_plugin no longer has id_prefix column
- host_plugin separates name and plugin_name
- plugin_version table renamed version to symantic_version column.

* Fix typo in delete_plugin_subtype trigger.  Add update test for host plugins.

* Update id prefixes. Fix public_id typos in protos and plugin_executable name in sql diagrams.

* Created internal/plugin and moved base plugin structs to it and moved host plugin subdirectory to it.

* Created internal/plugin and moved base plugin structs to it and moved host plugin subdirectory to it.

* Add first pass at enums for OS and Arch supported by plugin executables.

* Capitalizing the const enums for OS and Architectures.

* Add comments to sql files.

* Reviewer comments.

Remove unsupported OSes and Archs from SQL and go constants.
Add missing tests.

* Be more permissive in the values the db accepts.

The go logic can restrict which values it will allow getting populated into the db.

* Removing constraints on which values can be placed inside operating_system and architecture columns.

* Updating test helper functions to only create a single catalog or set.

* Move files to new migration version.

* Fixing job/plugin test.

* Update table names, named a number of constraints, remove plugin version and executable tables.

* Add constraints for plugin name and id prefix.

* Rename constraint, remove unhelpful comment block.

* Adding semantic version to plugin_host and set attributes to not null.

* Remove semantic versioning from all locations.

* Remove semantic_version from plugin_host table comment.

* Fix op copy/paste error. Don't use deprecated errors methods. Update constraint names.  Add docs.

* Apply suggestions from code review

Fixing constraint names.

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-09-08 10:06:38 -07:00