Commit graph

4887 commits

Author SHA1 Message Date
Andrew Lytvynov 8c75759b98 Add unit tests for kubeconfig updates
Several tests to confirm correctness of kubeconfig update logic.
Specifically - to make sure existing configuration is not deleted.

`UpdateKubeconfig` was split into two functions because mocking
`*client.TeleportClient` was really difficult.

Fixes #3209
2020-04-16 17:21:02 +00:00
Andrew Lytvynov 12952b4904 Set PDEATHSIG to SIGKILL on child processes after reexec
To execute an SSH command, Teleport re-executes itself and execs the
command from this child process:
  teleport -> teleport exec -> sh -c "user command"

Both parent teleport processes could exit unexpectedly (from SIGKILL or
even connection interruption).

Make sure all child processes get cleaned up and not orphaned to PID 1:
- teleport exec via SIGQUIT to request graceful shutdown
- user command via SIGKILL because it might ignore other signals
2020-04-16 16:56:22 +00:00
Steven Martin c6fe327938
Correct FIPS binary question (#3587)
"Complied" was used instead of "compiled" for the BoringCrypto reference.
2020-04-15 15:46:58 -07: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
Andrew Lytvynov 7890b4b7a7 Add local aliases to default host cert principals
Adding following principals:
- `localhost`
- `127.0.0.1`
- `::1`

With these, `tsh` (both `ssh` and `join`) works with a local proxy
without any SSH handshake errors.

Removed the warning from quickstart docs, but keeping `--proxy=grav-00`
since that implies to the reader that proxy is usually remote.

Fixes #2910
2020-04-15 01:23:03 +00:00
Gus Luxton e735c37583 Delete .gitignore 2020-04-15 00:30:33 +00:00
Gus Luxton 4aeb9e07b1 Update .gitignore
Add latest docs symlink to main .gitignore
2020-04-15 00:30:33 +00:00
Gus Luxton 85933d1c19 Create .gitignore
Add latest and latest.yaml to .gitignore
2020-04-15 00:30:33 +00:00
Andrew Lytvynov c39f089b72 Remove recursive latest symlink in docs/
The symlink points to itself, seems like it's leftover from olden days.

Fixes #3575
2020-04-15 00:30:33 +00:00
Lars Lehtonen ffce69d04b tool/teleport/common: fix test permission 2020-04-13 18:00:27 -07: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
aelkugia 4950d13a3d Extend comment to discuss FIPS mode - setting local_auth to false 2020-04-13 17:31:54 -07:00
aelkugia c8f3b8f252 Update admin guide config file - 'false' is not a valid authentication type. 2020-04-13 17:31:54 -07:00
Andrew Lytvynov a1ddfd31be Minor architecture docs tweaks
- consistently use "certificate" instead of "public key"
- make diagram in "local users" section match the text (user "sandra"
  doesn't have access to "grav-02")
- de-duplicate docs on session streaming between auth and proxy pages
2020-04-13 17:31:25 -07:00
Andrew Lytvynov fe7e8460e0
Install golangci-lint in the build container (#3564)
Missed in #3563. By default this tool wasn't installed.
Eventually it might make sense to move this to buildbox-base.
2020-04-13 15:58:45 -07:00
Andrew Lytvynov 178ccff32d
[docs] Minor wording cleanup to FIPS (#3567)
Remove a few duplicate sentences and make wording clearer.
2020-04-13 13:00:56 -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
Steven Martin 9e32878163
[docs] Update enhanced session recording docs for Amazon 2 Linux (#3560)
Expanded instructions to include installing BCC within a Amazon 2 Linux.  Moved some instruction steps for flow since amazon 2 linux doesn't require building the bcc tools.
2020-04-10 10:33:31 -07:00
Andrew Lytvynov f8661edea3 Clean up dead code across the codebase
Spring cleaning!
A very mechanical cleanup using several linters (unused, deadcode,
structcheck). Build and tests still pass so no behavior should be
affected.
2020-04-09 21:10:12 +00:00
Steven Martin 24029efcfc
Correct Msft azure ad link in docs (#3535)
* Correct Msft azure ad link in docs

MSFT AzureAD link wasn't properly formatted to produce a browser. fixed

* Warning tip on federation document was not in the styling format to render correctly. Fixed.

Co-authored-by: Ben Arent <ben@gravitational.com>
2020-04-09 12:55:20 -04:00
Andrew Lytvynov a1df63533b
Merge pull request #3547 from awly/improve-make-test
Fix build error in examples/go-client
2020-04-09 03:58:02 +00: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
Andrew Lytvynov 1cd247905c Fix broken build in example Go client code
The API of auth package changed in an incompatible way. Fix the usage.
2020-04-08 17:38:03 -07:00
Gus Luxton 48cc090e8d
[docs] Add tunnel_public_addr (#3548)
We didn't mention `tunnel_public_addr` in the docs for some reason, but it's critical knowledge for anyone setting up behind a load balancer.
2020-04-08 12:59:03 -07:00
Steven Martin 3b0db4c944
Merge pull request #3512 from gravitational/stevenGravy-oidc-debugoutput-patch-2
Correct misspelling in OIDC and SAML debugging
2020-04-07 14:44:12 -04:00
Steven Martin ac5d427b7e
Merge branch 'master' into stevenGravy-oidc-debugoutput-patch-2 2020-04-07 14:13:49 -04:00
Russell Jones c0f7c131cf Update CODEOWNERS 2020-04-07 10:57:56 -07:00
Ari Becker c6641eda71
[docs] Fix incorrect URL to tarball checksum (#3517)
The URL provided in the documentation for the tarball's checksum was
missing a `-`, and resulted in a 404 when actually trying to run the
`curl`. This adds the missing `-` so that the `curl` call will succeed
as expected.

Co-authored-by: Ben Arent <ben@gravitational.com>
2020-04-07 09:35:46 -07:00
Steven Martin bcd7436e26
Merge branch 'master' into stevenGravy-oidc-debugoutput-patch-2 2020-04-07 12:31:01 -04:00
Ben Arent 723ea0cd12
Error in Github.yaml (#3523) 2020-04-07 09:21:20 -07:00
Ben Arent 48e742003d
Relabel Sidebar (#3521)
* Update Sidebar
* Bump Install Version
2020-04-07 09:20:48 -07:00
Steven Martin 09b1a22d32
Merge branch 'master' into stevenGravy-oidc-debugoutput-patch-2 2020-04-06 14:02:47 -04:00
Steven Martin a02519cda3
Microsoft Azure Active Directory SSO Instructions (#3514) 2020-04-06 14:55:40 -03:00
Gus Luxton d34948b9fc
Add warning about table_name vs audit_events_uri (#3511)
As per #2542
2020-04-06 10:59:52 -03:00
Steven Martin c276f0e10b
Correct misspelling in output 2020-04-02 14:54:43 -04:00
Steven Martin 8ca47def00
Correct spelling in oidc debugging 2020-04-02 14:51:06 -04:00
Gus Luxton 9c2f0f89ae
Add mention of node tunnelling to port 3024 (#3509)
Also remove redundant # from port numbers
2020-04-02 09:56:57 -03:00
Forrest Marshall 924fb9cd00 synchronize bpf watch map reads 2020-04-01 11:41:44 -07:00
Russell Jones 8443f7c445
Update CHANGELOG.md 2020-04-01 11:04:05 -07:00
Jonathon Canada 5481491160
[docs] Added instructions for license.pem (#3504)
* Added instructions for license.pem
Co-authored-by: Ben Arent <ben@gravitational.com>
2020-03-31 10:02:39 -07:00
Gus Luxton 2105c8764c Fix tests and remove panic 2020-03-30 18:35:33 -07:00
Gus Luxton 3094b537c8 Generate random tokens 2020-03-30 18:35:33 -07:00
Gus Luxton 1be5cec183 Update sample config file header 2020-03-30 18:35:33 -07:00
Gus Luxton 432afff424 Remove comment 2020-03-30 18:35:33 -07:00
Gus Luxton 05d9720cff Extra changes 2020-03-30 18:35:33 -07:00
Gus Luxton f09e96b4d2 Fixes to make 'teleport configure' output tidier 2020-03-30 18:35:33 -07:00
Dmitry Sharshakov cf3760159b Ask for auth in 'tsh clusters' if certificate has expired
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2020-03-30 17:44:09 -07:00
Gus Luxton 3245a65687 Also set TELEPORT_PROXY_SERVER_LB for tunnel configs 2020-03-30 17:27:28 -07:00
Gus Luxton 7880e67ea3 Reflect auth server AMI changes in Cloudformation 2020-03-30 17:27:28 -07:00