Commit graph

215 commits

Author SHA1 Message Date
Brian Joerger 7d2bd715c4
Add piv build dependencies (#16424)
* Add piv build dependencies.

  - Add LIBPCSCLITE build tag.

  - Add libpcsclite static linking using gravitational/pcsc fork.

  - Enable use of dynamic pcsc library with LIBPCSCLITE=dynamic.

  - Refactor CGOFLAG in Makefile.

  - Update Centos7 Dockerfile and drone.

* Refactor RELEASE_MESSAGE for readability. Now produces message like: "RELEASE_MESSAGE=Building with GOOS=linux GOARCH=amd64 REPRODUCIBLE= and with PIV support and without PAM support, FIPS support, BPF support, Windows RDP client, libfido2, Touch ID."

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2022-09-22 23:16:51 +00:00
Alan Parra 9bb0255a07
Update toolchain to Go 1.19 (#16479)
Update Go toolchain, allowing for a possible go.mod bump to 1.19.

Since Go 1.19 BoringCrypto is no longer a separate branch, but instead it's
enabled by a [GOEXPERIMENT][1].

Release notes: https://tip.golang.org/doc/go1.19.

[1]: https://cs.opensource.google/go/go/+/refs/tags/go1.19.1:src/internal/goexperiment/exp_boringcrypto_on.go;l=3

* Update Go in build.assets/
* Update Go in Drone
* Appease .sh linter
* Update FIPS images
* Update e/
* Simplify Centos7 FIPS image
2022-09-19 17:31:51 +00:00
Roman Tkachenko e8974ffbda
Bump Go to 1.18.6 (#16248) 2022-09-08 21:11:30 +00:00
Isaiah Becker-Mayer a67f5c3eb4
bumps rust to 1.63.0, fixes linting errors (#16056) 2022-09-06 13:17:31 +02:00
Trent Clarke 1f58333531
Build Teleport Connect for Windows (#15292)
Uses Drone to build Teleport Connect for Windows on a Native 
Windows builder.

This PR adds 2 pipelines to the Drone YAML:

1. `push-build-native-windows-amd64`: Invoked on a push to master, 
   branch/v*, etc., and asserts that Teleport Connect can be built, and
   
2. `build-native-windows-amd64`: Invoked when a branch tag is 
   committed to the teleport Repo. Builds Teleport Connect and uploads 
   it to dronestorage
   
These builds are run on a native windows builder (as opposed to tsh, 
which is built in a linux environment and cross-compiled for Windows)
2022-08-29 16:56:55 +10: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
Rafał Cieślak b4c94ebf9b
Add drone pipeline for building Connect with signed tsh.app (#15763)
* Add proof of concept of Connect pipeline

The proof of concept includes a lot of copy-pasted lines which will get
cleared up in subsequent commits.

* Extract copying artifacts into separate functions

The tag pipeline no longer needs to worry about Connect artifacts.

* Reuse steps to install & cleanup toolchains

* Share toolchain configuration commands between pipelines

* Share build commands among different pipelines

* Download webapps only if a pipeline builds Connect

As seen by the changes to .drone.yml, this removes unnecessary webapps
clones from these tag pipelines: build-darwin-amd64, build-darwin-amd64-pkg,
build-darwin-amd64-pkg-tsh. None of them needs webapps to function anymore
and the pkg pipelines never needed webapps in the first place.
2022-08-24 16:38:42 +02:00
Zac Bergquist ac4d7fe651
Build Teleport Connect for Linux (#15509)
In order to do so, we add a new make target:

    make teleterm

This (temporarily) assumes that the gravitational/webapps repo is
cloned at the right version as a sibling to the teleport repo.
(We'll be able to get rid of this when we merge webapps into Teleport)

Additionally, update dronegen to include the name of the calling
function that generated the snippet instead of the line number.
This gets rid of lots of superfluous diffs in the generated
.drone.yml file.

Lastly, rewrite the Go program for getting the right webapps version
in bash, because Go is not available at this step of the drone pipeline.

Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>
2022-08-23 13:57:22 -06:00
Logan Davis 830794a9cf
Replace quay.io with amazon ECR where appropriate (#15382) 2022-08-19 10:24:15 -05:00
Logan Davis 76606fc18b
Update buildbox to push to ECR (#15058) 2022-08-16 21:07:07 +00:00
Jakub Nyckowski c3dde989cc
Update protoc to v3.20.1 (#14097)
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2022-07-07 23:21:32 +00:00
Trent Clarke e3ced072b7
Trims the buildbox (#14036)
- Enables the docker BuildKit in an attempt to speed up builds
 - Trims slightly under 2GB off image size
 - Break more dependencies out into separate build stages
 - Adds some simple supply-chain protections for dependencies sourced
   via git. The Docker build now checks that the commit SHAs are what
   we expect, and not just assume that the tags haven't changed.
 - Moves the `cbindgen` build to a stage to avoid pulling in extra
   dependencies not needed for the Teleport build
 - Combines the `gcloud` and firestore emulator install into one step to
   reduce the layer count.
 - Ports some of the above the Centos7 Dockerfile.
2022-07-07 12:28:35 +10:00
Jakub Nyckowski d03f8db0ca
Use CentOS 7 for building release binaries (#14062)
Switch to CenOS 7 as a base for Teleport releases.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-07-02 02:11:37 +00:00
Zac Bergquist 8c7eb94c4b
Fix CentOS 7 builds after upgrading prost (#13579)
Recent Rust dependency upgrades include a newer version of prost.
This new version no longer ships embedded protoc binaries, and
instead tries to build protoc from source. This would require us
to install cmake on our buildboxes. We want to avoid this and
instead leverage the version of protoc already installed.

This change was made to the standard buildbox, but the CentOS 7
buildbox was missed.

Additionally, I noticed that Rust was installed in
Dockerfile-centos7-fips, but not in Dockerfile-fips, which means
the FIPS binaries have different functionality depending on which
version you use. To correct this, I removed Rust from the CentOS 7
FIPS builds (since the Rust features are not FIPS compliant anyway).
2022-06-17 15:05:39 +00:00
Zac Bergquist 895ed4d5dc
⬇️ downgrade Rust to 1.58.1 (#13544)
Newer versions of Rust increase our minimum GLIBC requirement,
which is not acceptable at this time.
2022-06-16 19:49:26 +00:00
Roman Tkachenko 683d11d23e
Update versions to 11 (#13528) 2022-06-15 23:28:08 +00:00
Alan Parra 29d3f80261
Use make release-windows on Drone, make it similar to make release (#13532)
Switch from `make release-amd64` to make release-windows in Drone builds, making
release builds similar to "regular" builds (that already use
`make release-windows-unsigned`).

Fixes current woes caused by FIDO2=yes in Windows release builds. (Note that
ARCH is implied by the build.)

* Use `make release-windows` on Drone, make it similar to `make release`
* Update .drone.yaml
2022-06-15 19:59:34 +00:00
Jakub Nyckowski c9277ab8f0
Add libbpf and Clang to Centos 7 image (#13261)
Enable BPF for CentOS 7 builds.

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2022-06-15 18:54:02 +00:00
Jakub Nyckowski b5ccc21aba
Update libbpf to 0.7.0-teleport (#13201) 2022-06-06 23:41:57 +00:00
Zac Bergquist 86f3a3d618
Build Teleport Connect on darwin/amd64 (#12257)
This commit updates drone to build Teleport Connect by:

* cloning `gravitational/webapps` as a sibling directory to
  gravitational/teleport
* checkout out the right version of webapps by running a simple
  Go program (this step is only necessary until we move webapps
  into the teleport repo)
* Running the Teleport Connect build and copying artifacts

Code signing should run on tag builds automatically as part the
electron build, assuming the Apple Account credentials are
properly loaded into the keychain.

Notarization will also happen automatically if both 
`$APPLE_USERNAME` and `$APPLE_PASSWORD` are set.

In order to make the above happen, this patch also includes:

* Installing and removing a per-build Node instance in the 
  toolchain directory on Darwin
* Moving the toolchain temporary directory out of ~/ and into /tmp.

Drone usually sets `$HOME` to a temporary directory for each build,
but unfortunately we need it to point to the actual build user's 
home directory in order for the notarisation tooling to find the
right keychain. Having $HOME point to a long-lived directory risks
both pollution from build detritus and builds stomping on one another.

In an in an attempt to isolate the builds from each other and protect
`~build` as best we can, as much of the build state as possible 
(including ephemeral toolchains) has been moved under `/tmp`.

Co-authored-by: Trent Clarke <trent@goteleport.com>
2022-06-03 12:19:42 +10:00
Zac Bergquist ff4c307453
Update to Go 1.18.3 (#13103) 2022-06-02 16:10:57 +00:00
Zac Bergquist 1286528748
Update Rust to 1.61.0 (#12779) 2022-06-01 22:24:21 +00:00
Zac Bergquist f0bb6b4fef
Update to Go 1.18 (#12578)
And update e ref to pick up gravitational/teleport.e#424
2022-05-11 11:23:50 -06:00
Alan Parra af3488211c
Reinstate FIDO2 builds for amd64/Centos7 and use pkg-config (#12093)
Reinstates Linux/amd64 and Centos7/amd64 builds using libfido2, now hidden
behind an explicit FIDO2 flag (similarly to FIPS).

This PR pulls in gravitational/go-libfido2#4 and adds the required pkg-config
setup so we can perform both dynamic (mostly testing) and static (tsh) builds.
Additionally, pkg-config is now the gateway for whether we run libfido2-related
tests (which should always happen in CI).

#9160

* Re-enable libfido2 builds for amd64 and Centos7
* Use pkg-config to build tsh with libfido2
* Install Centos7 libudev-zero to /usr/local/lib64
* Update gravitational/go-libfido2
* Remove /usr/local/lib from Centos PKG_CONFIG_PATH
2022-04-28 16:32:02 +00:00
Gus Luxton 8852a3e01d
docker: Add lint-helm to build.assets Makefile (#12178) 2022-04-26 12:01:01 +00:00
Alex McGrath c40d6dc701
Add enter-root to makefile (#12141) 2022-04-22 10:50:24 +00:00
Gus Luxton 6090379bce
docs: Don't lint external links when running in CI (#12058)
Original behaviour did not take effect in CI due to a different entrypoint.

This restores the original behaviour (which will link external links when using make -C build.assets test-docs) but disables the external linting in CI for reliability.

Updates #11940
2022-04-19 16:00:17 +00:00
Alan Parra 9c89c00806
Build tsh with static libfido2 in buildbox and Centos7 (#11849)
Build `tsh` with static `libfido2`, `libcbor`,`libcrypto` and `libudev-zero`.

Dockerfiles for buildbox and Centos7 changed. FIPS and macOS to be addressed at
a later date.

Add the `tsh fido2 diag` hidden command for ease of testing.

#9160

* Update go-libfido2 and tidy modules
* Add a fido2 diagnostic command to tsh
* Add a few build artifacts to .gitignore
* Build tsh with static libfido2 in buildbox
* Build tsh with static libfido2 in centos7
* Add a few relevant cmake flags
* Use illiliti/libudev-zero
* Do multi-stage build on centos7, image tweaks
* Add `make enter/centos7`
* s/OFf/OFF/g
2022-04-18 14:07:10 +00:00
Gus Luxton 0dac87080c
docs: Don't lint external links (#11940)
These tests are regularly registering false failures, likely due to rate limiting on the web hosts which are serving the external links.
2022-04-15 04:48:03 +00:00
Roman Tkachenko 715dbb8a5d
Bump Go to 1.17.9 (#11931) 2022-04-14 02:35:00 +00:00
Rafał Cieślak 6fb9f871a3 Add grpc-teleterm Makefile target
The grpc-tools package is needed to generate gRPC files for JavaScript.
However, at the moment it can't be installed on M1 MacBooks because of
missing prebuilt binaries for arm64. [1]

One of them, protoc, is already installed in our buildbox. We still need
to compile grpc_node_plugin from source though. This adds significant
overhead as we need to pull in cmake, build-essential and then about
300 MB of git repos from protocolbuffers/protobuf.

Initially, those Teleterm gRPC were generated within `make grpc` with other
files. M1 users who don't work on Teleterm would not be happy about incurring
that additional overhead, hence I extracted everything into separate target
and Dockerfile.

Teleterm proto files don't depend on any other proto files. Once grpc-tools
adds support for arm64, we'll be able to essentially almost revert this
commit and generate Teleterm gRPC files within `make grpc`.

[1] https://github.com/grpc/grpc-node/issues/1405
2022-04-01 13:02:56 +02:00
Alexey Kontsevoy 4d0c0b2c84 teleterm (alpha) 2022-04-01 13:02:56 +02:00
Zac Bergquist 3c74adf218
Add Helm unit tests (#11062)
* POC for Helm unit tests

This uses https://github.com/vbehar/helm3-unittest to define
expectations of our helm templates

* Test that enterprise is configured correctly

* Added tests for teleport-cluster

* Added tests for teleport-kube-agent

* Removed tests for teleport chart

* Add tests for teleport-cluster Deployment

* Run shorter tests first

* Fix Docker plugin installation and add update-helm-snapshots target

* Add README

* Fix lint syntax error and add some missing linters

* Add missing ImagePullPolicy to Deployment and StatefulSet

* Add Deployment tests for teleport-kube-agent

* Fix replicaCount logic

* Add clarification to values

* Add StatefulSet suite for teleport-kube-agent

* Update snapshots after merge with master

* Helm tests are quicker than bash tests

* Add tests for extraEnv

* Random space

* Tidy up formatting of multiple tests

* [debug] List helm plugins and directories

* Special case Helm linting when running in CI

* Make trailing line breaks consistent

* Special case Helm linting when running in CI

* Add contribution guidelines for Helm charts

* Add contribution guidelines to READMEs

* Deprecate old charts

* Typo

* Spacing

* Clarification

* Update examples/chart/CONTRIBUTING.md

* Don't erroneously set extraEnv for initContainers

* Rename update-helm-snapshots -> test-helm-update-snapshots for clarity

Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-03-20 19:01:58 +00:00
Trent Clarke 3beb29832f
Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611)
Prior to this patch the teleport buildbox version has been tagged with the Go version for the current release. This bit us during the Teleport 9 development cycle, as both Teleport 8 and 9 use the same version of Go but require different versions of Rust, and we were unable to distinguish between the 2 buildbox versions.

At the time, Teleport 8 was individually patched to create a new `teleport8` buildbox tag, decoupling the buildbox version from the Go version. This was never ported into master and now we find the teleport 9 branch sharing the same buildbox tag as master.

This patch forward-ports all the changes made to `branch/v8` and updates them for master, creating a new `teleport10` buildbox tag. The idea is that we will create a new tag for teleport11 at the same time the release branch for Teleport 10 is mad at some point in the future.

Once this is merged, Drone will create and push new buildbox images, which will become available for CI. A subsequent patch will update the CI scripts to use the new `teleport10` buildbox images.
2022-03-01 15:31:46 +11:00
Zac Bergquist eb487ce360 Remove CentOS 6 builds for Teleport 9 2022-02-15 18:40:48 -07:00
Brian Joerger d33f51d17f
x11 forwarding (#9897) 2022-02-04 23:47:03 +00:00
Zac Bergquist 2aba666dc9
Update to Rust 1.58.1 (#9985)
In Rust 1.58, deriving Debug no longer counts as using a struct's
fields, so we need to allow dead_code for our structs that implement
RDP protocols. (Just because we don't use the fields doesn't mean
we shoudln't decode them)
2022-01-28 02:34:45 +00:00
Jakub Nyckowski 538fcaa980
Remove devbox - build box now supports AMR64. (#9847) 2022-01-20 01:05:25 +00:00
Edoardo Spadolini c7797fcb1f
Don't shell out to go list when not needed (#9776) 2022-01-13 11:00:33 -05:00
Jakub Nyckowski e9450e32a3
Add ARM64 support for buildbox docker image (#9572)
* Update buildbox to use Python3.
* Remove non default rust targets from arm64 image.
* Add ETCD_UNSUPPORTED_ARCH for arm64 to etcd script to allow running etcd on arm64.
2021-12-29 03:33:22 +00:00
Joel a3ad9ca917
Fix devbox on AMD64 (#9462) 2021-12-16 23:26:19 +00:00
Edoardo Spadolini d027173547
Clean up make grpc and .pb.go generation (#9432)
* Ensure that slice.pb.go is generated by `make grpc`

* Clean up `make grpc`

* Disable the test target rules in Makefile when running inside the devbox
2021-12-16 22:20:53 +00:00
Joel 7951de5728
Split dev tools into a seperate docker container (#9410) 2021-12-15 20:11:52 +00:00
Zac Bergquist e2a0225c7c
Fix make grpc (#9252)
- Ensure that the protoc include directory is readable by all users
- Switch back to the root user by default

Either of these changes would have fixed the issue on their own,
but I decided to include both as GRPC should be readable by non-root
users, and I wanted to preserve the original behavior of running
as root unless the $(NOROOT) flags are specified.

Additionally: clarify comments on the make targets, which are
confusingly named, and stop installing goimports since it seems
it was never used.
2021-12-07 07:46:08 -08:00
Zac Bergquist 6808d6acb4 Create separate builds for CentOS7 (+fips)
Add new buildboxes for centos7 and centos7-fips.

For now, we will continue to support both CentOS 6 and 7.
Eventually we will drop support for CentOS 6, and the only
supported CentOS builds will be these new CentOS 7 builds.

Fixes #9028
2021-12-02 10:30:03 -07:00
Russell Jones 78b2c1e8b0 Fixed CentOS 6 builds.
Fixed issue that prevented Teleport 8 from being built on CentOS 6.
2021-10-25 10:52:55 -07:00
Russell Jones 675be8fc21 Updated Go to 1.17.2. 2021-10-22 14:01:25 -07:00
Russell Jones 073f50ccd4 Remove webassets before Enterprise images.
Call "clean" target to remove webassets before building images.
2021-10-18 17:29:37 -07:00
Zac Bergquist 11f9b4ea74
Specify platform when building our buildbox (#8429)
On Apple silicon, Docker will default to building arm64 images.
Some of the packages our image tries to install are only available
for amd64, so the build cannot complete.

This should have no impact for devs running on amd64, and makes it
possible for devs on Apple silion to run build tasks that require
the buildbox (generating protos, for example)
2021-09-30 14:14:06 -06:00
Tim Buckley c821ec5f2f
Sign tsh.exe on tag builds (#7897)
* Sign tsh.exe on tag builds

This adds a Makefile step to sign tsh.exe when the
`$WINDOWS_SIGNING_CERTIFICATE` env var is set to a base64-encoded
pkcs12 code signing certificate. The certificate must not be password
protected.

This includes a sample cert (`cert-dummy.pfx`) for CI pipeline
testing. It should be removed in any eventual PR, along with the
other modifications to the drone pipeline. The cert is imported into
the environment in the `Makefile` for testing purposes; in practice
it will be imported from a secure secret store (drone secrets, etc).

* Improve Windows code signing

 - Split signing into a separate step; `release-windows-unsigned` now
   performs the build, `release-windows` signs the binary.
 - Require `release-windows` to successfully generate a signed
   binary.
 - Clearly mark unsigned binaries and archives as such.
 - Guard against stdout secret leakage in Makefiles.
 - Move temporary cert data from Makefile into dronegen to test
   full pipeline.

* Use an invalid cert string for testing purposes.

* Pass certs to the build process via a statically named file

Signed Windows builds now depend on a `.gitignore`'d
`windows-signing-cert.pfx` at the root of the source directory. This
should ease testing and help avoid accidental secret leakage.

* Use production secret

* Remove windows-signing-cert.pfx before continuing to the next step

Additionally, fix variable reference as the bracket syntax does not
seem to play nice with Drone.

* Update .gitignore

Co-authored-by: Andrew Lytvynov <andrew@goteleport.com>

Co-authored-by: Andrew Lytvynov <andrew@goteleport.com>
2021-09-02 16:34:57 -06:00
Forrest Marshall 11dfefcdc5 disable build determinism in centos6 2021-08-23 17:42:09 -07:00
Forrest Marshall 9d2851e148 pipefail in make shell 2021-08-23 17:42:09 -07:00
Zac Bergquist 15cd08cbe0
Ensure that test-root is marked as a PHONY target (#7847) 2021-08-20 12:56:10 -07:00
Nic Klaassen c48ee9f062
Add support for HSM CA rotation (#7862) 2021-08-18 21:21:43 -07:00
Russell Jones e901ce4b3f Reduced shared library dependencies.
Reduced Teleport shared library dependencies on libbpf, libelf, libz.

For libbpf, switched to forked version that does not rely on "fmemopen"
which brings in a glibc 2.22 dependency. This allows binaries built on
Ubuntu 18.04 box to run on CentOS 7 as well.

For libelf and libz (which libbpf uses), the build process has been
updated to statically link both of them during the build process.
2021-08-09 19:17:06 -07:00
Gus Luxton 3a6a4d6c9d
bpf: Add build support to FIPS Dockerfile (#7407)
* bpf: Add build support to FIPS Dockerfile

* Expose libbpf version as a variable

* Unlock keychain for signing Mac Teleport pkg
2021-06-28 18:08:03 -07:00
Gus Luxton 09bab5cdfc
drone: Disable CentOS 6 FIPS builds for Teleport 7.0+ (#7408) 2021-06-25 12:23:24 -07:00
Gus Luxton feebcd97c0
drone: GOCACHE and docker:dind fix, round 2 (#7281) 2021-06-14 13:29:32 -07:00
Gus Luxton aa6112513c
drone: Add missing GOCACHE path for make image-ci (#7206) 2021-06-08 13:05:29 -07:00
Andrew Lytvynov 53094d87d2 makefile: explicitly set SHELL to /bin/bash
When `SHELL` is not set, `make` defaults to `/bin/sh`.

On systems where `/bin/sh` is an alias for `/bin/bash`, everything works
as expected.

On systems where `/bin/sh` is actually the original Bourne Shell, some
bash-isms don't work. For example: `if [[ condition ]]` results in
`/bin/sh: 1: [[: not found`
2021-06-04 00:12:27 +00:00
Eugene Yakubovich 585c33232b Move from BCC to libbpf with CO-RE. 2021-05-28 15:25:23 -07:00
Gus Luxton 219ff83050
docker: Restore Firestore emulator (#6901) 2021-05-25 07:47:18 -07:00
Gus Luxton 1743ea7210
docker: Override GOMODCACHE to always use a writable location (#6899) 2021-05-19 22:14:12 -07:00
Gus Luxton 91304f22db
Don't pull docsbox image if it's already present (#6228) 2021-05-17 11:43:22 -07:00
Gus Luxton 71ef02f70b
drone: use emptyDir for /var/lib/docker filesystem and prevent repetitive docker pulls (#6145) 2021-03-30 14:32:40 -07:00
Gus Luxton f1d34b3058
Remove ARM64 FIPS builds (#6236) 2021-03-30 13:21:14 -07:00
a-palchikov 633185b1cf
Bump linux FIPS builds to use go1.16.2b7 release (#6143)
* Update Go runtime to 1.16.2 and bump the boringcrypto version correspondingly for linux FIPS builds

* Address review comments

* Don't fail if buildbox image is not present

* Update other go1.15.5 references not yet handled by dronegen

* Build from source on CentOS 6

Co-authored-by: Gus Luxton <gus@goteleport.com>
2021-03-26 21:26:06 -07:00
a-palchikov d301da5a39
Embed webassets natively into teleport instead of attaching to the binary (#5935)
Switch to go1.16. Use embed package to embed webassets instead of ad-hoc attaching to binary
2021-03-26 17:37:52 -07:00
Gus Luxton 026d3419c2
dronegen: drone config generator (#6071) 2021-03-22 18:32:45 -07:00
Gus Luxton 1f93c23d7d
Add unit tests to teleport-generate-config AMI script (#5682) 2021-03-16 09:58:58 -07:00
Andrew Lytvynov eee051c4a6
grpc: use the regular buildbox and bump gogoproto version (#5879)
An extra dockerfile for gRPC generation is extra maintenance burden. It
was also using a really old base image that has a ton of known vulns.

Also, update GOGO_PROTO_TAG to match the version we have vendored via
go.mod.
2021-03-10 11:16:08 -08:00
Gus Luxton f962a04cb9
Run next linter on docs PRs (#5908) 2021-03-10 14:01:48 -04:00
Andrej Tokarčík 34d998bfb8
Run firestore tests as part of build.assets test target (#5830) 2021-03-04 20:57:27 +01:00
Acrimon 324ccda21f Implemented utmp/wtmp support. 2021-02-15 20:58:30 +01:00
Gus Luxton 8ec5b6c22d
Build ARM/ARM64 binaries in Docker (#5510) 2021-02-11 11:14:27 -04:00
Sasha Klizhentas 2e89009606 Removes -ti flag for docker builds of docs 2020-12-09 12:34:43 -08:00
a-palchikov 9b73af55ab
Fix local etcd backend tests (#4986)
* Fix etcd backend tests to properly skip if etcd is not requested/availalable
* Address review comments
2020-11-26 13:56:28 +01:00
Gus Luxton d1cd94535c
Bump Go to 1.15.5 (#4853) 2020-11-16 15:18:10 -04:00
Andrew Lytvynov 76d07d10cf
Bump Go to 1.15.3 (#4811)
* Bump Go to 1.15.5

* Downgraded Go version to 1.15.3.

* Sign .drone.yml

Co-authored-by: Russell Jones <rjones@gravitational.com>
Co-authored-by: Gus Luxton <gus@gravitational.com>
2020-11-16 18:36:17 +00:00
Gus Luxton 53cfda2fe0
Use tmpfs instead of disk storage (#4647) 2020-10-28 19:26:32 -03:00
Gus Luxton db2f48dc1e
More build pipeline fixes (#4201)
* Fix S3 upload path for FIPS artifacts
* Remove RUNTIME from RPM build
* Build full binaries for Docker images with webassets included
* Export correct variables for Enterprise builds
2020-08-13 14:28:09 -03:00
Andrew Lytvynov 05d7acd267 Downgrade buildbox from ubuntu 20.04 to 18.04
The glibc version requirement imposed by 20.04 doesn't mix well with
centos 7.
Ubuntu 20.04: glibc 2.28
Centos 7: glibc 2.17

As a result, teleport binaries build in the buildbox fail to start.
Going down to 18.04 seems to get us back far enough.
2020-07-21 18:35:11 +00:00
Gus Luxton b934d3b971
Add Docker builds to Drone (#4029) 2020-07-20 17:18:00 -03:00
Gus Luxton ca59ead882
Add RPM/DEB/i386 releases to Drone pipeline (#4006) 2020-07-16 21:43:18 -03:00
Andrew Lytvynov 2f45cef664 Update dockerized build to Go 1.14 2020-07-10 20:29:28 +00:00
Gus Luxton 3034a59c6e
Change to Ubuntu 20.04 base and improve apt cleanup (#4004)
* Change to Ubuntu 20.04 base and improve apt cleanup
* Update e ref
2020-07-10 17:07:56 -03:00
Gus Luxton 943e0d0b37
Various buildbox/Drone fixes (#3982) 2020-07-08 22:46:11 -03:00
Gus Luxton 5b9f4ec777 Remove failing CentOS 6 build steps 2020-04-29 11:29:42 -07:00
Andrew Lytvynov b994920aa8
Add make rules for linting (#3563)
Top-level `make lint` rule that scans everything and a CI-specific rule
for Jenkins.
Currently only enable "unused", since it's reliable. The list will
expand.

Also clean up stragglers that somehow slipped through in #3552.

Updates #3551
2020-04-10 11:37:09 -07:00
Russell Jones e76cd0ba3b Updated build tooling for CentOS 6. 2020-01-20 14:04:36 -08:00
Russell Jones 77e8b63470 Enhanced Session Recording.
Added package cgroup to orchestrate cgroups. Only support for cgroup2
was added to utilize because cgroup2 cgroups have unique IDs that can be
used correlated with BPF events.

Added bpf package that contains three BPF programs: execsnoop,
opensnoop, and tcpconnect. The bpf package starts and stops these
programs as well  correlating their output with Teleport sessions
and emitting them to the audit log.

Added support for Teleport to re-exec itself before launching a shell.
This allows Teleport to start a child process, capture it's PID, place
the PID in a cgroup, and then continue to process. Once the process is
continued it can be tracked by it's cgroup ID.

Reduced the total number of connections to a host so Teleport does not
quickly exhaust all file descriptors. Exhausting all file descriptors
happens very quickly when disk events are emitted to the audit log which
are emitted at a very high rate.

Added tarballs for exec sessions. Updated session.start and session.end
events with additional metadata. Updated the format of session tarballs
to include enhanced events.

Added file configuration for enhanced session recording. Added code to
startup enhanced session recording and pass package to SSH nodes.
2019-12-02 15:10:39 -08:00
Russell Jones 667ae84a8c Vendored bcc-tools 0.11.0 headers. 2019-12-02 15:10:39 -08:00
Gus Luxton c2e8fa19ad
Fix for CentOS 6 builds (#3179) 2019-11-26 14:15:28 -04:00
Gus Luxton 2dffdf2a50
Fixes for CentOS 6 builds (#3178) 2019-11-26 13:38:27 -04:00
Gus Luxton 926cdcc141
Add support for CentOS 6 builds in Docker (#3175) 2019-11-26 12:26:42 -04:00
Russell Jones e6a024b820 Upgrade Go to 1.13.2. 2019-10-24 15:16:04 -07:00
Gus Luxton b08034a908
Add FIPS Docker build support (#3046) 2019-10-16 13:31:46 -03:00
Russell Jones 040836a671 Upgrade to Go 1.12.1. 2019-05-21 10:22:13 -07:00
Ev Kontsevoy 51ab559872 Documentation improvements
- Faster docs build time due to parallel builds
- Added "agentless" entry to Q&A
- Documented -o flag support for `tsh ssh`. Closes #2330
2019-02-12 16:39:21 -08:00
Russell Jones 94c47d11a6
Update Makefile 2019-01-28 14:58:40 -08:00