Commit Graph
100 Commits
Author SHA1 Message Date
Todd 1c36b1e4d7 Add plugin details to host catalog, host set, and host domain model pages (#1715)
* Add plugin information to host catalogs, host sets, and hosts.
2021-11-17 14:11:06 -07:00
Todd 18de3653f5 Set sync job still syncs when plugin reports no hosts in sets (#1726)
* Allow the set sync job to sync when no hosts are returned by the sync job.
2021-11-17 13:32:23 -07:00
Todd 63bf60654e Add plugin info on the CLI when reading a host. (#1725) 2021-11-17 10:16:12 -07:00
Todd 056e72491d Attempt to fix the ci error. (#1723) 2021-11-17 08:03:42 -05:00
Todd 1417e17909 Fix nil pointer error when listing by non existing host catalog. (#1720)
* Fix nil pointer error when listing hosts from nonexisting host catalog.
2021-11-16 17:36:09 -07:00
Todd b1c53951d5 Use the correct collection actions response when updating host catalogs. (#1718) 2021-11-16 16:55:36 -07:00
Todd Knight 063b613bd1 Update dependency for azure plugin. 2021-11-16 16:16:41 -07:00
Todd 46a1edcb3b Add DNS Names and IP Addresses to the CLI output. (#1701) 2021-11-12 18:51:28 -05:00
Todd 78dc6cf370 OnConflict constraints for adding host ip and dns names in upsertHosts (#1700)
* Ignore constraint violations when adding ip addresses and dns addresses that already exist.
2021-11-12 16:17:43 -07:00
Todd 5d2b0e94aa Update sync interval seconds field. (#1698)
* Update sync interval seconds field.

* If the sync interval was updated, schedule the next sync job wakeup immediately.

* Calculate the next sync time for the scheduler should wake up if we only updated the sync interval.
2021-11-12 14:55:22 -07:00
Todd Knight 228be58cc8 Merge branch 'plugin-hostcatalogs' 2021-11-12 10:20:11 -07:00
Todd Knight 5850001a07 Rename file to match others in directory and remove TODO. 2021-11-12 09:53:56 -07:00
Todd b16ce175e5 Fix secrets clearing bug in update. Changes to update count behavior for catalogs (#1691)
* Fix secret clearing bug in update.  Always return 1 catalog updated if we can find a catalog w/ a matching version.
2021-11-12 09:46:40 -07:00
Todd 5cfcc41f00 Fix bug for adding preferred endpoint when non existed prior. (#1692) 2021-11-12 09:04:48 -07:00
Todd Knight f41bceda83 Merge from main and make gen 2021-11-12 08:57:10 -07:00
Todd Knight 884e1f2d18 Merge branch 'main' into plugin-hostcatalogs
# Conflicts:
#	go.mod
#	sdk/go.mod
2021-11-12 08:55:17 -07:00
Todd 61f9d1f6af Add update set handler and sdk functionality (#1684) 2021-11-11 14:32:15 -07:00
Todd 29b4537d3b Reference PreferredEndpoints by top level struct name (#1688)
* Reference PreferredEndpoints by top level struct name instead of embedded proto GetPreferredEndpoint method.

Reorganize the sql files a little.

* Make PreferredEndpoints replayable. Test refactoring to remove variables that persist across test calls. DeleteItems instead of trying to use WithWhere.
2021-11-11 13:51:52 -07:00
Todd Knight dba7c6b531 Fix value of op constant for syncSets 2021-11-11 08:29:13 -07:00
Todd Knight 772bb88d8d Updating the aws plugin dependency. 2021-11-10 15:42:51 -07:00
Todd Knight b14302e762 Updating the azure plugin dependency. 2021-11-10 15:30:40 -07:00
Todd 2229d1a819 Call OnCreate or OnUpdate on the plugin after db constraints are checked (#1683)
* Only call the Plugin at create/update time after the db has been partially updated. This allows more constraints to be checked prior to calling the plugin.
2021-11-10 09:04:29 -07:00
Todd 050553ffcf Add update catalog support for plugin based catalogs in handler and go sdk (#1673)
* Create catalog service handler for updating plugin.  Add tests for handler and run make fmt. Silently drop attributes where the value is nil when creating the catalog or set.
2021-11-09 14:42:48 -07:00
Todd 54bccf3674 Mask manager can now include mask paths w/ a specified prefix which would be filtered otherwise (#1654)
* Update the mask manager to always allow fields containing a prefix which matchs a passedThroughPrefix.

This will be useful when updating plugin based host catalog and sets since attributes and secrets cannot be contained in the mask manager mapping.
2021-11-04 10:43:08 -07:00
Todd 1ff2968409 Warehouse contains "Unsupported" host_address for plugin based hosts (#1656)
* Populating the warehouse with the host_address from a plugin basd host is unsupported.

* Adding test for plugin hosts in the datawarehouse.
2021-11-03 07:24:53 -07:00
Todd ec36528e97 Updating dependencies since the host plugins were updated. (#1649) 2021-11-02 20:49:04 -04:00
Todd 808b986834 Read and List Plugin based Hosts (#1655)
* Add ability to read and list hosts.  Tests to follow.

* Add tests for reading and listing as well as validation checks to not modify hosts.

* Add IpAddress and DnsNames to the api resource.  Populate the plugin info.

* Adding go sdk tests for reading and listing hosts and ensuring update and deleting is disallowed.
2021-11-02 14:06:20 -07:00
Todd 1312628a1e Add plugin set sync and orphaned host cleanup jobs (#1647) 2021-11-01 09:07:56 -07:00
Todd 6eba8a4787 Lookups Catalogs and Persisted data together (#1643)
* Fixed a number of TODOs:
1. Create a catalog/persisted data view.
2. Pass all sets to the plugin when deleting a catalog.
2021-10-28 12:46:42 -07:00
Todd 8795b20fe2 Delete actions for plugin based catalogs and sets (#1622)
* Add ability to delete plugin based host catalogs and host sets

* Add plugin host catalog and set tests for API.
2021-10-25 09:37:05 -07:00
23baaac36b Add DB changes for host, set members, and host addresses for plugins. (#1584)
* Add DB changes for host, set members, and host addresses for plugins.

* Add priority, address review feedback, update tests, naming, protos

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-10-20 12:20:28 -07:00
Todd e11a481256 Register Azure and AWS at controller start up (#1570)
* Register Plugins.

* Pass catalogs and persisted data when listing hosts for host sets.  Register azure plugin at startup if not present.
2021-09-29 15:46:42 -07:00
ToddandJeff Mitchell 14cc97b645 Add authorize session for plugin based host sets. (#1559)
Added a new Endpoint struct at the top level host package level to capture host, set, and address chosen.
Temporarily add a host_plugin_host table to capture the hosts returned by the plugins.  This ensures the datawarehouse is able to query the table to decide what host was chosen.  The view used to update the datawarehouse dimension table provides rows with host set ids and hosts which are not in that host set.  This is ok since the function which updates the dimension table provides the host set and host id chosen so that relationship doesn't need to be captured in the view itself.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-09-26 11:17:21 -04:00
Todd a4ea99047f Remove Prefix Id and Plugin Name fields (#1563)
* Remove Prefix Id and Plugin Name fields.  Creating catalogs now require either the plugin id or the name of the plugin resource (but not both).  Host Catalogs and Host Sets API resources now have a read only plugin field populated with plugin info.  Host Catalogs have a plugin id field as a top level field.
2021-09-24 13:16:13 -07:00
ToddandJeff Mitchell bbfef2802f Placeholder Plugin Providers for Repos and added testPlugin struct (#1532)
* Create minimalistic plugin map and test plugin.

* Pass secrets and attributes to the plugin when creating catalogs or sets.  Add tests for CreateSet and CreateCatalog repo methods.

* make fmt and extract out getPrivateCatalog and getCatalog helper methods.

* Exporting TestPluginServer so it can be used in the handlers.

* Keep separate persisted data from host catalogs lookups which facilitate passing it onto the plugins.

* Add TODO to merge get Catalog and get Persisted data.

* Adding tests for unimplemented being returned by the plugin.

* Use GetFields() instead of AsMap() to confirm attributes should be populated. Make clone consistent between catalog and sets.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-09-21 09:18:49 -07:00
Todd 0ba217cbfa Run make tools and make gen now that the dependencies have been updated. (#1552) 2021-09-21 10:32:26 -04:00
Todd Knight 843d126428 Merge branch 'main' into plugin-hostcatalogs 2021-09-20 15:05:19 -07:00
Todd Knight 7692b6a541 Bumping version.js to 0.6.1 2021-09-15 15:25:19 -07:00
Todd Knight 5d7e723768 Update to version 0.6.1 2021-09-14 13:50:56 -07:00
Todd Knight e3986d5f9c Running make fmt to fix formatting. 2021-09-14 13:34:31 -07:00
Todd Knight f2236482ad Creating plugin catalog handler (#1521)
The handler only supports create, lookup, and list for plugin based host catalogs.
2021-09-14 09:57:07 -07:00
Todd Knight eb6bab8298 Add plugin sets to targets. (#1522) 2021-09-13 16:22:11 -07:00
Todd Knight 715982148f Create Plugin Host Set Handler for Create, List, Get (#1518) 2021-09-13 15:02:04 -07:00
Todd Knight e208800f77 Merge branch 'main' into plugin-hostcatalogs 2021-09-10 15:40:21 -07:00
Todd Knight 4f09f1d74f Add create, list, lookup functions for plugin based host catalogs (#1515)
Create the repository for plugin host catalogs.  A large TODO is left in the code to interface with the plugin system once ready.
2021-09-09 11:15:14 -07:00
Todd Knight 1249f9668f Add Plugin Host Set Repo Create, List, Read Operations (#1497)
Add repo for plugin based host sets as well as tests.
2021-09-09 10:45:41 -07:00
Todd Knight 7769452f3b Merge branch 'alanknight-hostplugin-repo' into plugin-hostcatalogs 2021-09-08 17:03:14 -07:00
Todd Knight ce26b0d981 merging type of 2 arguments into a single declaration. 2021-09-08 16:59:54 -07:00
Todd Knight a78f16c969 Adding back accidentally removed tests and removing accidentally re-added proto messages. 2021-09-08 16:58:24 -07:00
Todd Knight 8104ecb3d5 Fix comments describing the requirements of the arguments to CreatePlugin. 2021-09-08 16:47:11 -07:00
Todd Knight 1237d05232 Create a repository to create, lookup, and list host plugins. 2021-09-08 16:41:41 -07: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
Todd Knight 56dd053ea6 Merge branch 'main' into plugin-hostcatalogs 2021-09-03 09:42:40 -07:00
Todd Knight 252d64f364 Merge branch 'main' into plugin-hostcatalogs 2021-08-31 16:42:35 -07:00
Todd Knight 1cacd8ee35 Update website VERSION export to 0.5.1 2021-08-19 10:31:01 -07:00
Todd Knight c79daab68c Update to version 0.5.1 2021-08-16 13:11:30 -07:00
Todd Knight 8496093874 make fmt. 2021-08-04 13:56:54 -07:00
Todd Knight 6b578c0e30 Update to versions 0.5.0 2021-08-02 13:36:07 -07:00
Todd Knight 39cc245966 Make gen after make tools. Includes make fmt of existing non generated files. (#1438) 2021-08-02 10:46:09 -07:00
Todd Knight 03b4c095c4 Fix syntax error in profiling_on.go (#1437) 2021-08-02 09:58:58 -07:00
Todd Knight 10e8aeae4b Subtype Id registration moved to its own package (#1416)
* Allow repo packages to register subtypes and id prefixes. 
* Refactor out request authentication logic to a new package as a sibling to handler.
2021-07-27 09:59:52 -07:00
Todd Knight 13a65052b4 Allow set-credential-library when a single library id is provided. (#1363) 2021-06-29 08:23:15 -07:00
Todd Knight 6766704687 Move setting worker as active closer to AuthorizeSession in the hopes that the liveness period doesn't pass before the AuthorizeSession can be called. (#1348) 2021-06-24 06:39:41 -07:00
Todd Knight 3175996e29 Have account_claim_maps be deterministically ordered in test comparisons. (#1318) 2021-06-11 11:43:36 -07:00
Todd Knight 4bd480c183 Fix field error message field name. (#1266) 2021-06-02 07:39:45 -07:00
Todd Knight 5d17bd9eec Error on boundary database migrate if the db hasn't been initialized (#1184) 2021-05-03 08:55:37 -07:00
Todd Knight 61e236f76d OIDC Callback Error Redirect (#1174) 2021-04-29 14:47:13 -07:00
Todd Knight fad9f6d525 Allow oidc accounts to be add|set|removed to users. (#1117) 2021-04-14 11:34:17 -07:00
Todd Knight dc881e65d4 Fix alignment for Is Primary For Scope field and values for listing. 2021-04-14 10:25:25 -07:00
Todd Knight 072b950540 Filter inactive and private oidc auth methods from unauthenticated list requests (#1110) 2021-04-13 16:42:25 -07:00
Todd Knight 53ec3c44bc Auth Method Listing matches other resources, remove repeated "Version" field. (#1107) 2021-04-13 10:34:13 -07:00
Todd Knight 14c222709c Make oidc auth callback redirect on most errors (#1105) 2021-04-13 09:21:26 -07:00
Todd Knight 71673ea161 Pass disable_discovered_config_validation in the API change-state call (#1100) 2021-04-12 08:49:22 -07:00
Todd Knight 48ef25433f Fix creation of initial Scope roles (#996)
* Fix the creation of initial roles and users so the admin has permission to list/read resources.

* Adding known permission issue to CHANGELOG.md.
2021-03-16 08:42:08 -07:00
Todd Knight 909026ed3d API filter tests (#958)
* API filter tests.  Requires that PR https://github.com/hashicorp/boundary/pull/957 is merged and tagged first.

* Updating /api dependency.
2021-02-22 14:37:14 -07:00
Todd Knight cac1e60e11 Add filters to listing different resources in the go sdk. (#957) 2021-02-22 13:31:17 -07:00
Todd Knight 97b404032b Add ability to filter List*Requests (#952) 2021-02-22 10:09:25 -07:00
Todd Knight 9576c46a4b Update changelog with fix for issue #909. 2021-02-05 13:22:18 -07:00
Todd Knight 568594d1b3 Release the shared lock using a non cancelled context (#918) 2021-02-05 12:58:54 -07:00
Todd Knight 02cd972043 Create Sessions List Self Action (#888) 2021-02-02 13:37:32 -07:00
Todd Knight 57d4bf2bfd Removing dev migration feature and checks (#892) 2021-01-28 19:28:31 -07:00
Todd Knight 955ae41215 Support upgrading from old migration table name (#889) 2021-01-28 14:30:08 -07:00
Todd Knight d2bb8820ea Wrap postgres up migrations into a single transaction (#887) 2021-01-27 15:58:22 -07:00
Todd Knight 1f9fcad1cd Adding Migrate Command (#872) 2021-01-25 14:43:50 -07:00
Todd Knight 595a86508e Fix lockup when initalizing database. (#875) 2021-01-20 18:10:45 -07:00
Todd Knight ec6151d174 Organize DB Schema Migration Code and DB Init Checks (#842)
Create Schema Manager and propagate contexts into the DB calls downstream.
Add checks at controller startup and database init for correct schema version and schema migration dirty bit being set.
2021-01-19 10:40:41 -07:00
Todd Knight aa4157639c Change Format of API Error (#784)
This is a wire breaking change for json errors since we have removed and renamed a few fields, and changed part of the structure of the returned json error.

* Remove redundant fields in Status, details.error_id, details.TraceId and details.request_id from API errors.

* Added wrapped errors and "ops" field to indicate the internal operation of the errors returned by the API.

* Added error cli error reporting of Op and wrapped errors.
2020-12-07 14:25:16 -07:00
Todd Knight f6e50006fc Generate postgres.gen.go using schema version directory structure (#808)
* Reorganize the db migration .sql scripts into individual schema version directories and generate the sql httpfs fakeFile accordingly.

* Created a /dev schema version directory to hold db schema updates that have not been finalized.

* Add an 'allow-development-migrations' flag to allow `boundary database init` to be executed even when there are schema updates in /dev.
2020-12-04 21:32:27 -07:00
Todd Knight 6e5aff3d5b Add buf breaking change detection to makefile (#756)
* Add buf breaking change detection to makefile.

* Bump buf version to latest and fixed some deprecation and new flag warnings.
2020-11-02 12:21:20 -07:00
Todd Knight 2d66c3b192 Add Admin Console tab for viewing session info and cancelling. (#632) 2020-10-12 13:54:35 -07:00
Todd Knight 11fd0d0300 Fixing some API error and comment copy/paste errors. (#580)
* Fixing some error and comment copy/paste errors.

* Fix roles in project scope error message.
2020-10-08 12:36:01 -07:00
Todd Knight abe5e9b950 Add Termination Reason (#573) 2020-10-07 21:37:30 -04:00
Todd Knight 04efdfe74a Adding scope list check and test. (#574) 2020-10-07 20:43:12 -04:00
Todd Knight 83314b7750 Accounts can update login-name. Fix help text for subtype resource update and creates. (#575) 2020-10-07 16:33:04 -07:00
Todd Knight b5b14d2230 Minor rewording suggestions (#553)
* Minor rewording suggestions.

* Remove hyphens in high availability.

* Apply some wording and typos and call out default ports.
2020-10-06 15:10:58 -07:00
Todd Knight 6c6fb7a4d0 Format errors better for CLI (#552)
* Start making errors easier to read for Table based CLI UI.

* Add TODO about reporting "update_mask" related errors.
2020-10-06 14:08:49 -07:00
Todd Knight e19d68dcf0 Test Cleanup. Alphabetize handler path test and add several paths that were missed (targets and sessions for example) (#534) 2020-10-06 11:29:53 -07:00
Todd Knight 54332c5da9 Fix description error message 2020-10-06 09:41:55 -07:00
Todd Knight 8e6e2fc735 Session Workflow use "connect" instead of "proxy" and fix few typos for other workflow docs. (#524) 2020-10-05 09:23:04 -07:00
Todd Knight f76d5aed9f Additional validation for add|set|remove methods. (#527) 2020-10-02 16:45:32 -07:00