Commit graph

11400 commits

Author SHA1 Message Date
Ryan Clark 87abbb8e49
Alert ack API + CLI implementation (#19480)
Co-authored-by: Forrest Marshall <forrest@goteleport.com>
2023-01-24 17:30:07 +00:00
Hugo Shaka 9262f95665
helm: add resources to load-test the Helm chart (#19754) 2023-01-24 15:45:44 +00:00
Rafał Cieślak 9b7355cd20
Connect: Add useWorkspaceLoggedInUser (#20552) 2023-01-24 15:31:39 +00:00
Alex McGrath 66985553db
Add agentless installer in the teleport discovery service (#19648)
* Add agentless installer

* Resolve comments

* Resolve comments

* Use GetCertAuthorities locally

* Try to get IMDS hostname

* Try get imds hostname first

This seems to be how its implemented for non-agentless nodes

* Use FIPS cipher suites

* use the openssh ca, resolve comments

* write keys to /etc/teleport/agentless by default

* Resolve comment

* lints

* test fixes
2023-01-24 14:49:06 +00:00
Alex McGrath 2eb418359d
Convert rhel VERSION_IDs to only include the major version (#20403)
* Convert rhel `VERSION_ID`s to only include the major version

* shfmt
2023-01-24 12:32:47 +00:00
Krzysztof Skrzętnicki af5716a9a7
Fix two issues with Oracle MySQL client on Windows. (#20397)
* Add `--defaults-extra-file` as `~/.my.cnf` is not read on Windows.

* Escape `\` as `\\` in paths saved to the config file.
2023-01-24 09:36:47 +00:00
Rafał Cieślak c4897417fe
Add integration test for deamon.Service.AddCluster (#20332)
* Add integration test for daemon.Service.AddCluster

* Call SaveProfile on clusterClient rather than cfg

This way we don't have to explicitly set ClientStore as
client.NewClient(cfg) does that for us.
2023-01-24 08:10:02 +00:00
fheinecke a86f53ca03
Fixed incorrect container image branch version numbers (#20585) 2023-01-24 02:08:36 +00:00
Jakub Nyckowski c1f59a1803
Disconnect moderated session on Ctrl+C (#20580)
* Disconnect moderated session on Ctrl+C

* Add moderated session to the test plan.
2023-01-24 01:37:34 +00:00
Jeff Pihach 0f21a8b8e3
Resolve issues to enable passing CI tests. (#20582)
* Move lint commands to root package.json

* Correctly resolve e-teleport paths.

* Fix prettier issues.

* move eslint configuration files to root.

* resolve lint errors.
2023-01-23 22:06:56 +00:00
Steven Martin dfd3acbc5f
Docker install doc updates (#19783)
* Includes in commericial pre-req to have a enterprise account.  Uses includes on how to get a license file.

* Showed how to use the arm version. Removed comment that only x86_64 are provided.

* includes amd64, arm and arm64 include descriptions

* Updates to GCp to show enterprise installation.
2023-01-23 20:09:37 +00:00
Tiago Silva ddd1055552
fix tctl auth sign --format kubernetes when using remote auth server (#20497)
This PR fixes `tctl auth sign --format kubernetes`  when used with remote auth servers running with multiplex mode.

Fixes #20499
2023-01-23 19:02:42 +00:00
Mike Jensen 261dce259f
dependabot-batcher - Specify environment (#20563)
The environment needs to be specified to have access tot he GitHub App auth.
2023-01-23 18:41:52 +00:00
David Boslee 06ba6ec7b1
Fix kube access proxy peering compatibility (#20561)
The change from kube_service to kube_server in v11
lead to breaking backwards compatibility for v10 agents
connecting to a v11 teleport cluster when proxy peering
is enabled.

The issue was in converting from a kube_service to kube_server
the proxy ids the kube agent is connected to was never copied.

This leads to kube agents being reachable through the proxy
they are connected to but not through peer proxies.
2023-01-23 18:20:22 +00:00
Marco André Dinis 5dcd49cff1
Fix: change var to inner scope's Testing t (#20560) 2023-01-23 18:38:59 +01:00
Krzysztof Skrzętnicki 4a8658ab25
Change Azure and GCP server-side handlers to ensure timeout tests pass. (#20281)
* Change Azure and GCP server-side handlers to ensure timeout tests pass.

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-01-23 15:24:10 +00:00
Tiago Silva 10da451dd6
Add support for subResourceName to teleterm (#20541)
Initial support for `subResourceName` when listing resource access requests for `type=pod`.
2023-01-23 15:06:01 +00:00
Tiago Silva 605a7d00f4
Adds tsh kubectl support (#20031)
This PR implements a `kubectl` wrapper inside `tsh` that creates resource access requests, waits for their approval and retries the command when it detects that access to a pod was denied due to missing role or Kubernetes RBAC principals permissions.


Part of #18434
Updates #19573
2023-01-23 14:34:40 +00:00
Mike Jensen 2235827c0e
Update dependabot-batcher to use GitHub app for authentication (#20342) 2023-01-23 13:42:39 +00:00
Rafał Cieślak b94edcf450
Move tsconfig.json to root dir, remove web Makefile and Dockerfile (#20399)
* Move tsconfig.json to root dir

At the moment, it looks like the TS language server has problems with
recognizing imports when editing files inside e/web.

I figured this is probably because tsconfig.json is in web, so the lang
server doesn't recognize it when editing files from e/web.

* Remove web/Dockerfile and web/Makefile

* Misc updates to readme

* Fix links in readme
2023-01-23 11:50:16 +00:00
Zac Bergquist 6a2ed69567
tctl edit: get the original resource name from the file (#20362)
This ensures we correctly detect attempts to rename even when
aliases are used for dynamic resources like `cap`.
2023-01-22 14:45:00 +00:00
Tiago Silva 10045bd349
Increase ReadDeadline to accommodate slow clients (#20468)
Increases deadline until the agent receives the first byte to 10s.
It's required to accommodate setups with high latency and where the time
between the TCP being accepted and the time for the first byte is longer
than the default value -  1s.

Fixes #20442
2023-01-21 10:18:07 +00:00
Roman Tkachenko 6bcad73d69
rm -rf .cloudbuild (#20512) 2023-01-21 01:02:19 +00:00
Alan Parra e8e48a1c55
Add device-specific verbs to RoleAdmin (#20505)
Add device-specific verbs to RoleAdmin, which are not included in the default
`RW()` set. Fixes issues while using `tctl devices add --enroll` and
`tctl devices enroll`.

#514
2023-01-20 19:33:08 -03:00
Michael 7f5e822c18
Update eref (#20498) 2023-01-20 20:38:07 +00:00
Jeff Pihach 839385774c
Add BUILDARCH arg to fips dockerfile. (#20495) 2023-01-20 20:07:05 +00:00
Hugo Shaka 4aaac53d25
helm: fix potential deadlock during proxy install (#20488) 2023-01-20 18:00:41 +00:00
Jeff Pihach ba2c1fc34a
Add nodejs to the fips dockerfile. (#20487) 2023-01-20 17:27:42 +00:00
Alex Fornuto f3da10d554
sort database guides (#20455) 2023-01-20 17:09:11 +00:00
Edward Dowling 30a362a3dc
Add initial instructions for cluster role map updating (#19006) 2023-01-20 15:09:21 +00:00
Tiago Silva 08e842540e
Fix goroutine leaks during tests execution in /lib/kube/proxy package (#20330)
This PR fixes goroutine leaks that occur during the test run because some resources were cleaned up incorrectly.
2023-01-20 14:53:54 +00:00
Michael Wilson 72e044c880
Decode URL encoded values from AppLauncher's ARN. (#20387)
The new app access authentication workflow inadvertently preserves the URL
encoded values present in the AWS role ARN, which are then passed directly
to the webapi/sessions endpoint. As a result, Teleport RBAC doesn't properly
match AWS role ARNs, as they contain (in particular) `/` characters encoded as
`%2F`.
2023-01-20 13:56:40 +00:00
Marco André Dinis 0fed4c7e55
Return NotFound error when trait does not exist (#20412)
We were returning a trace.BadParameter, however we should return
trace.IsNotFound.
The godoc suggests that error.
The tests suggests that error, but they were only matching for type
which is the same for all the trace.XYZ errors.

Tests are now using the `trace.Is<Error>` helper method to correctly
validate the error message.

The side effect of this change is that we were receiving a lot of logs
when interpolating traits in a role.
That log is supressed when the error is NotFound.
That was not the case before this commit: the error was a BadParameter
one, so the log is written (as debug, but still a lot of noise).

Co-authored-by: Vitor Enes <vitor.duarte@goteleport.com>
2023-01-20 12:51:04 +00:00
Gabriel Corado 60d16e4419
fix(azure): verify if system identity is set (#20406) 2023-01-20 12:32:09 +00:00
Rafał Cieślak 3c77541d06
Integ tests: Use address of web UI as Proxy.PublicAddrs (#20328)
i.Web is also used as tconf.Proxy.WebAddr.Addr a couple of lines below.

When pinging the proxy, TeleportClient takes the response and updates a
couple of values based on that response. If proxySettings.SSH.PublicAddr
is not empty, it tries to parse the address and then set it as
tc.WebProxyAddr. [1]

If it cannot parse the port number, it uses the default (3080).

What is getting returned as `proxySettings.SSH.PublicAddr`? That's determined
by setProxyPublicAddressesSettings in lib/service/proxy_settings.go. [2]
It uses the first element from Proxy.PublicAddrs.

Now, the integration test helpers set up the Teleport instance in such
way that the first Proxy.PublicAddrs is set to i.Hostname which resolves
to just "localhost" in tests. So if any test pings the proxy first and then
tries to make another request with the same TeleportClient, the subsequent
request will try to reach out to localhost:3080. This happened to me when
trying to add a new test. [3]

This PR fixes this by making sure that the first element of Proxy.PublicAddrs
actually points at the address of the web UI.

See also the message from Marek about backwards compatibility of
SSHProxyHostPort. [4] [5]

[1] 885d7397ab/lib/client/api.go (L3666-L3673)
[2] 806a568ada/lib/service/proxy_settings.go (L112)
[3] https://github.com/gravitational/teleport/pull/20263
[4] https://gravitational.slack.com/archives/C0DF0TPMY/p1673895327794379?thread_ts=1673891288.249809&cid=C0DF0TPMY
[5] db7fdff809/api/client/webclient/webclient.go (L490)
2023-01-20 12:13:14 +00:00
Rafał Cieślak 408ea7b881
Remove web/packages/build from ignored files (#20400) 2023-01-20 10:04:31 +00:00
Roman Tkachenko ae386a5b23
Update AMI IDs for 11.2.2 (#20466)
Co-authored-by: Steven Martin <steven@goteleport.com>
2023-01-20 09:43:48 +01:00
Steven Martin 9fa28188c7
Update FedRAMP link (#20321) 2023-01-20 02:53:04 +00:00
Steven Martin ca4e6b1079
Remove no longer maintained AWS Cloudformation example (#20417) 2023-01-20 00:15:40 +00:00
Michael d9d61e859b
Add .prettierrc to teleport root (#20448) 2023-01-19 17:17:55 -06:00
Jakub Nyckowski 8108230136
Run webassets build in Docker as current OS user (#20426)
Set the current user when running webassets builds. In this way, the build artifacts will have correct permissions.
2023-01-19 23:01:36 +00:00
Alan Parra 7b7c4adbe0
Respect --auth and --mfa-mode before defaulting to passwordless (#20438)
Since #16964, `tsh login` defaults to passwordless if it finds suitable platform
credentials - it is safer and more convenient than other authentication methods.
Unfortunately, it is a bit too eager in doing that.

This change adds the following prerequisites for the switch, in addition to
existing conditions:

1. `--auth` must not be specified
2. `--mfa-mode` must be either `auto` or `platform`

(1) avoids defaulting when `--auth=local` is present, as well as for other
custom/future values. (If `--auth=passwordless` is passed, we'll do passwordless
anyway.)

(2) includes both an explicit platform attachment test (which is a bit more
conservative in face of changes), as well as checking for `--mfa-mode=otp`.

#20429 and #20322
2023-01-19 22:45:42 +00:00
Tiago Silva f1e897a86b
Allow access role to access pods (#20402)
This PR adds full access to `pod` resources on every namespace for
default role `access`.

Fixes #20401
2023-01-19 22:30:51 +00:00
Alex Fornuto 1e49e7537b
expand for CNAME records (#20290)
Also formats the file to conform to our style guide
2023-01-19 22:11:16 +00:00
Roman Tkachenko 98fba76f80
Switch to teleport13 buildbox in CI (#20430) 2023-01-19 13:54:25 -08:00
Alan Parra 4afd9df966
Add credential picker to passwordless testplan (#20431)
Add an item to cover credential pickers in the testplan.
2023-01-19 20:59:19 +00:00
Steven Martin 6d2087b336
spell fixes (#20386) 2023-01-19 20:47:57 +00:00
rosstimothy 3d5557d947
Add a connection limiting listener (#20130)
Introduces `limiter.Listener` to provide a consistent and reusable
mechanism for limiting incoming connections per client. The new
listener is used by `sshutils/server.go` instead of manually applying
limits in `HandleConnection`.

This is particularly important now that the Proxy SSH port multiplexes
both SSH and gRPC. Each listener is now wrapped in a `limiter.Listener`
that uses the same `limiter.ConnectionsListener` to ensure that the
connection limits for the Proxy are enforced for all traffic on the
port.
2023-01-19 15:10:11 +00:00
Edoardo Spadolini 1267b3b466
Add trusted cluster role map editing to the test plan (#20325) 2023-01-19 14:51:22 +00:00
Jeff Pihach 0da1640ce8
bump e (#20414) 2023-01-19 14:39:22 +00:00