Commit Graph
43 Commits
Author SHA1 Message Date
Michael Li 9eb608feeb chore: Update protobuf to 1.33 (#4485)
Release: https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.33.0
CVE: https://nvd.nist.gov/vuln/detail/CVE-2024-24786
2024-03-06 14:53:06 -05:00
Johan Brandhorst-Satzkorn d9c6de4e8b deps: update runc dependency (#4349)
Fixes GHSA-xr7r-f8xq-vfvv
2024-02-01 13:19:24 -08:00
Johan Brandhorst-Satzkorn 17b6ad5c5c handlers/hosts: implement pagination for hosts
Adds protobuf types and handler logic to support pagination of hosts.
2024-01-05 07:43:21 -08:00
Sepehr 16d86d601a Add additional observation tags, remove from version and authorized_action 2023-09-22 11:31:42 -04:00
Jim d5411a26f6 chore: update protobuf dep (#3669) 2023-09-05 13:10:03 -04:00
Jim 63a2b62b85 chore (deps): update GKW and protobuf; and run "make gen" (#3111) 2023-03-22 14:32:52 -04:00
Jim 982c9c263c chore: update buf version to 1.15.1 (#3102) 2023-03-20 10:37:40 -04:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Johan Brandhorst-Satzkorn 222a935223 Update grpc-gateway dependency (#2311)
* chore(deps): Update grpc-gateway dependency

This fixes an issue which would allow an attacker to trigger a
(recovered) panic in the gateway handler.

* fix(server): Use cmp.Diff instead of assert.Equal

Testify is not great at handling protobuf types, and
was for some reason returning a diff here when in
reality there is none. Switch to go-cmp for the
comparison to remove the error.
2022-08-11 20:24:14 -04:00
Johan Brandhorst-Satzkorn f69fbf2255 feat(proto): Format protobuf files with buf (#2033)
Formats all protobuf files with buf format. This ensures
a consistent style across all our protobuf files, similar
to gofumpt.
2022-05-04 11:10:21 -04:00
Johan Brandhorst-Satzkorn 5440195cce feat(hosts): Classify host proto fields 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
Jeff Mitchell 7fc712de44 Bump protoc 2021-09-17 16:23:25 -04:00
Jeff Mitchell b13975cb6a Move API resource pbs to new location (#1484)
This moves the generated pb files to the `sdk` module. This allows third parties to make use of them if desired (e.g. in upcoming plugins) and moves away from the `gen` nomenclature in the directory, since we are going to be adding some extra interface functions to the messages.
2021-08-26 10:44:41 -04: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
Jim 358f5a61fb bump protoc to v3.15.8 (#1147) 2021-04-18 21:34:25 -04:00
Jeff Mitchell be10cc4b42 Update grpc/proto deps (#1136)
* Update grpc/proto deps

* Make gen
2021-04-15 14:11:23 -04:00
Jeff Mitchell fcbf372881 Bump proto/grpc deps (#1017)
* Bump proto/grpc deps

* Back out buf change

* Run make gen
2021-03-20 16:12:01 -04:00
Todd Knight 97b404032b Add ability to filter List*Requests (#952) 2021-02-22 10:09:25 -07:00
Jeff Mitchell 84c617dc49 Run make gen after the gofumpt update 2021-01-08 10:32:02 -05:00
Michael GaffneyandJeff Mitchell 94cb79bbdd See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied

Results of running `gofumpt -w -s .`

* Update tools file and Makefile for gofumpt

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-01-07 10:02:32 -05:00
Jeff Mitchell 11b821a200 Bump deps (#818) 2020-12-15 14:56:41 -05:00
Jeff Mitchell 7f00e61ab0 Migrate to newer grpc utilities and bump deps (#593)
* Migrate to newer grpc utilities and bump deps

* Revert grpc back as it was an accidental tag
2020-10-09 13:18:53 -04:00
Todd Knight 0eb35f49d5 Correcting a bunch of incorrect documentation for the different API services and resources. (#494) 2020-09-29 13:17:59 -07:00
Jeff Mitchell b1fc9fd547 Sanitize protos (#471) 2020-09-26 08:30:27 -04:00
Jeff Mitchell 41ed95bdec Remove old-style pathing (#353) 2020-09-11 17:41:03 -04:00
Jeff Mitchell f94f21fd97 Update API codes (#336) 2020-09-08 23:57:26 -04:00
Todd Knight 37e56ab46b Pathing updated to support new and old styles (#323) 2020-09-02 19:43:41 -07:00
Todd Knight d5678c4f80 Handler for Host CRUDL actions (#287) 2020-08-20 08:20:26 -07:00
Jeff Mitchell 78d7f539c5 Add versioning to host catalogs/sets/hosts and fix up tests (#247)
* Start adding version to host resources and fixing up tests

* Add versioning to host resources and update API tests

* Fix nil in test

* Add missing update
2020-08-11 11:20:06 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Michael Gaffney bdb31cf8b5 Bump deps (#245) 2020-08-08 10:49:43 -04:00
Todd Knight f47046f158 Update Watchtower to use grpc-gateway v2 (#204)
* Migration to grpc gateway v2.
2020-07-23 11:26:15 -07:00
Michael Gaffney 799242fce4 Bump deps and run 'make gen' (#212) 2020-07-22 17:00:22 -04:00
Jeff Mitchell 388a13b10d Convert scopes to the new paradigm (#206) 2020-07-22 00:14:28 -04:00
Jeff Mitchell dec1f07266 Update deps and make proto 2020-07-20 13:47:27 -04:00
Michael Gaffney 4f30983c14 Bump deps and run make gen (#115) 2020-06-11 10:08:54 -04:00
Jeff Mitchell 31ef4a65ac Bump deps and make gen 2020-05-29 11:21:12 -04:00
Jeff Mitchell b718091419 Update signatures of generated files to match our tool versions 2020-05-26 13:29:33 -04:00
7f0dfa2344 Fix Update Project Logic (#54)
* carve out scope into a separate branch for a PR

* refactor getOpts to be private

* narrowed to just the scope proto

* wrap in a transaction

* remove user from scopes PR

* make scope type immutable

* refactored with more referential integrity (thanks mike)

* refactor based on pair programming with Mike

* better VetForWrite that supports db.Options but that requires GetOpts and Options to be exported.

* stop printing out all the db logs

* refactor withScope to be private

* refactor the VetForWrite a bit based on Todd's PR comment

* fix typo

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

* fix ctx propagation and Scope returns

* fix ctx propagation and use a const for std retry count

* change Std to Crud

* fix ctx propagation

* make sure update with field masks doesn't update a field not in the mask and force a read after update.

* add description

* remove comment about future

* clean error strings

* clean up enum string rep

* stdMeta

* fix return value to be just nil

* fix returns and errors

* update test to match new error string

* change len of domain to 24

* provide common function for new public ids

* use common db.NewPublicId() and provide the correct prefix

* move list out of CrudActions and provide a CrudlActions shortcut as well

* some comments about the purpose of VetForWrite()

* move to random 10

* Adding project API interface.

* Creation of Project handler and Tests

* Move to using the iam objects.

* Setting up testify framework for mocking and assertions.

* Fix iam options typo references.

* Adding tests for CreateProject and UpdateProject.

This also adds some additional argument validation.

* Merging in PR 40

* Renamed fakeRepo to mockRepo

* Changing around TODOs to capture current plans with the code.

* Remove the repo interface and use a real DB for tests.

* Fixed a few tests.

* Adding checks for properly formatted identifiers.

* Updating code to account for recent merges.  Relaxing some restrictions on what an id can look like.

* Added small comment explaining why RegisterGrpcGatewayer interface exists.

* Move project service up a call level.

Long term I think it would make sense to define these services even higher up the call stack, potentially at the initialization of the controller server, near where the DB is initialized.

* Making these fields align with those in the resources under hosts/...

* Hard code the service initialization in the handler registration code.

* Regenerate project related code proto code.

* Removing type field for project.

* Adds basic project handling in CLI/SDK (#47)

*    Adds SDK for creating and reading projects
*    Reorganizes a bit
*    Adds CLI for creating and reading projects
*    Fixes some some generation bugs
*    Adds redirect support for default org ID

* Fix protobuf import references being moved.

* Update client test to look for "orgs" and "projects" instead of "org" and "project"

* Update expected segments test

* Fix setAddr handling when default organization is in use

* Set client in target after create or read

* Adding functionality and tests for update masks.

* Additional tests for update.  Disable update non existant project test.

* Make not providing an update mask be an invalid argument.

* Make empty update mask paths and no mutable fields in the path an InvalidArgument error.

* Fix get Project test.

* Adding back in the Update a non existant project test case.

* Adding seperate path structured tests.

* Attach an issue id to field mask validation TODO.

* Generate Project Update SDK code (#58)

* Created the UpdateFunction method.

* Regenerate protobuf derived code since pull #50 updated dependencies.

* Special case IDs to not be passed for updates.

* Updated the tools file since imports reordered it.

* Add spaces between each tools import/comment grouping.

Co-authored-by: Jim Lambert <jimlambrt@Jims-MBP-3.home>
Co-authored-by: Jim <jlambert@hashicorp.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-05-19 12:10:39 -07:00
Todd Knight 05330db741 Add projectless paths for host-catalogs. (#31)
* Add projectless paths for host-catalogs.
2020-05-05 16:33:03 -07:00
Jeff Mitchell f36f25a23b Add json_name fields to proto for complex names (#27)
This was generating fine before but it makes it explicit in the proto
and it avoids weirdness where the protobuf tag will say a name is
something like requestId where the json tag says it's request_id. This
way they line up.

One thing not honoring this properly is TraceId. I don't know why the
JSON tag being generated doesn't match even when explicitly set here.
For now I'm just manually fixing it.
2020-05-05 14:08:13 -04:00
Jeff Mitchell 13056e1f51 Migrate host resources to hosts package (#15)
Migrate host resources to hosts package and some other minor changes
2020-05-01 18:05:54 -04:00