Commit graph

7 commits

Author SHA1 Message Date
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