Commit Graph
18779 Commits
Author SHA1 Message Date
Andrew LeFevreandAndrew LeFevre 2d2123e7b6 add discovery config events to the web UI (#43797)
Co-authored-by: Andrew LeFevre <Andrew LeFevre>
2024-07-11 14:33:06 +00:00
Grzegorz Zdunek 46ea5728f4 Move JS dependencies to correct workspaces (#44000)
* Move `packages/shared` dependencies to correct workspaces

* Move `packages/build` dependencies to correct workspaces

* Remove `e-imports` workspace

* Move `packages/teleterm` dependencies to correct workspaces

`@protobuf-ts/*` is imported in protobuf files, so it has to be available globally.

* Add undeclared dependencies

* Move `packages/teleport` dependencies to correct workspaces

* Move `setupTests` to `packages/build`

* Add a section about where to put deps

* Move `events` back to workspaces

* Rewrite the section about adding deps

* Update `e`
2024-07-11 14:30:52 +00:00
Marco Dinis e6d77f515a Use teleport install autodiscover-node command for Server Auto Discovery (#43466)
* Use `teleport install autodiscover-node` command for Server Auto Discovery

This PR changes the default agent installation to use oneoff script with
`teleport install autodiscover-node` instead of the current installation
script.

* use installers constant for the script name
2024-07-11 14:29:32 +00:00
Marek Smoliński 578ce01a5c tctl: Add ability to list access list members in json format (#44007) 2024-07-11 13:58:40 +00:00
Alan Parra 2cb249dc9f Define server-side device assertion interfaces (#44036)
* Define server-side device assertion interfaces

* Update proto comments

* Update generated protos
2024-07-11 13:13:47 +00:00
Tiago Silva 33cdccd7d0 [sec_scan][7] add authorizedKeys and privateKeys events support (#43906)
This PR introduces the ability to watch for events related to `accessgraphsecretsv1pb.AuthorizedKey` and
`accessgraphsecretsv1pb.PrivateKey` objects.

This PR is part of https://github.com/gravitational/access-graph/issues/637.

Signed-off-by: Tiago Silva <[email protected]>
2024-07-11 12:55:54 +00:00
Marek Smoliński ff780b31d0 Tests: Allow to inject teleport process (#44005) 2024-07-11 12:37:13 +00:00
Anton Miniailo 78e129b99d Fix flaky test for reissuing certificate for local kube proxy. (#44044) 2024-07-11 12:20:42 +00:00
Tiago Silva e3ae590c21 [sec_scan][6] add device events (#43905)
This PR adds the ability to watch for events for `*devicepb.Device` objects.

Backend storage representation of  `devicepb.Device` is achieved using an internal representation that lives in `e/lib/devicetrust/storage` and whose logic is internal to the package.

To be able to expose the unmarshal logic necessary for events to work, this PR exposes a registration hook that `e/lib/devicetrust/storage` function must call during initialization to register the unmarshal function.

Part of https://github.com/gravitational/access-graph/issues/637

Signed-off-by: Tiago Silva <[email protected]>
2024-07-11 10:27:54 +00:00
Tiago Silva 718d24527e [sec_scan][9] add access_graph_settings protobuf (#44010)
This PR adds the `clusterconfigpbv1.AccessGraphSettings` resource that will be used to control the secrets scanning definition of Teleport.

This resource will be a singleton and the only goal is to carry some settings related to access graph because on the cloud, users don't have access to fileconf.

This PR is part of https://github.com/gravitational/access-graph/issues/637.

Signed-off-by: Tiago Silva <[email protected]>
2024-07-11 10:11:36 +00:00
Tiago Silva 157d0d7886 [sec_scan][5] add secrets backend service (#43543)
* [sec_scan][5] add secrets backend service

This PR implements the backend service to support storing `authorized_keys` and `private_keys` into Teleport backend.

Part of https://github.com/gravitational/access-graph/issues/637

Signed-off-by: Tiago Silva <[email protected]>

* handle feedback

* handle nits

---------

Signed-off-by: Tiago Silva <[email protected]>
2024-07-11 08:40:24 +00:00
Cam Hutchison 9308a4792f operator: fix operator dockerfile COPY statements (#44047)
Update `Dockerfile.gha` to copy embeddedtbot from its new location in
`integrations/lib`. This change was made to `Dockerfile` but missed
`Dockerfile.gha`.

A follow-up commit will remove the "old" Dockerfile which should have
been done shortly after Drone was decommissioned.
2024-07-11 08:29:06 +00:00
Lisa Kim 478934e71d Web: allow SlideTabs.tsx to be disabled (#44022) 2024-07-11 07:03:19 +00:00
Cam Hutchison fb9cdee626 build: Simplify the vars that target minimum macOS version (#43996)
* Update `e` ref for macOS minos changes in teleport.e

* build: Simplify the vars that target minimum macOS version

Simplify how we tell rust/xcode/go which minimum version of macOS to
target. Xcode defines the environment variable
`MACOSX_DEPLOYMENT_TARGET` that contains the version of macOS to target.
llvm has adopted this too, so cargo/rust supports this, meaning we no
longer need to use `RUSTFLAGS` with a linker flag. This is much simpler
as we need to be careful not to set this flag when targetting wasm for
the UI (ironrdp). When building Go with CGO, it uses the system linker,
which is xcode, so we can rely on the `MACOSX_DEPLOYMENT_TARGET` var
there too, allowing us to get rid of the `CGO_LDFLAGS` var. We do still
need to set a linker flag on `CGO_CFLAGS` though, from testing.

This also ensures that `fdpass-teleport` also meets the macOS minimum
version requirements. It is nice that we no longer need special handling
on each rust target to do this.
2024-07-11 05:05:55 +00:00
Hugo Shaka 26f9b77948 Support detecting a credential expiry (#43886)
* Support detecting a credential expiry

* Fix Expiry() and add tests

* protect identityFile cred with a lock

* add godoc

* Fix tests
2024-07-11 02:57:14 +00:00
Sakshyam Shah d1cc70a965 send empty SAML service provider preset values as unspecified to Web UI. (#43863)
* send 'unspecified' preset to web ui if the value is an empty string

* use cmp.Or() to get preferred preset value
2024-07-10 23:30:06 +00:00
Hugo ShakaandRoman Tkachenko 2248a4b1d6 Introduce the tctl terraform env command (#43664)
* Introduce the `tctl terrafor env` command

* fix tests

* address marco's feedback + use correct b64 lib

* add license

* add created-by label as specified in the RFD

* Update tool/tctl/common/terraform_command.go

Co-authored-by: Roman Tkachenko <[email protected]>

* Apply suggestions from code review

Co-authored-by: Roman Tkachenko <[email protected]>

* Have telpeort create the Terraform default role

* rename use-existing-role -> role, and stop hijacking identity.SSHCACertBytes

* Make the terraform provider role a real preset, rename to 'terraform-provider'

* lint

* Fix tbot's invocation after rebase

---------

Co-authored-by: Roman Tkachenko <[email protected]>
2024-07-10 21:55:07 +00:00
Hugo Shaka f690c75f43 fix operator dockerfile COPY statements (#44033) 2024-07-10 21:29:13 +00:00
Sakshyam Shah 4e92521bd7 add unspecified SAML service provider preset type (#43957) 2024-07-10 19:25:47 +00:00
Lisa Kim cdc35489b1 Batch access list review reminders and provide link (slack) (#43782)
* Batch access list review reminder (slack)

* Address CRs

* Address CR 2

* Fix lint
2024-07-10 18:54:24 +00:00
Nic Klaassen fb8ef40e01 remove RSA-specific methods on keys.PrivateKey (#43982) 2024-07-10 18:50:39 +00:00
Bartosz LeperandRafał Cieślak ed2f1b6025 Fix UI issues after introducing new button design system (#43663)
* A new Button component

* Update snapshots

* UI corrections after updating the Button component

* Update snapshots

* buttons.story.tsx: Group related buttons together

Also increase gap to increase visibility of individual groups

* Fix Cancel button in ClusterAdd in teleterm

* Correct display names of auth providers in ClusterLogin story

* Update Retry button in Unified Resources

* Fix the buttons story snapshot

* Add license

---------

Co-authored-by: Rafał Cieślak <[email protected]>
2024-07-10 18:09:04 +00:00
rosstimothy 5bcaf28b0a Allow tsh ssh to use predicate expressions/search keywords from proxy templates (#43983)
While tsh ssh doesn't explicitly allow specifying predicate expressions
or search keywords via the CLI they can be populated via a proxy template.
However, the node resolution code in tsh only considered labels which
results in confusing behavior, especially given the fact that debug logs
indicate that a proxy template match was found and being used.
2024-07-10 18:05:14 +00:00
Jakub Nyckowski 974db41a5f Fix failed to attach to tracepoint 'syscalls/sys_exit_execve': Permission denied (#43783) 2024-07-10 18:02:33 +00:00
Lisa KimandCarlos Castro 95096dcfe1 Fix AccessMonitoringRule ACL (#43980)
Signed-off-by: Lisa Kim <[email protected]>
Co-authored-by: Carlos Castro <[email protected]>
2024-07-10 17:44:36 +00:00
Jakub Nyckowski 988fea60c0 Enhance library dependency management with libelf check (#43981)
* Enhance library dependency management with libelf check

Added logic to check for libelf presence and use pkgconf to dynamically include necessary static libraries when available. If libelf is not found, default to manually specified -lelf and -lz libraries. This ensures more reliable builds across different environments and addresses issues with Ubuntu 24.04.

* Remove duplicated pkgconf library
2024-07-10 17:40:01 +00:00
Nic Klaassen b5cb34a307 support separate SSH and TLS keys in generateUserCert (#43894)
* support separate SSH and TLS keys in `generateUserCert`

This PR splits the SSH and TLS public keys passed to
`auth.(*Server).generateUserCert`. The attestation statement associated
with the public key is also split.

Now, `sshPublicKey` will be the subject public key of the returned SSH
certificate, and `tlsPublicKey` will be the subject public key of the
returned TLS certificate. If either is not provided, the corresponding
certificate is not generated or returned.

This does not update any code paths to actually use different keys here,
but prepares for that in the future.

* use public key conversion func

* fix public key format in db tests
2024-07-10 16:50:53 +00:00
Marco Dinis edba0b0c80 Add DiscoveryConfigStatus field for AWS EC2 Resources (#43862)
* Add DiscoveryConfigStatus fields for AWS EC2 Instances

This PR introduces AWS EC2 discovered resources into the
DiscoveryConfigStatus.

This will allow us to list all discovered instances, and for the failed
ones, why we weren't able to enroll them.

* remove console url and rename enroll status

* fix typo
2024-07-10 16:40:17 +00:00
Alan Parra a545068e65 Add a client-side API to assert devices (#43890)
* Add a client-side API to assert devices

* Add a godoc to authnStreamAdapter
2024-07-10 16:26:53 +00:00
Michelle Bergquist 7553aaa57a Surface entitlements to webCfg & UI (#43622) 2024-07-10 15:40:56 +00:00
Zac Bergquist 4b9d0850c2 Add a --skip-idle-time flag to tsh play (#39266)
This tells tsh to respect timing data (and the configured playback
speed) while there is active recording data, but to skip over larger
periods of idle time.
2024-07-10 15:36:28 +00:00
Forrest 63b794d217 instance event plumbing (#43776) 2024-07-10 14:57:34 +00:00
Michael 1229dd6a1e Update e (#44008) 2024-07-10 14:36:12 +00:00
Michael d47bc96378 Add initial JoinTokens ui (#43766)
This PR is part of the new join tokens feature. This will make the join
tokens UI available on /web/tokens but not enable it in the navigation.
You will have to manually view it. We will add it to the navigation just
before the backport to the release branch. I did it this way so we can
start PRing the larger chunks while we work on the "create token" forms.
So obviously, the "create token" button doesn't exist on here. this is
for viewing/editting for now.
2024-07-10 04:25:01 +00:00
Cam HutchisonandJakub Nyckowski c33bc36aeb rdp: Change rdpclient type casts from ulong to uintptr_t (#43944)
Change the C type casts of `c.handle` from `C.ulong` to `C.uintptr_t`.
This is needed to compile on 32-bit architectures.

We do not currently build in the RDP client for 32-bit architectures but
it will be possible with a crosstool-NG based buildbox and is otherwise
of no detriment.

Co-authored-by: Jakub Nyckowski <[email protected]>
2024-07-10 00:03:36 +00:00
Gavin FrazarandPaul Gottschling 17925b4a01 add discovery tip partial in database guides (#43943)
* add discovery tip partial in database guides

* Update docs/pages/includes/database-access/auto-discovery-tip.mdx

Co-authored-by: Paul Gottschling <[email protected]>

---------

Co-authored-by: Paul Gottschling <[email protected]>
2024-07-09 23:55:55 +00:00
Gus Luxton 6b7f880f27 Fix typo in host_sudoers evaluation (#43978) 2024-07-09 23:06:35 +00:00
Dave Sudia 2443ad7f17 Update Datadog integration docs (#43887)
* add new page directing users to official Datadog integration

* remove old guide to sending events to Datadog

* update navigation and redirects for new Datadog page

---------

Signed-off-by: Dave Sudia <[email protected]>
2024-07-09 21:39:32 +00:00
7a3bf0f7a4 docs: update teleport event handler service instructions (#43885)
* docs: update teleport event handler service instructions

* docs: update verbiage on abs paths for event hanfler

Co-authored-by: Zac Bergquist <[email protected]>

---------

Co-authored-by: Steven Martin <[email protected]>
Co-authored-by: Zac Bergquist <[email protected]>
2024-07-09 20:27:31 +00:00
Michelle Bergquist 0eecdde4ba bump e (#43972) 2024-07-09 18:09:37 +00:00
Grzegorz Zdunek d484113881 Update electron-builder to 25.0.0-alpha.11 (#43945)
* Update electron-builder to 25.0.0-alpha.11

* Dedupe deps

* Run `yarn install`
2024-07-09 17:02:33 +00:00
Anton Miniailo 96e7cc3bb5 Add quicker retry to get kube cluster details if the cluster was offline (#43903)
* Add quicker retry to get kube cluster details if the cluster goes offline.

* Add kubedetails close call on error.

Although this error will never actually happen in practice.
2024-07-09 16:41:53 +00:00
Michelle Bergquist c97533ed22 Surface entitlements to auth (#42932) 2024-07-09 16:04:48 +00:00
Zac Bergquist 5360cdc162 Improve error handling for shared directory errors (#43896) 2024-07-09 15:58:17 +00:00
Marco Dinis eddf86c327 Remove aws-sdk-go/aws/awsutil package (#43846)
We are migrating away from aws sdk v1.
This PR removes the usage of the awsutil package.

Changes include removing a helper method that was not ported to V2.
This method would copy from one struct into another one, using their
field names.
That's useful when we want to mutate a single field (eg update the ECS
image version).
However, that helper method was not ported.
Instead, we are now using json marshal/unmarshal to the same effect.
2024-07-09 15:06:40 +00:00
Marco Dinis 01da4d34b5 Fix import order for darwin-only vnet file (#43949) 2024-07-09 14:19:40 +00:00
Hugo Shaka 7de9a98bc3 Ensure tbot compiles on windows (#43877)
* Ensure tbot compiles on windows

* Restore unix tbot support

* fixup! Restore unix tbot support

* address feedback

* Fix tbot build on windows, use CGO for this OS

* Move unix-specific syscalls and file descriptors out of os-agnostic files

* fixup! Move unix-specific syscalls and file descriptors out of os-agnostic files

* lint
2024-07-09 13:52:54 +00:00
Grzegorz Zdunek 503afcff2a Export configured Vite plugins from packages/build (#43847)
* Move `cspPlugin` to teleterm

* Keep `reactPlugin` config in `build/vite`

* Keep `tsconfigPathsPlugin` config in `build/vite`

* Add a comment about .mjs

* Lint

* `resolve` -> `path.resolve`

* Convert arrow function to regular function
2024-07-09 12:31:21 +00:00
Marco Dinis fe4418f508 Teleport install command for discovery agents (go) (#43423)
* Teleport install command for discovery agents (go)

This PR adds a new command that will install teleport on the current
system.
Its goal is to replace the default installer script used in Auto
Discovery scripts.

Its correctness should be compared to the current script. Improvements
will only be considered on a 2nd phase.

* rename ani/asi and re-organize install/configure sections

* create lib/utils/packagemanager package

* rename Autodiscover to AutoDiscover
2024-07-09 10:33:52 +00:00
Tiago Silva fa6002b5aa [sec_scan][3] add PrivateKey, AuthorizedKey and Device to Access Graph resources (#43468)
This PR extends the Access Graph resources to be able include the newly added `teleport.access_graph.v1.PrivateKey`,
`teleport.access_graph.v1.AuthorizedKey` and existing device trust information `teleport.devicetrust.v1.Device`.

Part of https://github.com/gravitational/access-graph/issues/637

Signed-off-by: Tiago Silva <[email protected]>
2024-07-09 09:51:59 +00:00