Commit Graph
569 Commits
Author SHA1 Message Date
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
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
Hugo Shaka 0d6f7a422a Fix flaky test detetion for updater (#22690)
* Fix flaky test detetion for updater

* fixup! Fix flaky test detetion for updater
2023-03-07 04:49:01 +00:00
Hugo Shaka 3a9c96d37a kube-updater: initial commit (#22067)
This PR implements the core of the kube-agent-updater, which is part of
https://github.com/gravitational/teleport/issues/21516#issue-1576935859

In order to have a fully working updater we still need to:
- implement the interfaces for version retrieval, image validation and maintenance trigger
- add statefulset support (and deal with the potential deadlocks)
- implement the CI and release pipeline (Dockerfile, README, Makefile, github action, drone)
- integrate in the `teleport-kube-agent` helm chart

Those changes will happen in subsequent PRs.
2023-03-06 18:40:28 +00:00
Hugo Shaka 9e1f53d33a Move operator into integrations/ (#22618)
* Move operator into `integrations/`

* fixup! Move operator into `integrations/`

* fixup! fixup! Move operator into `integrations/`

* fixup! fixup! fixup! Move operator into `integrations/`

* fixup! fixup! fixup! fixup! Move operator into `integrations/`
2023-03-06 17:59:02 +00:00
Jakub Nyckowski 8329021148 Skip building webassets in CI (#22549)
* Skip building webassets in CI

Building webassets is not always needed and many of our CI build just builds them and ends up not using them after.
This PR skips building the webassets for all pipelines where they are not needed. This should save us some time and $$.

* Make some changes to trigger CI

* Create the missing directory
2023-03-03 15:14:25 +00:00
Jakub Nyckowski 942c0652d1 Move makefile BPF to common.mk (#22485)
Currently, a lot of makefile logic is copied between OSS end Ent repo. This PR moves BPF-related code to common.mk, so it doesn't need to be copied between reports. I'll move more code in the following PRs. I just want to keep diffs small.
2023-03-01 19:12:54 +00:00
Jeff Pihach 510b7c3ba9 Ignore all node_module paths when running shellcheck lint. (#22195) 2023-02-24 16:20:47 +00:00
Jakub Nyckowski 79683465fd Fix compilation on ARM (#22203) 2023-02-23 18:44:33 +00:00
Jakub Nyckowski 1b0b30e447 Create separate build tags for different arch (#21086)
Test ARM64 assets build

Use all available cores when building Clang

Add test trigger

Update assets buildbox name

Build all dependencies on ARM64 including BPF
2023-02-23 17:11:50 +00:00
Jakub NyckowskiandJeff Pihach a5ad9878b6 Add WEBASSETS_SKIP_BUILD to Makefile (#21833)
* Add WEBASSETS_SKIP_BUILD to Makefile

WEBASSETS_SKIP_BUILD allows skipping webassets build for development purposes. Teleport build in that mode displays blank page instead of WebUI, but the build significantly faster.

`make full` - always builds webassets
`make WEBASSETS_SKIP_BUILD=0` - works the same as `full`
`make WEBASSETS_SKIP_BUILD=1` - skips webassets build.

* Copy the root UI index.html file and serve it as it's used to fetch the config in the UI dev server.

---------

Co-authored-by: Jeff Pihach <jeff.pihach@goteleport.com>
2023-02-16 18:32:03 +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
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 1f85417d60 Always include webassets_embed when building teleport (#21601)
* Always include webassets_embed when building teleport

Currently, all builds should include webassets, so we can just hanrdcode this tag.

* Update e
2023-02-10 19:15:54 +00:00
Jeff Pihach 3f75acb163 Add license headers to web files that were missing it. (#21315)
* Lint the web files but not node_modules or vendored files.

* Add license headers to web files that were missing it.

* Add missing licenses.
2023-02-07 16:27:31 +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
Maxim KarasevandNoah Stride 0fbec70750 Add tbot to Makefile install targets (#19672)
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
2023-02-02 08:28:09 +00:00
Michael Wilson 6bf65b0f4d Add check if protos are up to date. (#21066)
* Add check if protos are up to date.

A new check has been added that will detect if protobufs are up to date. The
script will exit abnormally if protobufs need to be regenerated.

* Alan's feedback.

* Restoring the script.

* Update script comment.

* Add in the set -eu.

* Add a comment for the pull_request/merge_group bit in the new github action.

* Remove helper script.

* Reduce the runner size.
2023-02-02 05:54:20 +00:00
996a6b038d Conditionally build the UI if there are changes. (#20489)
* Conditionally build the UI if there are changes.

`ensure-webassets` and `ensure-webassets-e` will now build the UI if the
hash-of-hashes has changed since the last time the webassets were built.

* Update Makefile

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>

* Check for the existence of the make command.

* Choose a shasum exec from a preconfigured list or use an override.

* Shellcheck fix.

* Remove yarn.lock from sha calculation.

* Recalc SHA on successful build.

* Fix linting issues.

* Use Python instead of shasum.

* Remove unnecessary comments from sh file.

* Unconditionally rebuild if Python executable is not found.

* Revert "Unconditionally rebuild if Python executable is not found."

This reverts commit 9d2b0e3409.

* Revert "Remove unnecessary comments from sh file."

This reverts commit 600e02811b.

* Revert use of Python, use simplified shell scripting.

* Linting fixes.

* Apply suggestions from code review

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

* Remove reference to realpath as apparently the MacOS builder doesn't have it.

* calculate_sha must return 0.

* Use echo in calculate_sha or else set -o pipefail causes failures.

* Suppress SC2005.

---------

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-01-31 20:06:00 +00:00
Rafał Cieślak 6791b48da9 Remove grpc-teleterm Make target and Dockerfile-teleterm (#20032)
* Remove CLANG_FORMAT from Makefiles

It was used to format protos but we use Buf for that since v10.

* Move installing grpc_node_plugin into Dockerfile

This commit basically takes grpc_node_plugin compilation from
Dockerfile-teleterm and moves it to Dockerfile.

* Replace Dockerfile-teleterm with Dockerfile

After moving grpc_node_plugin compilation to Dockerfile, the only remaining
thing that Dockerfile-teleterm does is installing rpm so that we can make
an RPM package for Connect during tag builds.

Installing this package can be simply moved to Dockerfile.

* Remove grpc-teleterm Make target in favor of grpc

* Add updated protobufs

It looks like they're a result of someone changing protos in lib/prehog
without running `make grpc-teleterm` separately. Which is why we're getting
rid of grpc-teleterm as a separate Make target in the first place. ;)
2023-01-26 09:41:07 +01:00
Gavin Frazar 851ad027f7 remove quotes from messages in makefile (#20715) 2023-01-25 20:46:31 +00:00
Roman Tkachenko 6bcad73d69 rm -rf .cloudbuild (#20512) 2023-01-21 01:02:19 +00:00
Roman Tkachenko bf4ad5db62 Update version to 13.0.0-dev (#20372) 2023-01-18 19:01:11 -05:00
Jeff Pihach 34f102bdeb Enable building teleport with the new UI location (#20361)
* Changes for merging webapps into teleport.
2023-01-18 22:22:25 +00:00
Jeff Pihach 5c94974792 Temporarily ignore the web directory when linting for license headers. 2023-01-18 13:40:39 -06:00
Roman TkachenkoandVictor Sokolov a4967833e2 Add flaky tests detector. (#20320)
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2023-01-18 10:29:10 -08:00
fheinecke c23532cc00 Added Apple env var check (#20214) 2023-01-13 20:57:52 +00:00
fheinecke bbb652bf25 Added binary signing for darwin tarballs (#18719)
Added binary signing for darwin tarballs
2023-01-12 04:58:50 +00:00
Grzegorz Zdunek 584e96efe0 Report Connect usage events (#19564) 2023-01-10 18:17:21 +01:00
Rafał Cieślak 50213556db Use one Buf workspace instead of three (#19774) 2023-01-09 11:31:35 +00:00
Zac Bergquist 1716a15113 dronegen: remove tdr requirement (#19755)
Since the release of `tsh proxy app` we no longer need a
Teleport-aware Drone CLI and can leverage the standard
drone tool from https://docs.drone.io/cli/install/
2023-01-05 15:46:56 +00:00
Trent Clarke e2c795a4b1 Drone and tagging updates trigger GHA buildsfrom drone (#19830)
This patch performs the (hopefully final) switchover that will make drone
defer to GHA in order to build Teleport ion arm64.

This patch:
 - Replaces all of the Dronegen code to generate arm64 builds locally with
   steps that invoke the GHA builder workflow
 - Changes the release tagging behavior in the Makefile to tag `teleport.e`
   with the same tag as teleport. This is required to for Drone to identify
   the revision of the arm64 build workflow to invoke
 - Updates the e reference to include a revision of `teleport.e` that 
   contains the builder workflows

Thanks to everyone involved in getting this working.
2023-01-04 23:28:50 +00:00
Trent ClarkeandRoman Tkachenko d9ac0d43ae Update makefile with targets to build from GHA (#19637)
The existing `build.assets` makefile targets had the actual build steps 
coupled together with building the build box image. Because of how GHA
image builds work, we need to uncouple those tasks.

GHA also builds OSS and Enterprise teleports in parallel, so we needed 
a new target to build the Enterprise release without also automatically
building the OSS bundle in series.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-12-28 23:16:57 +00:00
Roman TkachenkoandVictor Sokolov 91f7030900 Add workflows that build tools on Mac OS and Windows (#19226)
Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2022-12-20 05:25:56 +00:00
Brian Joerger 68511c4a75 Add PIV tag to docker builds through drone. (#18266) 2022-12-12 19:56:19 +00:00
Hugo Shaka 207567b548 helm: use new helm-unittest plugin (#18964)
* Invoke helm plugins with correct path
* helm: breaking - change helm unittest plugin
* helm: document test plugin fork choice
* Add Makefile target checking helm plugins
2022-12-05 18:58:32 +00:00
fba02d9f9d Add a new usage reporter (#18142)
* [draft] Add a new usage reporter

This adds a new usage reporter service to the auth server. It's
disabled by default in OSS and can only be turned on via startup hook
in Cloud / Enterprise. In OSS, the audit log wrapper is never
configured and any usage events are sent to a no-op discard reporter.

Usage events are defined in prehog and can be sent to the new
UsageReporter Service on the auth server. An audit event wrapper is
used to capture certain events that are otherwise difficult to hook.
Events are anonymized before submission, then held in a non-blocking
queue for batching and submission purposes.

* Remove dead code

* Add SubmitUsageEvent RPC to Auth.

This adds a new SubmitUsageEvent RPC to the Auth API that external
clients (e.g. the UI) can use to submit usage events externally.

* Slight refactor for unit testing

* Add Prometheus metrics and add initial working prehog submitter

* Add more metrics, tweak prehog client, and add unit tests

* Further tweak http transport settings based on Teleport defaults

* Add missing metrics

* Fix goimports

* Add new UI usage events

* Update e ref

* Add prehog directly for now. Improve logging.

* update prehog

* Add new prehog events; use username from request identity

* add HTTP server for user events

* Add username back to pre-onboard events

* unauthenticated user events

* Fix userevent build error

* Use event-provided username where appropriate

* Move barebones prehog reqs to lib/prehog and generate here.

Also, use prod tunable values.

* Fix license lints

* De-flake tests by adding unfortunate amounts of synchronization.

* Add missing license header

* Misc PR cleanup for review

* Update lib/events/usageevents/usageevents.go

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

* Address a batch of review comments

Adds `anonymizer.AnonymizeString` and parent loggers

* Update e ref

* Clean up comments

* Remove onboard prefix from recovery code event

* Address another batch of feedback

* Use defaults.HTTPClient()

* Remove a noisy log message

* Demote noisy log message to debug

* Temporarily revert e ref for merge

Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2022-12-05 17:13:54 +00:00
Vitor Enes 0403a4eebb Improve error message if dialing etcd nodes times out (#18789)
If all etcd nodes are unreachable, Teleport exits with the following
message:
```
ERROR: initialization failed
context deadline exceeded
```

With this commit we get instead:
```
ERROR: timed out dialing etcd endpoints: [https://127.0.0.1:2381 https://127.0.0.1:12381]
initialization failed
context deadline exceeded
```

Note that if only some of the etcd nodes are unreachable, the etcd
client already provides a useful error message:
```
ERROR: initialization failed
failed to dial endpoint https://127.0.0.1:12381 with maintenance client: context deadline exceeded
```
2022-11-28 18:40:24 +00:00
Łukasz Kozłowski b6bbe28f3a Add FIPS support for Desktop Access (#18076) 2022-11-23 15:32:53 +01:00
Zac Bergquist 4046b65632 Support debug builds with TELEPORT_DEBUG (#18317)
For debug builds, we don't want to strip the symbol table of
DWARF debug information. Additionally, disable inlining and
other optimizations that may interfere with debugging.

See https://go.googlesource.com/vscode-go/+/HEAD/docs/debugging.md
2022-11-16 18:33:50 +00:00
Roman TkachenkoandVictor Sokolov d9bc3371c5 Install latest git to buildbox (#18498)
Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2022-11-15 19:44:12 -05:00
Jakub NyckowskiandAlan Parra bea2e89df5 Run GCI as make fix-imports (#17956)
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2022-11-04 15:46:46 +00:00
fheinecke 1472e9cf9e Added multiarch build support for Teleport (#17597) 2022-10-31 18:00:55 +00:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Brian Joerger 9725c405a5 Make PIV builds opt-in for Mac and Windows (#17767) 2022-10-25 16:35:34 +00:00
Zac Bergquist d5b8f94d8b Disable desktop access for 32-bit ARM and 386 architectures (#17537)
Devices running these architectures are likely not powerful enough
to handle desktop sessions. This will also reduce the binary size
for these builds, making them slightly more convenient for smaller
resource-constrained devices.
2022-10-20 22:39:58 +00:00
fheinecke 633b9582e7 Added multiarch build support for teleport-operator (#16688)
* Added multiarch build support for teleport oss, ent, and fips

* Exported image/imageTag types

* Resigned dronegen

* Removed remainder of testing changes

* Removed changes to submodules

* Reverted dockerfile-fips change

* FIxed docs wording

* Un-exported most constants

* Removed teleport.e makefile deb call

* Moved "sed | cut magic" to files

* Re-added `mkdir -pv /go/cache` to push.go

* Command deterministic order fix

* Added staging-only tag pipeline

* Moved PR to teleport operator to minimize potential issue impact

* Updated promote to pull and push without build

* Made cron triggers not affect canonical tags

* Added check for pre-existing tags on immutable CRs

* Added immutability check to manifests

* Updated staging ecr to only apply $TIMESTAMP tag on cron triggers

* Updated triggerinfo struct to use a triggerflag struct

* Fixed makefile after git mistake

* Makefile fix

* PR fixes

* Moved internal tools Go version to constant

* Separated container images gofile into multiple files

* Moved testing comment

* Added licenses

* Reorganized and added docs for container images

* Moved const to correct file

* Tag trigger logic test

* Testing specific fix

* Moved testing to v10.3.2

* Make semver dirs

* Refactored local registry name/socket

* Merged previous dockerfile changes

* Added TARGETOS TARGETARCH args

* Updatd tag to testing tag

* Promotion logic test

* Promotion fixes

* Testing specific fix

* Removed prerelease check for testing

* Added staging login commands to promote

* Fixed missing credentials on promotion pull

* Rerun tag test with new "full" semver

* Made staging builds only publish full semver

* Added semver logging command

* Empty commit to trigger Drone

* Promotion test

* Fixed preceeding v on promote pull

* Empty commit to trigger Drone

* Re-enabled verify not prerelease step on promote

* Cron trigger test

* Testing fix

* Testing fix 2

* Added sleep timer on docker buildx build

* Testing cleanup
2022-10-19 02:31:22 +00:00
Edoardo Spadolini aeb6f1d2e5 Better webassets embedding (#17058) 2022-10-06 08:36:23 +00:00
Roman Tkachenko dc94159be7 Bump version in master to 12.0.0-dev (#17104) 2022-10-06 01:51:59 +00:00