Commit Graph
12109 Commits
Author SHA1 Message Date
a5370d58fc Allow node to handle old and new way of client IP propagation on the same listener (#22572)
* Allow node to handle old and new way of client IP propagation on same listener

With addition of signed PROXY headers, node was listening on multiplexer, but because
 of that it couldn't processing incoming connection from older proxies
 when ProxyHelloSignature was used, because
 both ends were waiting for the other side to send data first.
 Here we integrate ability to handle PROXY headers into connection itself,
 so we can start ssh server without waiting for multiplexer to detect connection

* Remove unneeded code

* Improve comment's wording

Co-authored-by: Michael Wilson <mike@mdwn.dev>

* Improve comment's wording

Co-authored-by: Michael Wilson <mike@mdwn.dev>

* Fix imports

* Unexport function

* Add godoc

* Remove unneeded comment

* Move ProxyHelloSignature to constants

* Check that proxyline is verified

* Use Warn() instead of Warnf()

* Move ProxyHelloSignature to api/constants

* Add timeout for getting host CA during proxyline verification.

* Rearrange conditions

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Clarify comment.

---------

Co-authored-by: Michael Wilson <mike@mdwn.dev>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-07 13:55:02 +00:00
Hugo Shaka 0d6f7a422a Fix flaky test detetion for updater (#22690)
* Fix flaky test detetion for updater

* fixup! Fix flaky test detetion for updater
2023-03-07 04:49:01 +00:00
Yassine Bounekhla b798144dbb update eref (#22689) 2023-03-06 23:55:02 +00:00
Yassine Bounekhla f8c5cd0441 fix select box sizing (#21212) 2023-03-06 22:59:54 +00:00
Andrew LeFevre 6932a627c0 Make it easier to create registered openssh nodes with 'tctl' (#22615)
* make it easier to create registered openssh nodes with 'tctl'

Metadata.Name is set to a random UUID if it's unset, the requirement
to use '--force' when creating node resources is dropped, and more
checks for openssh node resources are added.

* added test coverage, renamed KindOpenSSHNode -> SubKindOpenSSHNode, added github.com/google/uuid to api/go.mod

* attempt to fix tests

* don't set node subkind if it's empty

* re-add test fix
2023-03-06 21:02:30 +00:00
Steven Martin 74591e4ad1 Update node listing troubleshooting (#22628) 2023-03-06 20:29:53 +00:00
dependabot[bot] 5317a26c69 Bump golang.org/x/sys from 0.5.0 to 0.6.0 (#22648)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 19:26:26 +00:00
Zac Bergquist bdc47fca62 Improve tctl auth export docs/help (#22589)
Ensure that valid export types are listed in both the --help
message and the CLI documentation.

Closes #22218
2023-03-06 19:24:33 +00:00
Anton Miniailo 96d10f0d83 Add MaxRetryPeriod for cachePolicy config to use in tests (#22656)
This fixes couple of flaky tests that surfaced after recent changes to the
retry logic/timeouts.
2023-03-06 19:00:17 +00:00
Hugo Shaka 3a9c96d37a kube-updater: initial commit (#22067)
This PR implements the core of the kube-agent-updater, which is part of
https://github.com/gravitational/teleport/issues/21516#issue-1576935859

In order to have a fully working updater we still need to:
- implement the interfaces for version retrieval, image validation and maintenance trigger
- add statefulset support (and deal with the potential deadlocks)
- implement the CI and release pipeline (Dockerfile, README, Makefile, github action, drone)
- integrate in the `teleport-kube-agent` helm chart

Those changes will happen in subsequent PRs.
2023-03-06 18:40:28 +00:00
39f15f322d Docs: Add Datadog guide. (#21950)
* tighten existing audit title in nav

* Move plugin install and config to partials

This move not only consolidates these instructions to a single source of
truth, but also takes the divergent updates from these instructions across
multiple docs.

* init datadog guide

* Update docs/pages/includes/configure-event-handler.mdx

Co-authored-by: Michael Wilson <mike@mdwn.dev>

* respond to review feedback

* add context for Logstash

* add context for Splunk

* update page titles

See https://github.com/gravitational/teleport/pull/21950/files\#r1110311232 for details

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* move link to next steps

* Apply suggestions from code review

* adjust prereqs

* Apply suggestions from code review

* Update docs/pages/management/export-audit-events/datadog.mdx

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* appease pointless linter rule

---------

Co-authored-by: Michael Wilson <mike@mdwn.dev>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-03-06 18:24:46 +00:00
Hugo Shaka 9e1f53d33a Move operator into integrations/ (#22618)
* Move operator into `integrations/`

* fixup! Move operator into `integrations/`

* fixup! fixup! Move operator into `integrations/`

* fixup! fixup! fixup! Move operator into `integrations/`

* fixup! fixup! fixup! fixup! Move operator into `integrations/`
2023-03-06 17:59:02 +00:00
Grzegorz Zdunek 793210ee64 Fix broken Teleterm stories (#22657) 2023-03-06 15:04:48 +00:00
85fdb2ce59 Machine ID telemetry docs (#22541)
* Start writing Telemetry docs

* Add description of events

* Update examples with TELEPORT_ANONYMOUS_TELEMETRY

* Add note on Telemetry

* Fix SPAG in telemetry docs page

* Correct link in guides/ for telemetry page

* Fix link on reference index page

* Update docs for GH action examples

* SPAG

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* kubernetes -> Kubernetes

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* Update docs/pages/machine-id/reference/telemetry.mdx

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* Fix list punctuation

* Don't break user reading flow in guides

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-03-06 11:46:30 +00:00
Tobiasz Heller 26189b61a9 Update e reference to newest (#22659) 2023-03-06 11:24:57 +00:00
Tobiasz Heller 770e74a31a refactor: audit interface (#22070)
* refactor: shrinker interface for external audit loggers

* move StreamSessionEvents from ExternalAuditLogger

* fix comment of getLocalLog

* Rename IauditLog into AuditLoggerSessionStreamer
2023-03-06 10:44:16 +00:00
Noah StrideandEdoardo Spadolini 6eaea0300e Machine ID Agent Anonymous Analytics (#22174)
* Start fleshing out tbot anonymous analytics submission

* Support overriding telemetry endpoint

* Add debug message on success

* Refactor sendTelemetry to be compatible with unit testing

* Improve telemetry log message cppy

* Ensure exit occurs after telemetry submitted

* Improve mocking for tests

* Finish automated test

* Fix imports

* Switch to info level message when nto enabled

* Use preferred package import anme

* Use tbot specific telemetry endpoints

* Use start time instead of now in timestamp

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Add missing license headers

* Add brief comment

* Correct staging domain

* Ensure anonymous telemetry sends

* Exit telemetry wait early if context is already cancelled

* Correct linter errors

* Fail faster on telemetry submission

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-06 10:24:07 +00:00
Nic Klaassen 884cbc0a32 temporarily disable TestHSMDualAuthRotation (#22568)
This test has become pretty flaky recently, disabling it for now until I
can find the root cause or fix the test.

Flaky test issue: https://github.com/gravitational/teleport/issues/20217
2023-03-04 04:20:11 +00:00
Michael Wilson a2c9e59a51 Bump e ref. (#22603)
The e reference has been bumped to get in SAML IdP auth auditing and fixing
the startup error that can occur as a result of the SAML IdP.
2023-03-04 02:26:05 +00:00
Michael Wilsonandalexfornuto 48daeff5bd SAML identity provider docs. (#22414)
* SAML identity provider docs.

SAML IdP documentation has been added.

* formatting

* spelling

* Zac's and Roman's feedback.

* Valid config.json.

* Linting updates.

* usr Var component

Adding as a unique commit in case it's not desired

* align output with object name

* Roman's feedback, add in a section for disabling the IdP.

* copy edits

* SAML Grafana guide (#22545)

* init Grafana SAML guide

* respond to review feedback

* Correct entity provider to identity provider.

* Note that HSM is not currently supported.

* Fix link.

---------

Co-authored-by: alexfornuto <alex.fornuto@goteleport.com>
2023-03-04 00:29:52 +00:00
d262c1fac0 Update access request enterprise description (#22284)
* Update access request enterprise description

- Mention resource requests are ent only
- Mention UI for access requests are ent only

* Verbiage change

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* verbiage change

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* verbiage change

* Update language

* verbiage change

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
2023-03-03 23:55:17 +00:00
Jeff Pihach 016141c1ea Resolve dependabot CVE issues (#22605)
* update storybook dependencies to resolve some dependabot issues.

* remove config that's already set to the default

* Resolve prettier issues after dep update.

* Pin x-default-browser version to resolve dependabot vulnerability.
2023-03-03 23:45:17 +00:00
Steven Martin d281fd7c8e Examples spell fixes and discord example fix (#22606) 2023-03-03 22:45:08 +00:00
Roman Tkachenko d4163e1d01 Flaky tests detector tweaks (#22607) 2023-03-03 20:50:13 +00:00
Alex Fornuto ea106eae80 test keyword frontmatter (#22145) 2023-03-03 19:44:34 +00:00
Jakub Nyckowski a8a244a517 SCP - Change file attrs only when requested (#22579)
* SCP -Change file attrs only when requested

OpenSSH sets 0644 by default and allows copy the source permissions by passing `-p` flag.
Our current implementation sets the file permissions even when client didn't use `-p` flag which can fail if the user doesn't have permissions to set it. This patch matches the OpenSSH behavior.

* Fix formatting
2023-03-03 19:12:52 +00:00
Michael Wilson 76a5eb5fe3 Add SAML IdP service providers to default allow rules. (#22577)
SAML IdP service providers have been added to the default allow rules to
ensure that the editor role has access to the SAML IdP service providers
during a migration.
2023-03-03 19:10:48 +00:00
Forrest aaee695927 node hb and watcher scalability improvements (#21490)
* node hb and watcher scalability improvements

* ensure that node has ample time to hb

* fix degraded state

* hbv2 test cov
2023-03-03 17:39:00 +00:00
Andrew LeFevre 948c1db915 preform RBAC checks before connecting to registered OpenSSH nodes (#21938)
The RBAC logic assumes that SSH connections to registered OpenSSH nodes
will always be proxied and terminated, which will come in a future PR.

Part of implementing #19261.
2023-03-03 17:29:53 +00:00
dependabot[bot] 92bed40236 Bump github.com/russellhaering/gosaml2 from 0.8.1 to 0.9.0 in /api (#22591)
Bumps [github.com/russellhaering/gosaml2](https://github.com/russellhaering/gosaml2) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/russellhaering/gosaml2/releases)
- [Commits](https://github.com/russellhaering/gosaml2/compare/v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/russellhaering/gosaml2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 17:20:42 +00:00
dependabot[bot] 42fd2e1911 Bump github.com/russellhaering/gosaml2 in /examples/desktop-registration (#22592)
Bumps [github.com/russellhaering/gosaml2](https://github.com/russellhaering/gosaml2) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/russellhaering/gosaml2/releases)
- [Commits](https://github.com/russellhaering/gosaml2/compare/v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/russellhaering/gosaml2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 16:48:12 +00:00
dependabot[bot] 4980b10c01 Bump github.com/russellhaering/gosaml2 from 0.8.1 to 0.9.0 (#22593)
Bumps [github.com/russellhaering/gosaml2](https://github.com/russellhaering/gosaml2) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/russellhaering/gosaml2/releases)
- [Commits](https://github.com/russellhaering/gosaml2/compare/v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/russellhaering/gosaml2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 15:58:42 +00:00
Jakub Nyckowski 8329021148 Skip building webassets in CI (#22549)
* Skip building webassets in CI

Building webassets is not always needed and many of our CI build just builds them and ends up not using them after.
This PR skips building the webassets for all pipelines where they are not needed. This should save us some time and $$.

* Make some changes to trigger CI

* Create the missing directory
2023-03-03 15:14:25 +00:00
rosstimothy cb3b6febcd Remove network I/O from database_service collection apply (#22397)
All network I/O should be done in the cache collection fetch and
not the appy function returned from fetch. This moves the
`ListResources` request for database services out of the apply
function to be compliant with the collection requirements.
2023-03-03 14:31:41 +00:00
Marco André Dinis b9c129f966 NodeJoin Script: clear yum repo cache (#22584) 2023-03-03 14:19:04 +00:00
Grzegorz ZdunekandRafał Cieślak 4830ea16e5 Connect: Enable keyboard shortcuts configuration (#22194)
* Use event.code for non A-z keys

Without this fix, shortcuts like "Shift+1" can't work, because the reported character is "!".

* Add Zod schema to validate keyboard shortcuts

* Render better formatted error notification, add a link to docs

* Notify about duplicated accelerators

* Improve the error message for re-parsing failure (it can happen when a default value does not pass validation)

* A bunch of renames

* Allow spaces in accelerators

* Rename `isContentAnObject`

* Allow `Notification` to render links and lists

* Split by optional whitespace and "+"

* Allow lowercase letters

* Require a modifier for non-function keys

* Move VALID_SHORTCUT_MESSAGE to `initUi`

* Always return from `getDuplicateAccelerators`

* Use 'Cmd' and 'Ctrl' for mac

* Add comments

* Fix notification not rendering content

* Add more comments, rename `getKeyCode` to `getKeyName`

* Fix incorrect size of <Link> text

* Remove "expected" prefix

* Revert `typeof content === 'object'` in `Notification`

* Remove a comment about disabled keys in `ConfigService`, add a note about `keymap.` prefix

* Improve `getKeyName` comment

* Extract an inline object to a variable in `getKeyName`

* Fix notification list padding

* Change text for doc link & description for config error

* Improve comment for `getKeyName`

* Remove special formatting for list === 1 in `Notification`

* Print valid modifiers

* Call `getKeyboardShortcutSchema()` once

* Collect issues from all validations, run `invalidModifiers` through a set

* Change error message for `missingModifierIssue`

* Convert duplicates warning to error

* Define ALLOWED_KEY_CODES in a more concise way

* Support both `IntlBackslash` and `Backquote`

* Restore modifiers for mac to full spelling, sort them in order recommended by platform guidelines

* Fix old comment about the shortcuts order

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2023-03-03 14:05:38 +00:00
Grzegorz Zdunek 717c4fa55a Connect: Prepare keyboard shortcuts configuration (#22193)
* Make naming around keyboard shortcuts more consistent

Previously, we used words like: "key", "type", "shortcut" which were really confusing (and I wrote this code), because it was hard to tell what exactly they describe.
From now, we will use only "accelerator" (borrowed from Electron) and "action" words.
For example, in a shortcut "Command+1": "tab-1":
- "Command+1" is "accelerator"
- "tab-1" is "action"

* Use "+" instead of "-" as a separator

With "-" we are not able to use this symbol as a valid key code.

* Rename some config keys to follow the same naming pattern

* Rename keyboard shortcuts to match config keys

* Extract `mapAcceleratorsToActions` to a function

* Rename other "keyboard shortcuts" to "accelerators" and "actions"
2023-03-03 11:44:25 +00:00
Ryan Clark c99a4d6191 Allow all alert severities to be acknowledged (#22461) 2023-03-03 09:55:03 +00:00
Lisa Kim 5aa3a41f01 RFD 01111 - Support connection testers when per-session MFA is enabled (#22458)
* Rfd

* Address review
2023-03-03 02:56:31 +00:00
Andrey Bulgakov d7fb53d08c Refresh remote cluster connection status periodically (#22455) 2023-03-02 23:00:41 +00:00
Anton Miniailo bce19568b3 Move IP pinning RFD from private repo. (#22481) 2023-03-02 22:46:24 +00:00
2940c1179c Add Telnet into docker to test connectivity for cloud getting started (#22283)
* Add Telnet into docker to test connectivity for cloud getting started

Including telnet allows the script to test connectivity.

* Describe usage by telnet

* update verbiage

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Update docs/pages/choose-an-edition/teleport-cloud/getting-started.mdx

Co-authored-by: Gus Luxton <gus@goteleport.com>

* verbiage

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

---------

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-03-02 21:47:46 +00:00
Steven Martin d20c400c8f Spellfix access control intro (#22560) 2023-03-02 20:58:46 +00:00
Michael Wilson 9bd0cc83c9 Add in SAML IdP service provider session metadata to auth attempts. (#22544)
* Add in SAML IdP service provider session metadata to auth attempts.

The SAML IdP auth attempt event now contains SAML IdP service provider,
which will allow the audit logs to display which service provider the user
is attempting to log into.

Additionally, a shortcut name has been added to the SAML IdP service provider
metadata to handle auth attempts where the service provider could not be found
given a shortcut name.

* Linting fix.

* Modify the auth attempt audit log entries.
2023-03-02 20:26:18 +00:00
Brian Joerger d02c6a28c0 Add HeadlessAuthentication protobuf type and Resource implementation. (#22350) 2023-03-02 18:35:21 +00:00
Tiago Silva 3a6ada7459 Add Kubernetes Access tracing (#22308)
* initial tracing commit

* reply with code review comments
2023-03-02 18:15:53 +00:00
Andrew LeFevreandJakub Nyckowski a471c35594 added RFD for registered OpenSSH nodes (#19261)
expanded 'registering nodes' section to provide solution to stated problem

addressed feedback

Clarified RBAC section, added security and UX notes. Removed the
option of adding info to host certs, that actually won't work with how
SSH public key auth is currently implemented.

added details on new CA, fleshed out details on getting RBAC to work

addressed some feedback, renamed OpenSSH CA -> Agentless CA

added other RBAC implementation

minor changes addressing feedback

fix incorrect usage of 'preform'

added example of registered OpenSSH node resource

remove accidental reference to unregistered nodes

renamed sub-kind and CA; removed option 1 as it was unanimously rejected

added 'teleport' node sub-kind

add manual ca rotation details

address feedback

add section about SSH agent forwarding

clairified what SSH agents can be forwarded

addressed feedback

add future work

removed 'future work' section

clarified that proxy recording and direct dialing will be removed at the same time

address feedback

Update rfd/0098-registered-openssh-nodes.md

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-03-02 16:42:42 +00:00
Mike Jensenanddependabot[bot] fb3e142887 Webapp Yarn Updates 2 (#22522)
* Bump decode-uri-component from 0.2.0 to 0.2.2

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump json5 from 1.0.1 to 1.0.2

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade browserslist to 4.16.5

Upgrade to address Dependabot alert: https://github.com/gravitational/teleport/security/dependabot/45

* Upgrade minimatch to 3.0.5

This address the Dependabot alert: https://github.com/gravitational/teleport/security/dependabot/61

* Upgrade shell-quote to 1.7.3

This address Dependabot alert: https://github.com/gravitational/teleport/security/dependabot/57

* Upgrade ansi-regex to 3.0.1

This addresses the Dependabot alert: https://github.com/gravitational/teleport/security/dependabot/55

* Upgrade prismjs to 1.27.0

This address Dependabot alert: https://github.com/gravitational/teleport/security/dependabot/52

* De-duplicate yarn.lock file after upgrades

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 16:32:52 +00:00
Steven Martin dc55b34ddb Add GCP Service Account parameter to tctl users add reference (#22304)
* Add GCP Service Account parameter to tctl users add reference

Only applies to master and branch/v12

* Moved azure identities parameter next to other cloud apis ones
2023-03-02 15:53:49 +00:00
Michael WilsonandMarek Smoliński 1f32bbd7be Update SAML IdP auth attempt code variable name. (#22539)
* Update SAML IdP auth attempt code variable name.

The SAML IdP auth attempt code variable name now accurately mirrors the event
name.

* Update lib/events/codes.go

Co-authored-by: Marek Smoliński <marek@goteleport.com>

---------

Co-authored-by: Marek Smoliński <marek@goteleport.com>
2023-03-02 14:18:30 +00:00