Commit Graph
24 Commits
Author SHA1 Message Date
Louis RuchandJeff Mitchell a17e973712 feat(credentials): Refactor credential purposes (#2260)
* feat(credentials): Refactor credential purposes

 * Application credentials have been refactored to Brokered credentials
 * Egress credentials have been refactored to Injected Application
credentials

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2022-07-19 15:16:24 -07:00
Louis Ruch 00dfea1244 feat(target): Add support for static credential as target credential sources 2022-06-14 13:01:17 -07:00
Louis Ruch 58d546cdd4 feat(credential): Add static credential store and username_password credential 2022-06-14 13:01:17 -07: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 7ee8ddba6a True up some spelling 2021-05-14 16:26:25 -04:00
Jim c7bac26e1a Fix a broken auth token test and support conditional tests for "versioned" releases. (#1195) 2021-05-04 10:25:11 -04:00
Jeff Mitchell e6af51943d Add read:self and delete:self to auth tokens and add logout command (#1162) 2021-04-23 13:45:08 -04:00
Jeff Mitchell c63529e020 Fix WithKeyId after recent PR (#978)
Fixing the session passing around its key ID (which had previously been
blank) exposed another issue which was caught during bats tests:
WithKeyId statements using the wrong key, which prior to now had been
ignored because the argument was empty, resulting in an ineffective
option. This fixes those situations.

It also updates a bats test that didn't get updated in the CLI return
status PR.
2021-03-04 20:45:27 -05:00
Jeff Mitchell 9649a19d23 Update CLI error codes to be consistent with connect (#976) 2021-03-04 20:05:17 -05:00
Jeff Mitchell 72aa110f72 CLI JSON updates (#962)
See Changelog for details.
2021-02-25 12:43:17 -05:00
Jeff Mitchell 341e7aff0d CLI Generation (#953) 2021-02-23 19:06:39 -05:00
Jeff Mitchell 22462cdd84 Add read:self and cancel:self to sessions; add dev unpriv user (#923)
* Sessions support for read:self and cancel:self permissions. This is automatic with fallback; no API change is needed.

* Strips out values from listing if only self actions are allowed on the resource and the user ID is different. This prevents a default ACL of id=*;type=session;actions=read:self,cancel:self from causing all values to be visible when listing.

* Adds an unprivileged user to development/testing instances. This user has only default permissions plus the ability to authorize sessions in the default target.
2021-02-11 13:14:18 -05:00
Jeff Malnick 10a5f1b832 test: add tests for authorized-action (#893) 2021-01-29 08:04:46 -08:00
Jeff Malnick 76a891cfe2 tests: remove testing of revision output for now (#667) 2020-10-14 07:29:31 -07:00
Jeff Malnick e08ab98a2b tests: add CLI tests for version output (#664) 2020-10-13 12:34:38 -07:00
Jeff Malnick dfa94c7990 tests: allow overriding auth variables in CLI tests (#647)
* tests: ensure default user can connect to default target and ensure created target has intended host sets

* docs: update readme for CLI tests with how to run against arbitrary clusters

* feat: override auth variables in CLI tests
2020-10-13 07:41:32 -07:00
Jeff Malnick 7f48e2edc6 tests: ensure default user can connect to default target and ensure created target has intended host sets (#646) 2020-10-13 07:41:14 -07:00
Jeff Malnick 3c1670c0d0 tests: add scopes CLI tests (#645) 2020-10-12 21:15:49 -07:00
Jeff Malnick 70e696a446 tests: add roles CLI tests (#644) 2020-10-12 20:57:57 -07:00
Jeff Malnick cad8949ac8 tests: add host sets CLI tests (#643) 2020-10-12 17:00:34 -07:00
Jeff Malnick bee1412785 tests: add host catalog CLI tests (#639) 2020-10-12 16:44:45 -07:00
Jeff Malnick 0f1fbea8f7 tests: add hosts CLI tests (#638) 2020-10-12 14:56:23 -07:00
Jeff Malnick c4c1e108b0 test: add groups resource CLI tests (#633) 2020-10-12 14:40:32 -07:00
Jeff Malnick 90e1dbe444 tests: add bats tests for testing CLI on arbitrary Boundary deployments (#614) 2020-10-12 10:26:26 -07:00