Commit Graph
187 Commits
Author SHA1 Message Date
Haotian 28f53a64b4 feat(workers): implement worker service add/set/remove api tags 2022-07-14 10:19:03 -07:00
Jeff Mitchell 704d68848c Merge remote-tracking branch 'origin/main' into llb-byow 2022-06-15 16:45:00 -05:00
Louis Ruch 68eb6e2bed chore(targets): remove deprecated credential libraries on target resources (#1533) 2022-06-15 08:56:24 -07:00
Louis Ruch 58d546cdd4 feat(credential): Add static credential store and username_password credential 2022-06-14 13:01:17 -07:00
Jeff Mitchell 5d3facf561 Merge remote-tracking branch 'origin/main' into llb-byow 2022-06-10 19:05:27 -04:00
Timothy Messier e79714e93f feat(session): Add include_termianted option to list endpoint 2022-06-09 19:28:04 +00:00
Jim 37cc61e4c9 feature (worker): Add audit data classification to CreateWorker(...) api (#2153) 2022-06-09 06:43:58 -04:00
Jim fdf43fc4fe feature (worker): add CreateWorker(...) service (aka API) (#2143) 2022-06-07 11:50:30 -04:00
Todd fa2efe9878 Create the Worker API resource and the CRUDL operation definitions for a worker. (#2114) 2022-05-27 08:29:23 -07: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
Timothy Messier 3be5c44907 feat(target): Classify resources for audit events 2022-04-20 13:32:32 -04:00
Johan Brandhorst-Satzkorn 8c452b0991 feat(authmethods): Add classification to all fields 2022-04-20 13:32:32 -04:00
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 9d3a57cbb0 refact(credentialstore): Switch subtype attributes to oneof
This updates the credential store resources to use a oneof for
attributes. This allows requests to the credential store service to
leverage the new subtypes.AttributeTransformerInterceptor so that
attributes are strongly typed prior to the service handler.
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 3d4ba0389e refact(credentiallibrary): Switch subtype attributes to oneof
This updates the credential library resources to use a oneof for
attributes. This allows requests to the credential library service to
leverage the new subtypes.AttributeTransformerInterceptor so that
attributes are strongly typed prior to the service handler.
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
Timothy Messier 5d6cb0009d refact(managed-groups): Switch subtype attributes to oneof
This updates the credential store resources to use a oneof for
attributes. This allows requests to the credential store service to
leverage the new subtypes.AttributeTransformerInterceptor so that
attributes are strongly typed prior to the service handler.
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 a2bff4efdf feat(authmethods): Add typed attributes to authenticate request and response
The AuthenticateRequest and AuthenticateResponse types have a
complex mapping rule system, which requires a pair of custom
callback functions.
2022-04-20 13:32:31 -04:00
Johan Brandhorst-Satzkorn 53481146fd feat(authmethods): add well typed attribute options (#1972)
Add well typed attribute options to the authmethods proto
definitions, while hiding them from being rendered in
the openapiv2 spec.
2022-04-20 13:32:31 -04:00
Timothy Messier e76c48ad36 feat(account): Mark auth_method_id as a source id for subtypes 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 6a37bd9710 Upgrade grpc-gateway version to v2.10.0 (#1954)
This new version will let us hide fields from the OpenAPI output
2022-04-20 13:32:29 -04:00
Johan Brandhorst-Satzkorn 80b2c9230f refact(authmethods): Add top level token type to Authenticate (#2010)
Other parts of the system make use of a "type" field, while the
AuthenticateResponse sets a "token_type" on the response attributes
directly. Rename this field to "type", and move it up to the response
level, to be more consistent with other RPCs.

Also adds a new field to the AuthenticateRequest, "type" which will
replace the "token_type" field over time.
2022-04-18 09:26:15 -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 80d41b9044 Merge branch 'main' into plugin-hostcatalogs 2021-11-04 09:02:39 -04:00
Timothy Messier 36f1ae75f7 feat(sdk): Add support for egress credentials to target service 2021-11-01 13:33:54 -04:00
Jim 8ae6e9892f feature (events/audit): Add auth info to audit events (#1644) 2021-10-28 21:14:39 -04:00
Jeff Mitchell b1a72bd445 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-10-27 21:57:30 -04:00
Jim a679300b50 feature (events): Classify auth method request/resp messages for audit events. (#1640)
* refactor (oidc): Stop emitting error for not found token id

Stop emitting errors when authtoken repo.IssueAuthToken is called and
there's if no pending token.  It's not an "normal" state and not
an error condition.

* feature (audit tagging): Add tags for auth method requests/responses

Including testing functions for asserting audit events created
when a service is called
2021-10-27 09:37:14 -04:00
Jeff Mitchell 0fd906d964 Merge branch 'main' into plugin-hostcatalogs 2021-10-21 11:47:13 -04:00
Jim 769416c2ff refactor (controller): Use a grpc server for the grpc-gateway (#1576)
* refactor (controller): Use a grpc server for the grpc-gateway

This starts a grpc server for the grpc-gateway.  The new gateway
server uses an in-memory listener which also supports "dialing", so
the http proxy can connect to the in-memory listener.

This change allows us to use all grpc server features and was in part
motivated by a need for an interceptor of inbound requests.  With that
said, having a "proper" grpc server for the gateway will provide a lot
more flexibility and capabilities moving forward.

The request context will still be verified via middleware in the
http proxy (see wrapHandlerWithCommonFuncs).  This verified context
will be serialized into a protobuf and sent along to the grpc-gateway
via metadata where an interceptor will add the verified request
info to the request's context (see requestCtxInterceptor).  The
interceptor will verify the serialized request info via a shared ticket
with it's companion in-memory http proxy.  FYI: the ticket is simply
random base62 string (see db.NewPrivateId).

This change also necessitated a minor change to services.  We need to
return an empty response instead of nil, nil when there are no errors
and the response is empty.

* refactor (handlers): Rename gRPC Gateway filter

Originally, this was called an OutgoingInterceptor, which is an
unfortunate name since it's not an interceptor.  Now that we're
refactoring the gateway stuff and have proper interceptors, renaming
this should remove ambiguity

* refactor: Rework how 204 with empty msg is handled

Recent changes to grpc gateway has necessitated a change to how
204s are handled by the gateway

* tests (bats): Check status codes for delete operations
2021-10-19 17:21:41 -04:00
Jeff Mitchell 158ab09952 Merge branch 'main' into plugin-hostcatalogs 2021-10-05 16:27:28 -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
Jeff MitchellandTodd 7d71618df0 Add more host-catalog and host-set CLI support (#1567)
Add more host-catalog and host-set CLI support

Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-09-28 09:40:12 -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
Todd 0ba217cbfa Run make tools and make gen now that the dependencies have been updated. (#1552) 2021-09-21 10:32:26 -04:00
Louis Ruch 6000f20ae5 chore(authenticate): remove deprecated authenticate:login and credentials field (#1534)
* chore(authenticate): remove deprecated authenticate:login

* Update changelog
2021-09-17 18:23:24 -07: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
Jeff Mitchell f8a51b987c Migrate target host sets -> host sources (#1424)
This follows the same model as https://github.com/hashicorp/boundary/pull/1413

See there and CHANGELOG for more details.
2021-07-30 08:48:03 -04:00