Commit Graph
9 Commits
Author SHA1 Message Date
rosstimothy 48fe7172c0 Rename ProxyService to TransportService (#22405)
Changes the name to better align with the naming used by the rest
of the feature and to prevent ambiguity as the term proxy is quite
overloaded. This has not landed in a release yet so there are no
backward compatability concerns as nothing serves or consumes this
api yet.
2023-02-28 18:40:06 +00:00
Rafał Cieślak 3ac5a0aedb Refactor prehog & teleterm protos to match project conventions (#20810)
* Adjust go_package of lib/prehog Go protobufs

This makes them follow the pattern set out by api/proto and proto.

* Adjust go_package of lib/teleterm Go protobufs

* Use single buf.gen.yaml to generate JS protos

This also entailed changing the location of lib/teleterm protos and changing
the value of their package specifier to match the conventions in other parts
of the codebase. This is a breaking change but that is fine for Connect
as the protos are used locally only and each build ships with matching
protobufs.

* Make web/packages/teleterm use protobufs from gen-proto-js

We used to copy protobufs over to web/packages/teleterm/src/services/tshd
since webapps used to be in a separate repo.

This is no longer the case, so we can just make teleterm use protobufs
from gen-proto-js.

* Move prehog & teleterm protos into proto/teleport/lib

* Generate JS protos to gen/proto/js

* Move lib/teleterm Go protobufs to gen/proto/go

* Move lib/prehog Go protobufs to gen/proto/go

* Rename lib/teleterm proto package

* Re-enable linter rules for teleterm & prehog

* Update prehogv1 path in usagereporter_test.go

* Use except instead of ignore_only to allow Google API-style responses

* Add UNARY_RPC to api/proto & proto

* Ignore gen/ when running addlicense

* buf-js.gen.yaml: Remove comment about lack of go_package for JS

* Move prehog protos to proto/prehog/v1alpha

* Adjust prehog's go_package to match proto package
2023-02-03 14:47:06 +00:00
Lisa Kim 48a5d786ff Add device trust event type conversion (#20163)
* Moved device trust event related code to
  events.proto to solve import cycling
2023-01-13 19:57:53 +00:00
Alan Parra 62dbe3ecfd Add trusted device to the events.UserMetadata proto (#20079)
Add the trusted device to UserMetadata, thus enabling audit logs to contain the
device in use.

gravitational/teleport.e#514
2023-01-11 22:12:24 +00:00
Alan Parra 66fb45ec15 Add DeviceEvent and supporting constants (#17896)
Add DeviceEvent for registered/trusted device audit logs.

gravitational/teleport.e#514
2022-11-01 17:15:24 +00:00
Alan Parra 02315f50d3 Bump Go tooling (#17721)
Updates:

* Buf: 1.8.0 -> 1.9.0
* golangci-lint: 1.50.0 -> 1.50.1

Release notes:
* https://github.com/bufbuild/buf/releases/tag/v1.9.0
* https://github.com/golangci/golangci-lint/releases/tag/v1.50.1

Additionally, add a fixed version for googleapi protos (noop change) and
reformat protos using the new Buf version.
2022-10-25 17:05:38 +00:00
Alan Parra 8a25dc9755 Add Device Trust protobuf definitions (#17302)
Add definitions for Device Trust RPCs.

DeviceTrustService is fairly isolated from other services, so it is generated
using plain `protoc-gen-go` instead of Gogo.

teleport.e#514

* Add Device Trust proto definitions
* Allow proto generation without gogo
* Drop Gogo from lib/multiplexer protos
* Update generated protos
* Tidy modules
2022-10-11 22:21:38 +00:00
Alan Parra fbc135e672 Add comment and import cycle proto linters (#16082)
Require top-level proto types to have comments and introduce import cycle linter.
2022-09-02 13:31:45 +00:00
Alan Parra 0b76b44973 Use to Buf to lint, format and generate api/ protos (#15856)
Change the proto layout of `api/` to a more standard setup, allowing the use of
modern tools (like Buf) to format/lint (and maybe, one day, generate sources).

The new layout looks like this:

``` api/ proto/       <- root of protos and proto imports teleport/  <- base
package for Teleport protos (akin to "google/" or "gogoproto/") legacy/  <- root
of "legacy" protos (most linters disabled) client/ proto/ types/ events/
webauthn/ wrappers/ ```

Non-legacy `api/` protos are expected to follow this layout:

``` api/ proto/ teleport/ mynewpackage/  <- package name v1/          <- protos
explicitly versioned gen/      proto/  <- root for generated sources
(multi-language possible, separate from hand-written code) go/ mynewpackage/ v1
<- generate Go sources go here. ```

Some outstanding issues, like lack of `go_package` declarations and non-standard
import paths (`import "github.com/gravitational/teleport/.../some.proto"`) are
fixed.

Legacy protos still have irregular package declarations. It's possible to fix
that, but it's a bit harder to reason about, as generated sources change in
possibly-meaningful ways.

Future iterations could change legacy packages to match the directory structure
and apply a similar change to protos within lib/ packages, but this seems
sufficient for a first step.

* Add Buf to buildbox
* Unify API protos under Buf
* Fix proto generation
* Reformat protos
* Update generated protos
* Generate protos using Buf
* Appease linter
* Review: make sure gogo protobuf versions are in sync
* Clean leftovers from previous attempts
* Fix operator/Makefile
* Rename internal make gRPC targets to `*/host`
* Sort `make fix-license` targets (nit)
2022-08-26 18:11:38 +00:00