Commit Graph
58 Commits
Author SHA1 Message Date
Jeff Mitchell 7f2aa5ca8f Add httpfs DB migrations and generate the input (#35) 2020-05-11 12:42:10 -04:00
Jim bd5ddea6e4 refactor clonable to not rely on the resource interface (#36) 2020-05-11 10:31:15 -04:00
Jim 0676ea51f1 refactor oplog to use db/internal migrations, remove InitTicket() for more reliability and simplify test step up and tear down (#37) 2020-05-11 10:30:44 -04:00
Jim c43e05be2e provide db.Open() and db.Migrate() as part of icu-64 (#34) 2020-05-08 17:21:22 -04:00
Jeff Mitchell e8b5384b7a Fix missed address change in test 2020-05-08 12:03:56 -04:00
Jim 8a5197e39e implement schema, store and repository for IAM scopes of organization and project 2020-05-08 11:36:28 -04:00
Michael Gaffney 8824a6f7f9 database: add wt_public_id domain type (#30) 2020-05-06 08:29:13 -04: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
Jim 725a777baf refactor friendly name to just be name (#29) 2020-05-05 16:35:24 -04:00
Jeff Mitchell c6a9c970b0 Don't require project in generated client requests 2020-05-05 16:32:27 -04:00
Jeff Mitchell 828fee20a1 Rename generated files to make them obvious 2020-05-05 15:33:16 -04:00
Jeff Mitchell 050b914447 Fix detail template test 2020-05-05 14:28:20 -04:00
Jeff Mitchell 11f640a0f8 Fix compilation after Id changing 2020-05-05 14:13:08 -04: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 1f0748a8c3 Don't make Id fields pointers as they are immutable 2020-05-05 14:02:46 -04:00
Jeff Mitchell 416688448c Project isn't required, so don't require it in the client 2020-05-05 13:32:54 -04:00
Jim 27b4d7a034 basic internal db interfaces and Gorm implementation
* db reader and writer interfaces which should allow us to encapsulate the vast majority of database code in this package.

* GormReadWriter implementation of the Reader and Writer interfaces
2020-05-05 13:29:47 -04:00
Jeff Mitchell 1519a17f17 Rename catalog flag to catalog-id in hosts create command 2020-05-05 11:21:37 -04:00
Jeff Mitchell 1f3c52f495 Name and addr updates (#26)
* Rename FriendlyName to Name

* Standardize on connection parameters for the server being addr

This syncs up WATCHTOWER_ADDR and -addr (formerly -address) and frees up
-address to be used in resources (which it is).

* Add description fields
2020-05-05 11:19:42 -04:00
Jeff Mitchell e3c7ca3070 Add a hosts create command (#25) 2020-05-04 23:04:55 -04:00
Jeff Mitchell 17fffe7c23 Add Response type and decoding (#24)
This may not be the final interface for responses but it is fine to
start.

Fix some bugs, e.g. require an org and project to be set.
2020-05-04 23:02:18 -04:00
Jeff Mitchell e31e91a5ad Add create function template and fix some minor template bugs (#23) 2020-05-04 22:59:45 -04:00
Jeff Mitchell 4afb4f6be5 Minor proto updates (#22) 2020-05-04 22:57:22 -04:00
Jeff Mitchell 6970b14143 Update type value to wrapper 2020-05-04 14:58:18 -04:00
Jeff Mitchell 6254e18698 Fix compilation of command 2020-05-04 12:41:36 -04:00
Jeff Mitchell 19f74a8247 Minor template cleanup 2020-05-04 12:09:57 -04:00
Jeff Mitchell be1063d168 Clean up and reorganize API generation 2020-05-04 11:23:35 -04:00
Jeff Mitchell 9325a6422d Remove timestamps in generated files 2020-05-04 11:04:17 -04:00
Jeff Mitchell 1f93aa2301 Port over apigen's Makefile and go.mod changes 2020-05-04 11:02:02 -04:00
Jeff Mitchell 2926cc1000 Add initial API generation bits (#20)
* Add initial API generation bits

* Revert accidental changes to oplog
2020-05-04 10:58:20 -04:00
Jeff Mitchell 7f03246c6f Add basic API client (#19) 2020-05-04 10:58:03 -04:00
Jim 2f0dd58f11 set default value in gorm tag, so database timestamp defaults will get set 2020-05-03 16:10:14 -04:00
Jim 73363d4c71 adapt to use structwrapping from go-kms-wrapping 2020-05-03 16:09:22 -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
Todd KnightandJeff Mitchell c7126ae69b Static Catalog Api definition (#12)
* Setup buf to see and process protos correctly.

This commit adds a proposed directory structure for protos.  Included is a rough draft of the Ec2Catalog protos.

* Add host and host_catalog service apis.

This also has for the first time the move away from holding individual ids for resources and instead using the full uri path as the api facing identifier.  There are some issues with the swagger generation stripping out the format of the path matching so currently only PATCH uses the approach I would like to move to.  In follow up commits I'll try to either get swagger to display the correct expected paths or I'll resolve if that is even needed by our clients.

* Move all protos and generated files to under the internal directory.

This also required updating the buf config to explicitly name the exluded linted proto files under oplog since previously /internal/ was listed as a root in buf.  Future commit will move oplog proto files to be with the others.

* Moved oplog related protos to under the proto directory and regenerated.

* Update the oplog protos to be compliant with buf lint.

* Clean up comments in tools.

* Merged in recent changes to oplog protos.

* Add resource result messages to contain the read only fields and separate them from the writable fields.

* Merge the ec2 catalog resources in with the more generic host_catalog resource.

* Cleaning the generated swagger.

This included adding summaries for each proto rpc method, Making the resources be the full fqn, removing the default error, and a few other tweaks.

* Make project plural in the paths.

* Adding the ability to add and remove hosts from a host set.

* Add the ignore result limit for host set request.

* Make size and host lists read only.

* Add documentation about what host references are allowed to be added.

* Remove ignore result limit when listing items.  These can be added in later.

* Add handlers and tests for unimplemented services.

* Add bootstrap target and update how tools are built (#13)

* Update tool installation method, add bootstrap target to makefile

* Changing org to orgs in all paths and org param to org_id.

* Adding tests for unimplemented service implementations.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-05-01 12:38:01 -07:00
Todd Knight 4d86db6ba5 Introduce the proto directory structure. (#9)
* Setup buf to see and process protos correctly.

This commit adds a proposed directory structure for protos.  Included is a rough draft of the Ec2Catalog protos.

* Setup buf to see and process protos correctly.

This commit adds a proposed directory structure for protos, but leaves the existing oplog related protos alone.  Included is a rough draft of the Ec2Catalog protos.

* Update makefile and add script to generate the appropriate pb.go files.

* Add comment explaining google.golang.org/protobuf vs github.com/golang/protobuf

* Move all protos and generated files to under the internal directory.

This also required updating the buf config to explicitly name the excluded linted proto files under oplog since previously /internal/ was listed as a root in buf.  Future commit will move oplog proto files to be with the others.

* Moved oplog related protos to under the proto directory and regenerated.

* Update the oplog protos to be compliant with buf lint.
2020-04-28 11:20:37 -07:00
fca36970bf refactor replay, so that it creates the required tables during replay (#7)
Co-authored-by: Jim Lambert <jimlambrt@Jims-MBP-3.home>
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
2020-04-20 16:42:16 -04:00
Patrick Bernal 0fffb54501 Update jira_test.yml 2020-04-19 14:32:17 -04:00
Patrick Bernal dbcbc4e883 Update jira_test.yml 2020-04-19 14:31:16 -04:00
Patrick Bernal 063469c29e Update jira_test.yml 2020-04-15 14:45:40 -04:00
Patrick Bernal af4ccad566 Update jira_test.yml 2020-04-15 14:42:54 -04:00
Patrick Bernal 0ee97a8cbc Update jira_test.yml 2020-04-15 13:56:39 -04:00
Patrick Bernal bcfd245dd8 Update jira_test.yml 2020-04-14 18:56:42 -04:00
Patrick Bernal 9bbb501a7b Create jira_test.yml
testing a Jira create while opening an issue on GH
2020-04-14 18:14:20 -04:00
Jeff Mitchell e6533d966d Update go-kms-wrapping and go-hclog deps 2020-04-10 10:43:00 -04:00
34f530e0df Basic oplog capability (#6)
The ability to write oplog entries using a ticket based system to ensure serialization.   Uses a go-kms-wrapper for encrypting/decrypting entries.

Co-authored-by: Jim Lambert <jlm.lambert@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-04-08 14:55:40 -04:00
Jeff Mitchell 6b0756ade9 Update go-kms-wrapping 2020-04-07 10:35:24 -04:00
Jeff Mitchell 5e82db8a2d Minor bugfixes and cleanup 2020-03-23 14:50:19 -04:00
Jeff Mitchell cad3c24f54 Add auth over ALPN (#5) 2020-03-22 20:17:23 -04:00
Jeff Mitchell 5acda6a0b1 Begin purpose-based listener refactoring (#4) 2020-03-22 08:27:24 -04:00