Commit graph

391 commits

Author SHA1 Message Date
Gus Luxton 8ec5b6c22d
Build ARM/ARM64 binaries in Docker (#5510) 2021-02-11 11:14:27 -04:00
Gus Luxton e7efa6738a
Add linting for Helm charts with example values (#5495) 2021-02-08 17:08:05 -04:00
Andrew Lytvynov 075c3fa2bb
Fix windows cross-compilation with CGO (#5485)
Install `mingw-w64` cross-compiler toolchain in the buildbox and pass
magic flags to `go build` to use it.
2021-02-04 13:30:32 -08:00
Andrew Lytvynov 4b5bb54bf4
u2f: restructure MFA backend to support multiple devices (#5404)
Each user can now have multiple devices. This commit only changes the
backend structure to support it, the client and API haven't been updated
yet.

Also added a migration for existing MFA data on auth server startup.
2021-02-01 17:30:39 -08:00
Roman Tkachenko 722cdeaadf
Release 6.0.0-alpha.2 (#5389) 2021-01-22 12:15:13 -08:00
Roman Tkachenko 7277e23df9
Release 6.0.0-alpha.1 (#5312) 2021-01-15 11:55:55 -08:00
Brian Joerger 64f80f1d1a
Move proto files and other select files from lib/events package to api/types/events package. (#5251) 2021-01-14 16:13:17 -08:00
Brian Joerger ab3d1a11da
Move /lib/wrappers to /api/types/wrappers. (#5286) 2021-01-14 14:58:44 -08:00
Brian Joerger 3c3ce160d9
Move API types and functionality from lib/services to api/types. (#5143) 2021-01-11 10:02:34 -08:00
Gus Luxton bdbe10ed1d
Update Makefile version on master branch (#5220) 2021-01-06 10:46:06 -04:00
Forrest Marshall fff0addc35 fix grpc target 2020-12-31 09:57:05 -08:00
joerger f020f75078 Refactor API client into a separate package. 2020-12-29 10:06:37 -08:00
a-palchikov 7c87576a8b
flaky tests: consistent logging (#4849)
* Update logrus package to fix data races
* Introduce a logger that uses the test context to log the messages so they are output if a test fails for improved trouble-shooting.
* Revert introduction of test logger - simply leave logger configuration at debug level outputting to stderr during tests.
* Run integration test for e as well
* Use make with a cap and append to only copy the relevant roles.
* Address review comments
* Update integration test suite to use test-local logger that would only output logs iff a specific test has failed - no logs from other test cases will be output.
* Revert changes to InitLoggerForTests API
* Create a new logger instance when applying defaults or merging with file service configuration
* Introduce a local logger interface to be able to test file configuration merge.
* Fix kube integration tests w.r.t log
* Move goroutine profile dump into a separate func to handle parameters consistently for all invocations
2020-12-07 15:35:15 +01:00
Gus Luxton 626624d46e
Only test internal docs links with milv via Makefile (#4830) 2020-11-19 20:21:05 -04:00
Gus Luxton 2795df3f6a
Various AMI fixes (#4744) 2020-11-17 10:49:56 -04:00
Gus Luxton abe2b607d5
Add support for RPM signing via Drone (#4634) 2020-10-31 15:27:00 -03:00
Andrew Lytvynov bd974ef09a
golint: final batch of fixes (#4589)
And enable `golint` during `make lint`.
2020-10-22 00:13:09 +00:00
Gus Luxton 4247920dfd
Update master version and add missing CHANGELOG entries (#4484) 2020-10-13 14:30:07 -03:00
Gus Luxton 434775692a
Revert "Fix shellcheck quotation warnings" (#4477)
This reverts commit f06e9204d1.
2020-10-07 14:00:02 -03:00
Sasha Klizhentas c1b1c6a154 Improves logging and error handling in filesessions.
Adds chaos tests for async file upload.

Fixes playback for legacy sessions stored unpacked on disk
2020-10-06 13:41:17 -07:00
Andrew Lytvynov f06e9204d1 Fix shellcheck quotation warnings
And enable all shellcheck checks in CI.
2020-10-06 17:32:38 +00:00
Gus Luxton 20d3dd3b68
Update Teleport Helm/Terraform/CloudFormation to 4.3.7 (#4453) 2020-10-05 18:28:40 -03:00
Gus Luxton d77d53ec2c
Release 4.4.0-alpha.1 2020-09-30 18:00:11 -03:00
Andrew Lytvynov a3d3f2aa1d k8s: enable SPDY pings on in/outbound connections
This helps with ELB and similar L5 load balancers that don't respect
TCP-level keep-alives. ELB for example kills connections after 60s of no
application traffic.

With this PR, you can leave a `kubectl exec` session open indefinitely
without any activity.
2020-09-29 21:04:02 +00:00
Andrew Lytvynov 8d7a217089 Run shellcheck during "make lint"
Shellcheck is a linter for shell scripts. Since we have quite a few of
those for release packaging and examples, we'll benefit from an extra
set of (robot) eyes.

Note: I disabled https://github.com/koalaman/shellcheck/wiki/Sc2086 to
make this PR smaller. That specific check is for the most frequent
mistake in our scripts - not quoting env var expansions. I'll do a
separate PR cleaning those up.

`build.assets/pkg` is no longer used and was removed.
2020-09-29 20:40:16 +00:00
Sasha Klizhentas d160507430 Session streaming
This commit introduces GRPC API for streaming sessions.

It adds structured events and sync streaming
that avoids storing events on disk.

You can find design in rfd/0002-streaming.md RFD.
2020-09-28 23:08:56 -07:00
Gus Luxton 8d1903df9d
Split Docker/AMI jobs into separate build and publish steps (#4313) 2020-09-21 14:34:50 -03:00
Ev Kontsevoy 7412d310f0
SEO changes in Documentation (#4215)
* SEO changes in Documentation
* All documentation pages have dedicated <title> tag
* All documentation pages have dedicated <meta description> tag
* Fixed a few broken links
* Fixed missing <H1> tags
* Renamed some pages to make SEO-friendly URLs
* Found and updated all links to the renamed pages
* Compress PNGs

Co-authored-by: Ben Arent <ben@gravitational.com>
2020-08-17 09:42:18 -07:00
Gus Luxton c13fb1439a
Add jobs for Drone MacOS/ARM exec runners (#4093) 2020-07-24 17:46:20 -03:00
Gus Luxton b934d3b971
Add Docker builds to Drone (#4029) 2020-07-20 17:18:00 -03:00
Andrew Lytvynov 16031edaff Remove godep references and add docs for modules 2020-07-17 16:09:23 +00:00
Gus Luxton ca59ead882
Add RPM/DEB/i386 releases to Drone pipeline (#4006) 2020-07-16 21:43:18 -03:00
Gus Luxton 048da3cce1
Update master branch version tag (#3880)
* Update master branch version tag to master

* Use 4.4.0-dev as version
2020-06-25 15:42:48 -03:00
Andrew Lytvynov 6746213886 Preserve SSH signing alg for existing CAs
Store the signing algorithm along the CA private key. When reading old
CAs that don't have it set, default to UNKNOWN proto enum which
corresponds to the old SHA1-based signing alg.

The only time you get a SHA2 signature is when creating a fresh cluster
and generating a new CA. This can be disabled in the config.
2020-06-24 21:25:33 +00:00
Ben Arent 3976a99771
Teleport 4.3 Docs (#3423)
* Base fork for 4.3 docs

* [docs] external email identities and Kube Users (#3628)

* Base fork for 4.3 docs

* [docs] external email identities and Kube Users (#3628)

* Remove trailing whitespace from docs files

Some editors will do this automatically on save. This causes a lot of
diffs when editing the docs in such an editor.
Clean them up once now and we'll try to keep it tidy going forward.

* Add make rules for docs whitespace and milv

docs-test-whitespace: checks for trailing whitespace in all .md files
  under docs/.
docs-fix-whitespace: removes trailing whitespace in all .md files under
  docs/.
docs-test-links: runs milv in all docs/ subdirectories that have
  milv.config.yaml.
docs-test: runs whitespace and links tests, used during `make docs`

* Document the new `--use-local-ssh-agent` flag for tsh

The flag is used to bypass the local SSH agent even when it's running.
Specifically, this helps with agents that don't support certs.

The flag was added in #3721

* Remove pam_script.so docs from SSH PAM page

With #3725 we now populate teleport-specific env vars in a way that's
accessible to `pam_exec.so`. There's no longer any reason to install
pam_script.so separately and duplicate our docs.

Updates #3692

* Using the correct --insecure-no-tls flag

* Run docs-fix-whitespace make rule in a busybox container


* Fixes #3414

Co-authored-by: Andrew Lytvynov <andrew@gravitational.com>
Co-authored-by: Gus Luxton <gus@gravitational.com>
Co-authored-by: Steven Martin <steven@gravitational.com>
Co-authored-by: Gus Luxton <webvictim@gmail.com>
2020-06-17 17:09:41 -07:00
Andrew Lytvynov cf63314e34 Add gosimple to the list of enabled linters
All findings have been fixed.
2020-05-27 19:36:38 +00:00
Andrew Lytvynov 732dfd5a64 Revert changes to truth tables
The team is split on style preferences here. Revert to the original
switch format and disable the relevant check.
2020-05-15 16:32:45 +00:00
Andrew Lytvynov a7c1a8c065 Enable new linters: ineffassign, unconvert, misspell
All findings have been fixed and `make lint` returns no errors.
2020-05-11 16:44:27 +00:00
Andrew Lytvynov e426dd1027 Enable staticcheck in make lint
Pull in the last fixes from e/ and enforce the linter.
2020-05-06 00:02:02 +00:00
Andrew Lytvynov 9cfc25a390 Build binaries for docker images within docker
When building binaries locally, they get linked against a local version
of libc. This makes the resulting binary change based on which machine
it was built on.
By always building in docker, we use the libc version from the build
container, so at least it's predictable.

Ensure main Makefile dependencies are correctly spelled-out so that
`make image` doesn't use stale local binaries. Binaries should always
get rebuilt, with docker.
2020-04-29 23:41:26 +00:00
Andrew Lytvynov 7ccdd87496 Enable more Go linters: varcheck,bodyclose,structcheck
All changes should be noop, except for
`integration/integration_test.go`.

The integration test was ignoring `recordingMode` test case parameter
and always used `RecordAtNode`. When switching to `recordingMode`, test
cases with `RecordAtProxy` fail with a confusing error about missing
user agent. Filed https://github.com/gravitational/teleport/issues/3606
to track that separately and unblock enabling `structcheck` linter.
2020-04-24 15:52:43 +00:00
Andrew Lytvynov 5b916564ef Install pre-built golangci-lint binary for jenkins
https://github.com/golangci/golangci-lint#go cautions against using go
get due to various problems. Downloading a binary also saves on
compilation time and image size.

Also, increase timeout to 5m, linting the repo can take a while on a
throttled CPU.
2020-04-17 22:13:51 +00:00
Andrew Lytvynov 794b33303d Enable the race detector in integration tests 2020-04-17 20:05:38 +00:00
Andrew Lytvynov d1ea40d074 Enable linters: deadcode,goimports,govet,typecheck
And fix the relevant findings for these linters.

Also, set extra flags for `golangci-lint run` to make sure no findings
are suppressed.
2020-04-17 17:46:51 +00:00
Alexey Kontsevoy 3c670d5d58
Merge Teleport V4.3 UI branch to master (#3583)
* Add monorepo

* Add reset/passwd capability for local users (#3287)

* Add UserTokens to allow password resets

* Pass context down through ChangePasswordWithToken

* Rename UserToken to ResetPasswordToken

* Add auto formatting for proto files

* Add common Marshaller interfaces to reset password token

* Allow enterprise "tctl" reuse OSS user methods (#3344)

* Pass localAuthEnabled flag to UI (#3412)

* Added LocalAuthEnabled prop to WebConfigAuthSetting struct in webconfig.go
* Added LocalAuthEnabled state as part of webCfg in  apiserver.go

* update e-refs

* Fix a regression bug after merge

* Update tctl CLI output msgs (#3442)

* Use local user client when resolving user roles

* Update webapps ref

* Add and retrieve fields from Cluster struct (#3476)

* Set Teleport versions for node, auth, proxy init heartbeat
* Add and retrieve fields NodeCount, PublicURL, AuthVersion from Clusters
* Remove debug logging to avoid log pollution when getting public_addr of proxy
* Create helper func GuessProxyHost to get the public_addr of a proxy host
* Refactor newResetPasswordToken to use GuessProxyHost and remove publicUrl func

* Remove webapps submodule

* Add webassets submodule

* Replace webapps sub-module reference with webassets

* Update webassets path in Makefile

* Update webassets

1b11b26 Simplify and clean up Makefile (#62) https://github.com/gravitational/webapps/commit/1b11b26

* Retrieve cluster details for user context (#3515)

* Let GuessProxyHost also return proxy's version
* Unit test GuessProxyHostAndVersion & GetClusterDetails

* Update webassets

4dfef4e Fix build pipeline (#66) https://github.com/gravitational/webapps/commit/4dfef4e

* Update e-ref

* Update webassets

0647568 Fix OSS redirects https://github.com/gravitational/webapps/commit/0647568

* update e-ref

* Update webassets

e0f4189 Address security audit warnings Updates  "minimist" package which is used by 7y old "optimist". https://github.com/gravitational/webapps/commit/e0f4189

* Add new attr to Session struct (#3574)

* Add fields ServerHostname and ServerAddr
* Set these fields on newSession

* Ensure webassets submodule during build

* Update e-ref

* Ensure webassets before running unit-tests

* Update E-ref

Co-authored-by: Lisa Kim <lisa@gravitational.com>
Co-authored-by: Pierre Beaucamp <pierre@gravitational.com>
Co-authored-by: Jenkins <jenkins@gravitational.io>
2020-04-15 15:35:26 -04:00
Gus Luxton 896dd89971 Formatting 2020-04-13 17:33:44 -07:00
Gus Luxton e2bad167c4 Added updating Helm chart version to Makefile 2020-04-13 17:33:44 -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
Andrew Lytvynov afe814e724 Ensure make test covers all packages
Selectively listing package paths is error-prone. Use `go list` to get
the complete list instead. Filter out integration tests since they are
slower.

Also, enable the race detector by default. Local `make test` runs should
not skip it.
2020-04-08 17:38:03 -07:00
Russell Jones 22d362fa74 Release 4.2.2-alpha.1. 2020-01-20 14:04:36 -08:00