Commit graph

472 commits

Author SHA1 Message Date
Trent Clarke 75395e3a0d
Removes default 30-minute timeout from gh-trigger-workflow (#24178)
The `gh-trigger-workflow` will now default to waiting forever for a
GitHub Workflow to complete. A timeout can be optionally specified
if desired.
2023-04-11 01:29:40 +00:00
Alan Parra 8c91e33967
chore: Bump Buf from 1.16.0 to 1.17.0 (#24220)
Bump Buf to the latest version.

* https://github.com/bufbuild/buf/releases/tag/v1.17.0
2023-04-10 18:35:12 +00:00
Edoardo Spadolini 851cb6598e
Fix package names for v1 protos, misc proto changes (#24183)
* Delete teleterm's ptyHost/v1, added by mistake

* Add package name to protos conforming to PACKAGE_VERSION_SUFFIX

* use go run in buf-connect-go.gen.yaml directly

* Run protogen in place

* Run the buf-go generation off of go run

This also adds protoc-gen-go-grpc to go.mod
2023-04-06 22:53:31 +00:00
Alan Parra fc9191418f
chore: Bump Go to 1.20.3 (#24060)
* chore: Bump Go to 1.20.3

* Run `make dronegen`

* Update e/ reference
2023-04-04 21:11:32 +00:00
Cam Hutchison af8fe6f57a
release: Update build for product signing (#23820)
Update the build scripts to properly set up the key for signing packages
using `productsign`, and parameterise the bundle ID for packages in the
packaging scripts.
2023-04-03 00:30:48 +00:00
Alan Parra ac0abe7951
chore: Bump libfido2 from 1.12.0 to 1.13.0 (#23926)
* chore: Bump libfido2 from 1.12.0 to 1.13.0

* Bump OpenSSL on Dockerfile-multiarch
2023-03-31 21:04:01 +00:00
Alan Parra efd790b5f0
Migrate to OpenSSL 3.0 (#23810)
* Use OpenSSL 3.0.x (buildbox)

* Use OpenSSL 3.0.x (buildbox-centos7)

* Use OpenSSL 3.0.x (macOS)
2023-03-31 15:51:13 +00:00
Marco André Dinis f0fcf62fb2
Integration resource: add types and grpc methods (#23553)
* Integration resource: add types and grpc methods

This commit adds the new types for Integration resource.
It also adds the gRPC methods that will be used later on for:
- Integrations CRUD management
- Integrations resource caching

* decouple integration service from auth

* return resource on CRU operations

* Add OneOf prop to distinguish Integrations subkind

* Version subkind spec

* godocs
2023-03-31 15:20:51 +00:00
Alan Parra bde0446f87
chore: Bump Buf from 1.15.1 to 1.16.0 (#23863) 2023-03-30 20:05:55 +00:00
Hugo Shaka ba75bd9869
integrations: allow multiarch image builds (#23698)
* Remove unnecessary cgo and simplify image build

* Add a target outputting the buildbox image

* Use static distroless image as base image
2023-03-30 16:00:02 +00:00
Cam Hutchison 445f8b1e1e
release: Prepare for MacOS builds on GitHub Actions (#23407)
* release: Move Mac signing vars from script to Makefile

Move the variables for Mac signing from the `build-common.sh` shell
script to the `Makefile`. These vars will need to be passed to other
build processes to parameterize the signing for different GitHub Actions
build environments.

The switch on `ENVIRONMENT_NAME` allows different secrets to be
available in GitHub Actions for production (promote) vs developer
(build) builds. The default environment name is `promote` so as to be
compatible with the existing Drone setup, which does not define
`ENVIRONMENT_NAME`.

* release: Determine Mac signing key IDs automatically

Remove the hard-coded MacOS signing key IDs from the Makefile and find
them dynamically based on the name of the key. This allows GitHub
Actions to be set up with new keys different to the ones on the Drone
builders. As long as we keep the same name on the keys, we can rotate
the keys without needing to update the IDs in the Makefile.

This requires us to be more judicious about exporting the variables as
exporting them causes them to be evaluated. We do not want to evaluate
them on non-darwin targets, and on darwin, we should only evaluate it if
needed for a recipe. So use a dynamic `eval` in the recipes that need
the environment variables.

* release: Pass key & team ID to notarize tool

Override the hard-coded values in `notarize-apple-binaries` and pass the
values we get based on the GitHub Actions environment. This allows us to
sign and notarize software in a development branch more easily when
working on the signing and notarizing process. This will not happen
automatically, but it is expected that a developer can manually trigger
a workflow to perform building, signing and notarizing from a dev
branch where the workflow has temporarily changed the environment to
`build`.

A similar change to the `Makefile` in the teleport.e repository goes
with this change.

This adds a new bundle ID of `com.goteleport.dev` for the dev build of
Teleport. This follows the same pattern as used for the dev build of the
`tsh` binary and the current production bundle ID for Teleport.
Previously there was no dev signing/notarizing process for the set of
Teleport binaries.

* release: Add script to setup the MacOS keychain for signing

Add a script for setting up the MacOS keychain for signing applications
and packages. It encapsulates the `security` commands to add either or
both application keys and installer keys. The keys can be either
base64-encoded in environment variables, or `.p12` files on disk, making
it useful for local development.

* release: Split MacOS signing vars into separate mk file

Put the MacOS signing variables into a separate `.mk` file and include
it from the main `Makefile`. Add more comments to document the purpose
of the vars and where some of the values come from.

* release: Add some more comments to keychain-setup.sh

Explain that the purpose of the script is to be run on CI, but can also
be run manually.

Add the default values used to the usage message for the keychain and
password.

* Address PR comments on keychain-setup.sh script

* Change shebang to /bin/bash
* Use heredoc instead of multiple printfs for usage message
* Move `local` declaration next to setting of kpath var

* release: Export DEVELOPER_ID_APPLICATION in release-darwin

The sub-make for enterprise needs this to be set or it cannot sign the
enterprise binaries. Export it if we are doing signing/notarizing.
2023-03-27 03:11:35 +00:00
Alan Parra f6ce23b7cf
chore: Bump protoc-gen-go and protoc-gen-grpc-go (#22976)
Update to versions 1.30.0 and 1.3.0, respectively.

* https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.30.0
* https://github.com/grpc/grpc-go/releases/tag/cmd%2Fprotoc-gen-go-grpc%2Fv1.3.0
2023-03-20 04:49:56 +00:00
Jakub Nyckowski 96a13802d5
Add Node to amd64 bit target (#23115)
Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2023-03-17 18:14:14 +00:00
Rafał Cieślak 81f319d3e3
build.assets Dockerfiles: Remove unnecessary ENV NODE_URL, pass fsSL to curl (#23182)
* build.assets Dockerfiles: Remove unnecessary ENV NODE_URL

NODE_URL is being redefined within the RUN instruction anyway. We suspect
it might be causing problems because sometimes the logs from build failures
suggest that the NODE_URL export was either ignored or ${NODE_URL} passed
to curl reads ENV NODE_URL and not the env var set within the shell.

* Pass fsSl flags to curl
2023-03-16 15:40:55 +00:00
Łukasz Kozłowski 394b307efa
Update Rust to 1.68.0 (#23033) 2023-03-15 08:59:51 +00:00
Cam Hutchison 8dcab3f887
notarize: Accept parameters for dev and bundle ID (#23092)
Add a couple of parameters for the developer key ID and bundle ID for
signing/notarizing binaries. Keep the hard-coded values as defaults for
now, but we will remove these soon when all the call sites of the tool
have been updated to pass these values.

We want to parameterize these values so we can use different signing
keys in GitHub Actions and to make the tool agnostic to which binaries
it is signing.
2023-03-15 06:21:18 +00:00
Jakub Nyckowski 42c472af4a
(Buddy) Removed node from multiarch buildbox, added i386 and amd64 targets (#22979)
* Removed node from multiarch buildbox, added i386, amd64

* Bump github.com/aws/aws-sdk-go-v2/service/sts from 1.18.3 to 1.18.5 (#22292)

Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.18.3 to 1.18.5.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.3...config/v1.18.5)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sts
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Added Dockerfile-multiarch Dockerfiles

Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 18:00:20 +00:00
Jakub Nyckowski cbb556a05e
Change git merge-base method (#22974)
Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2023-03-13 16:14:50 +00:00
Alan Parra 1787ae657d
chore: Bump gci and golangci-lint (#22881)
* chore: Bump gci to v0.9.1

* chore: Bump golangci-lint to v1.51.2
2023-03-10 15:35:47 +00:00
rosstimothy 95d6d0fee1
Migrate GetCertAuthority to gRPC (#22624)
The HTTP client created by `auth.NewClient` has an idle timeout of
30s and each instance periodically gets cert authorities in
`TeleportProcess.syncRotationStateCycle`. If there has been no
activity when the ticker expires then the request will result in a
brand new connection to Auth to be established. This can cause a
spikes in open file descriptors on the Proxy when there are a large
number of instances connected via a tunnel.

To prevent periodic dialing when retrieving cert authorities the
endpoint has been migrated to the new Trust gRPC service. For now
only the get endpoint has been migrated but the rest of the CRUD
operations for cert authorities should be migrated from the HTTP
api to the gRPC service as well.
2023-03-10 14:32:34 +00:00
Vitor Enes 6a1d1aedc3
Emit new AgentMetadataEvent (#22068)
* Emit new `AgentMetadataEvent`

Part of https://github.com/gravitational/cloud/issues/3550.

This commits adds a new `UpstreamInventoryAgentMetadata` that is sent
from a Teleport agent to an auth server.
Once received, it is transformed into an `AgentMetadataEvent` and sent
to PreHog.

Most `UpstreamInventoryAgentMetadata` fields are intentionally kept as
empty in this PR. Follow up PRs will be opened with the mechanisms
required to fill them (as described in #21337).

* server_id -> host_id

* compute OS and host architecture

* Compute OS version and container runtime

* Close stream if agent receives an agent metadata message

* cmd -> exec ; file -> read

* implement fetchOSVersion for linux

* Remove unused import

* Add note about `agentMetadataCh`

* Allow commands with args

* Remove parseFun abstraction

* fetch glibc version

* fetch container orchestrator

* Fix lint

* Fix TODO

* Add note about glibc version

* cmd -> command

* fetch cloud environment

* fetch install methods

* GLibCVersion -> GlibcVersion

* Use `http.NewRequestWithContext`

* Add missing comment

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* GLibCVersion -> GlibcVersion

* Fix lint

* Fix helm unit tests

* Add missing comments

* 5 second timeout on http requests

* Spawn gorountine that fetches metadata on each new stream

* Use `defaults.HTTPClient()`

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Add missing import

* Handle error

* Revert "Spawn gorountine that fetches metadata on each new stream"

This reverts commit fe4f2790be.

* Send agent metadata to auth server once per stream

* Improve note about agentMetadataDone

* Don't process command output & file content on the agent

Since agents cannot be trusted, regex validation and sanitization should
happen in PreHog anyways. So this commit removes such logic in favor of
moving it to PreHog.

* Fix lint

* Trim space

* Move handling of `AgentMetadataEvent` to `handleControlStream`

* Use cached hello message

* Move metadata files to lib/inventory/metadata

* make sending of agent metadata more self contained

* Minimize diff

* Send all system roles to PreHog

* Remove unused import

* Add parsing of command output / file content back

* Usage reporter refactor

* Usage reporter refactor

* Add missing handling of inventory agent metadata msg

* Fix ICS usage reporter

* Improve comments

* Add cached `metadata.Get*` methods

* Use systemctl status instead of is-active

* Add `Metadata` struct

* return pointer in `FetchMetadata`

* Pass context to `GetMetadata`

* metadataFetchConfig -> fetchConfig

* GetMetadata -> Get

* Add note about `Get` result

* Ensure install methods are non-nil

* Exit `metadata.Get` if context is closed

* Replace sync.Once with atomic.Bool.Swap

* Initialize channel

* Fix lint

* Fix lint

* Make `metadata.Get` return an error instead of bool

* Allow multiple true/false values for env vars

* Use `strings.Cut`

* Use /etc/os-release ID instead of NAME

* Improve `autoEmitMetadata`

* Use `gnu_get_libc_version`

* Ubuntu -> ubuntu

* Use GOARCH

* gofmt

* Move import C up

* Variables may include quotes

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Default values for ID and VERSION_ID

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Blank lines are permitted

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Anonymize host id

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-10 12:45:29 +00:00
Alan Parra c141bc2e6e
chore: Bump Buf to v1.15.1 (#22841)
Update Buf to the latest version.

No format, lint or codegen changes.

https://github.com/bufbuild/buf/releases/tag/v1.15.1
2023-03-09 21:01:49 +00:00
Michael Wilson 2f9c1f562a
Introduce Okta gRPC and client interfaces. (#22733)
* Introduce Okta gRPC and client interfaces.

To support the upcoming Okta integration, Okta gRPC calls and client
interfaces have been added. This utilizes a non-legacy proto to try to
get away from our reliance on gogo.

This commit does NOT add the OktaImportRules and OktaAssignments to the
cache, which will occur in a later commit.

* Intermediary.

* Modifications needed in order to move this to enterprise.

* Remove okta service from grpcserver.
2023-03-09 16:15:51 +00:00
Michael Wilson 8e75660bd8
Interface for processing SAML IdP request signing on auth server. (#22670)
An interface has been created that will allow the signing of SAML IdP
requests on the auth server. This will eliminate the need for the SAML IdP
to have private key material.
2023-03-08 19:27:49 +00:00
Alan Parra 0155e1a083
chore: Bump Go to 1.20.2 (#22723)
* chore: Bump Go to 1.20.2

https://go.dev/doc/devel/release#go1.20.2

* Run `make dronegen`

* Update e/ reference
2023-03-07 21:07:57 +00:00
Trent Clarke a992e6fded
Distroless dockerfile and smoke tests for same (#21860)
* Distroless dockerfile and smoke tests for same

This patch adds a Dockerfile to `build.assets/charts` that will construct
a docker image for teleport based on the Distroless Debian images
published by Google. The actual workflows used to construct and publish
these images are defined in `teleport.e` for security reasons.

The Smoke Testing framework exists to make some quick assertions about
the resulting images: will Teleport even start in this context, etc. See
the included README for more details.

* Update README.md

* Linter appeasement

* Revert spurious submodule update

* Rename release component var

* Smoke test docs

* Smoke test docs

* Revert spurious subrepo update
2023-03-02 09:51:28 +00:00
Jakub Nyckowski 7e0479fa00
Use curl -fsS when downloading libbpf (#22425)
Related: #22380
2023-03-01 18:25:21 +00:00
Alan Parra 0ea9b9b377
chore: Bump Buf to v1.15.0 (#22430) 2023-03-01 15:10:39 +00:00
Tim Buckley f8681cf3d4
Make curl fail on server error when downloading binaries in buildbox (#22380)
* Make curl fail on bad URLs when downloading `buf` in buildbox

* Use `-f` everywhere, remove debugging

* `-f`-ify the other build.assets Dockerfiles
2023-02-28 22:28:25 +00:00
fheinecke 866ec12165
Added --artifact-version flag to OS package repo tool (#22104)
* Added `--target-cloud` flag to OS package repo tool

* Updated OS package repo tool to use "version channel" instead of "artifact version"

* Added help flag examples
2023-02-28 19:04:44 +00:00
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
Justinas Stankevičius d89879c2f5
Add gRPC service definition for Plugin resources (#21750)
* Add plugin exchange service

* Add Plugin methods to auth

* Add gRPC-layer methods for Plugin

* Add RBAC presets for Plugin

* Test GetPlugin()/NoSecrets access

* Make error assertions more correct in role test

* Deny setting credentials if user can not read them

* gofmt

* Apply minor suggestions from code review

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Move dependency into an existing block in go.mod

* Improve error messages for failed type assertions

* DRY WithSecrets access checks for Plugins

* Run new tests in parallel

* Improve error assertions in auth_with_roles_test

* TestGetPluginWithSecrets: split cases to subtests

* Clean up test servers and clients

* Add proto for plugin service

* Remove Plugin methods from auth service

Moved to a dedicated service

* Remove plugin-related auth methods

Moved to a dedicated service in Enterprise

* Remove CreatePlugin test from auth_with_roles_test

Moved to a dedicated service in Enterprise

* Pass "backend getter" to local plugins service

This pattern is used in Enterprise to set up secondary services
before auth (and backend) are created.

* Rename InitialCredentials to BootstrapCredentials

* Add plugins service to genproto.sh

* Reformat generated proto

* Remove obsolete PluginExchangeService

The equivalent of this is now in Enterprise

* Add kube service to genproto.sh; regenerate

* Add ListPlugins to plugin backend service

* Reimplement GetPlugins on top of ListPlugins

This is a "convenience" implementation for the backend service layer.

* Replace GetPlugins with ListPlugins in gRPC schema

* Fix ListKubernetesResources unit test

* Simplify plugin pagination key to just the name

* Use existing constant for page size

* Make dummy clients return errors instead of panic

* Remove obsolete field

* Ensure go.mod is valid for corresponding e changes

* Fix passing mutex ref

* Move teleport-plugins import to e_imports

* Revert oauth change in go.mod

* Use limit+1 to look-ahead when paginating plugins

* Test plugin pagination with pageSize > numPlugins

* Add descriptive messages to gRPC dummy clients

* Plugin: add RW for editor; remove secrets from gRPC

* Make message more descriptive for dummy gRPC conn

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2023-02-23 14:32:41 +00:00
Marco André Dinis 552d672822
Install deb/yum repos when using node-join script (#21717)
* Install deb/yum repos when using node-join script

When a repo is available for the current Linux distro/version, use it
instead of just installing Teleport from the deb/rpm files.

It fallsback to the traditional binary installation when the repo is not
available.

* comment /etc/os-release

* remove sudo; add comment to runners

* improve is_repo_available function
2023-02-21 19:08:18 +00:00
Tobiasz Heller 970dfd3738
Update Go toolchain to 1.20.1 (#21911) 2023-02-16 14:31:44 +00:00
Jakub Nyckowski 71176c598b
Add enter-root/centos7 to build.assets/makefile (#21834)
Fix enter/centos7 to use centos instead of ubuntu.
2023-02-15 17:50:47 +00:00
Jakub Nyckowski 5f87676303
Fix git installation path - Docker CentOS 7 image (#21884)
My previous PR https://github.com/gravitational/teleport/pull/21660 broke the git installation path, as `git` compiles in the `--prefix` provided during configuration. Using`DESTDIR` with `make install` instead of `--prefix` copies the file in the intermediate container with the correct path.
2023-02-15 17:29:50 +00:00
Jakub Nyckowski e62ff82183
Unify x86/ARM64 build process (#21660)
* Unify x86/AMD64 build process

Currently, our ARM64 pipeline builds limited subset of Teleport features as none of the 3rd party dependencies (openssh, libbpf etc) are not built on AMR64. This change build all dependencies on AMR64 in the same way as we do on x86.

FIPS changes are not included as we do not support FIPS on ARM64.

* Apply suggestions from code review

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-02-15 15:38:59 +00:00
Roman Tkachenko 6d3b67714a
Fix assets sha calculation to make it work equally on all platforms (#21822)
Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2023-02-14 19:17:38 +00:00
Alan Parra 1624d9807a
Bump Buf to v1.14.0 (#21802)
Keep up with latest releases.

No format, lint or codegen changes.

* https://github.com/bufbuild/buf/releases/tag/v1.14.0
2023-02-14 17:06:14 +00:00
Jakub Nyckowski caddc88262
BPF build fix (#21770)
* BPF build fix

https://github.com/gravitational/teleport/pull/21745 switched CentOS 7 image to the upstream, but I missed a few other places were we're using our fork.
This change fixes all places.

* Add missing FIPS changes

* Update e
2023-02-14 00:34:26 +00:00
Jakub Nyckowski 7447984ca4
Update to libbpf 1.0.1 (#21745)
Update to libbpf 1.0.1 and github.com/aquasecurity/libbpfgo v0.4.5-libbpf-1.0.1. As we're building our releases on CentOS 7 anyway we can also switch to mainstream libbpf instead of using our fork.
2023-02-13 21:29:41 +00:00
Jakub Nyckowski d1be9b1a57
Install libbpf 1.0.1 in buildboxes (#21596)
* Install libbpf 1.0.1 in buildboxes

* Remove unused deps when building libbpf
2023-02-13 14:15:54 +00:00
Roman Tkachenko 29b51a76aa
Switch to ghcr docs image (#21687) 2023-02-10 23:28:21 +00:00
Zac Bergquist c924be5c6d
Refer to tsh apps subcommand (#21431)
The `tsh appps` family of commands is aliased to `tsh apps`, so both
invocations work correctly. The command itself is defined as `tsh apps`,
so this is what appears in the help message.

Update references to `tsh app` to recommend `tsh apps` instead so that
there isn't confusion when browsing `tsh help` and looking for a missing
`app` subcommand.

Fixes #21367
2023-02-10 21:40:55 +00:00
Jakub Nyckowski 20f5d0b3e0
Move CentOS 7 assets to GitHub repo (#21435)
Moving our CentOS build assets, aka Clang-10 is the first step to enabling our full Teleport to build on ARM64. This change should also save us some $$ as getting the assets from S3 sounds expensive.
2023-02-10 15:46:36 +00:00
Rafał Cieślak 94ec267823
Update JS grpc-tools to 1.12.4 (#21452)
* Update JS grpc-tools to 1.12.4

1.11.2 didn't have support for arm64 so we had to do all this extra stuff
in the Dockerfile.

1.11.3 added support for Darwin arm64 and 1.12.4 finally adds support for
Linux arm64. This means we can completely remove extra cruft and just
install grpc-tools 1.12.4 on all architectures.

* Add comment to ptyHostService.proto
2023-02-09 07:40:45 +00:00
Jakub Nyckowski 79ebdc89c8
Bump golangci-lint to v1.51.1 (#21440) 2023-02-08 00:44:08 +00:00
Alan Parra bb5f828cd8
Bump OpenSSL and libcbor (#21420)
* Bump libcbor to v0.10.2

* https://github.com/PJK/libcbor/releases/tag/v0.10.2

* Bump OpenSSL to 1.1.1t

* https://github.com/openssl/openssl/blob/OpenSSL_1_1_1t/CHANGES
2023-02-07 18:58:54 +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
Justinas Stankevičius 6213ccf42d
Add Plugin resource schema, methods (#20990)
* Add Plugin resource schema, methods

* Improve shebang of genproto.sh

Execute using bash, no matter where it actually lives

* Use Metadata.Expiry()

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Remove field reservations from PluginStatusCode

* Add plugin (un)marshaling

* Snake case fields of Plugin (and children)

* Ensure timestamp fields on Plugin are always UTC

https://github.com/gogo/protobuf/issues/519

* Rename credentials according to proto conventions

* Fold check for nil settings into the type switch

* Remove extraneous field checks

These are set in setStaticFields()

* Add missing godocs

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-03 11:04:53 +00:00