Commit graph

13470 commits

Author SHA1 Message Date
Mike Jensen 5bdd8fe2ec
Upgrade mongodb to v1.11.7 (#27429)
* Upgrade mongodb to v1.11.6

Includes some minor code changes around how the mongodb topology is configured.
This drops support for MongoDB prior to version 3.6.  For that reason unit tests don't currently pass.

* access_test: Update MongoDB supported wire versions

Removes support for MongoDB prior to version 3.6

* Fixes after rebase (more needed changes for auth implementation)

* Upgrade mongo to just release 1.11.7 tag
2023-06-07 15:03:52 +00:00
Paul Gottschling 1ba5908cc4
Fix redirects (#27488)
The `/docs/cloud` redirect was 404ing because
`/docs/choose-an-edition/teleport-cloud/` does not correspond to a page
within the docs. This updates the redirects for this and similar
configurations.
2023-06-07 15:00:07 +00:00
public-renovate-gha[bot] 8f602ed4f5
chore(deps): update build assets - tooling (#27542)
Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
2023-06-07 14:54:28 +00:00
public-renovate-gha[bot] 7ee3f2cbd2
chore(deps): update assets - backport (#27543)
Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
2023-06-07 14:54:25 +00:00
Jakub Nyckowski 36f9bd3516
Implement in-memory vector DB (#27329)
In order to include embeddings in the Assist conversations, we need a way to store and retrieve when needed. This PR adds vector store/search implementation based on k-d tree.
2023-06-07 14:47:46 +00:00
Steven Martin 488bd91263
use proxy port in openssh config (#27536)
* use proxy port in openssh config

* update test record
2023-06-07 14:28:27 +00:00
public-renovate-gha[bot] baa722233d
Configure Renovate (#27410)
* Add renovate.json

* move renovate.json

* add renovate workflow

* update subset of dependencies for now

* sort ignores alphabetically

* fix: add ignored dependencies for Teleport Go deps

* sort ignored deps

* fix: use excludePackageNames instead of exludeDepNames

* disable certain packages

* ignoring replaced dependencies

* remove on pull request from workflow

---------

Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2023-06-07 13:52:11 +00:00
Steven Martin c08cd3e626
Update description of Roles UI (#22404)
* Update description of Roles UI

* Update phrasing

* lint fix

* Update role description

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

* Change verbiage

* lint fix

---------

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
2023-06-07 13:34:51 +00:00
Lisa Kim 2f3f42ef14
Update e (#27523) 2023-06-07 07:20:28 +00:00
Cam Hutchison 6e4470e0bf
tooling: Add a flaky test report to render-tests (#27098)
* tooling: Refactor render-tests

Refactor render-tests to simplify and group the logic prior to adding a
mode to report flaky tests. No additional functionality has been added,
but the coverage detection has been fixed as the regexp was incorrect
(presumably the output format changed).

* tooling: Rework render-tests counting

Rework the counting of pass/fail/skip events in render-test to record
these counts at the test and package level instead of a single status of
pass/fail/skip. This will allow us to accumulate results from more than
one test run to be able to test for flaky tests.

Tally and output package and test counts separately as previously it was
technically incorrect when it said "n tests passed", as that also
included package results. This may make it a little clearer just how
much is failing when a failure occurs.

* tooling: Add flakiness mode to render-tests

Add a `-report-by flakiness` mode to `render-tests` that can accumulate
multiple test runs and report the top N flaky tests. This mode is
intended to be used in a daily run of the tests for a couple of hours,
or perhaps 200 times, and to report on the tests that have failed the
most.

The output of multiple test runs should be fed into the single run of
`render-tests`. A `rerun` utility is forthcoming with which you could
do:

    rerun -n 200 -t 2h go test -shuffle on -cover -json . | \
        render-tests -report-by flakiness -top 10

* tooling: Have render-tests write summary to file

Add the `-summary-file` flag to have render-tests write a summary of the
test run to the specified file. This is to be used to get a flaky test
summary that can be sent on slack via CI (GitHub Actions).

* tooling: Add rerun command for multiple test runs

Add a `rerun` command that is intended to be used to run tests multiple
times for a duration. It allows `go test -json` to be run many times
with the output piped to `render-tests -report-by flakiness` to generate
a summary of flaky tests over a large number of runs.
2023-06-07 07:13:12 +00:00
Steven Martin 596441cc78
docs: include token generation for app access getting started (#27511) 2023-06-07 06:53:00 +00:00
Cam Hutchison bb822bf26b
Fix build for new buildbox (#27521)
* Revert the removal of quintush/helm-unittest

Commit 5d53c91c7a removed
quintush/helm-unittest from the buildbox. It seems we still need that
version so revert those hunks that removed it.

* tests: Fix invalid sudoers file test

Fix the invalid sudoers file test to not look for an exact string but
just a substring. The error message has changed from Ubuntu 20.04 to
22.04 and it has removed some extra wording.
2023-06-07 06:35:59 +00:00
Jakub Nyckowski 5d53c91c7a
Use Ubuntu 22.04 for the buildbox (#27497)
After moving the Connect to a separate Docker image https://github.com/gravitational/teleport/pull/27175 we're able to use the latest ubuntu LTS on our build image. We're not using this image to produce any releases (only CI runs), so updating the image will have no effect on our releases.
2023-06-07 03:31:53 +00:00
Nic Klaassen 1f6a4a26ff
fix: record applied login rules in github login event (#27437) 2023-06-07 02:16:23 +00:00
Isaiah Becker-Mayer 38486e158b
Primarily changes "match: '^.*\.dev\.example\.com$'" to "match: '^.*\.dev\.example\.com'" so that users aren't mistakenly guided towards eliminating the implicit ":3389" from their regex matches (#27423) 2023-06-07 02:02:34 +00:00
Lisa Kim 89dfb4cc64
Web: Plugin tweaks and new plugin icons (#27427)
Move plugin kinds so we have only one source of truth
2023-06-07 00:57:32 +00:00
Trent Clarke 8a2946ebc9
Integrate AMI buids into drone (#27354) 2023-06-06 23:28:01 +00:00
Brian Joerger b7fed8ae72
Fix an unintended interaction between and Proxy Templates where the environment variable is prioritized over the template. (#27492) 2023-06-06 22:58:51 +00:00
Trent Clarke 7febb5010c
RFD: Delivering more secure AMIs (#24726)
* RFD: Delivering more secure AMIs

* Update rfd/XXXX-securing-amis.md

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

* Update rfd/XXXX-securing-amis.md

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

* Update rfd/XXXX-securing-amis.md

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

* Update rfd/XXXX-securing-amis.md

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Mike Jensen <jentfoo@users.noreply.github.com>

* US spellings

Co-authored-by: Mike Jensen <jentfoo@users.noreply.github.com>

* US Spelling

Co-authored-by: Mike Jensen <jentfoo@users.noreply.github.com>

* Apply suggestions from code review

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

* Stash

* Assign number

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Mike Jensen <jentfoo@users.noreply.github.com>
Co-authored-by: Gus Luxton <gus@goteleport.com>
2023-06-06 22:23:42 +00:00
Michelle Bergquist 5c3c84ab73
add new CTA event property (#27216) 2023-06-06 22:03:54 +00:00
Ben Arent fb15f1de44
Change Campaign to utm_campaign (#26819)
* Change Campaign to utm_campaign

* yarn prettier-write

* Fix Tests

* Update Support.story.test.tsx.snap

* Update ButtonLockedFeature.test.tsx
2023-06-06 21:56:28 +00:00
Ben Arent 46768ac63e
bump version numbers in Readme (#26387) 2023-06-06 21:10:59 +00:00
Paul Gottschling 1fff85ae85
Add scaling warning re: DynamoDB (#27369)
Closes #25170

Since we want to keep docs on configuring Teleport's backends within the
Backend Reference, add a Notice to this reference in the DynamoDB
section.
2023-06-06 20:53:48 +00:00
Alex Fornuto 618555f5cf
Update Kubernetes Service Account nav listing... (#27307)
to align with the rest of the items in this sub-menu, as discussed in https://github.com/gravitational/teleport/pull/27054\#pullrequestreview-1456063634
2023-06-06 20:50:40 +00:00
Alex Fornuto d213ed6917
Docs: Trusted Clusters - Mention the correct expiration time as per tctl command (Buddy PR) (#27285)
* Update trustedclusters.mdx

* Update trustedclusters.mdx

* Update trustedclusters.mdx

---------

Co-authored-by: Puru <5674762+tuladhar@users.noreply.github.com>
2023-06-06 20:49:13 +00:00
Steven Martin acf805e492
docs: adds configuration and helm chart to app access getting started (#24026)
* initial app access updates

* Add helm and configure for app access start

* Fix app configure

* change to just configure

* Update docs/pages/application-access/getting-started.mdx

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

* fix image description

* verbiage updates

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

* update app access for dns address

* lint fix

---------

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-06-06 20:00:13 +00:00
Brian Joerger 193abfdf2c
Only fallback to SSH_TELEPORT_ env variables for proxy, user, and cluster name when used with headless. (#27057) 2023-06-06 19:53:45 +00:00
Marco André Dinis 0c28f8749c
Move Cloud Matchers to proto (#27162)
* Move Cloud Matchers to proto

As described in RFD0125, we are going to create a new resource:
DiscoveryConfig

This new resource will contain the Cloud Matchers as spec fields:
- AWSMatcher
- AzureMatcher
- GCPMatcher

To define grpc methods that use this new resource, we must create all
the matchers types as part of the proto definition.

This PR moves those definitions into types.pb.go and removes them from
`lib/services.{AWS,Azure,GCP}Matcher`.

This should have no side effect in business logic given that we re-use
the same field names everywhere.

* remove most of gogo tags

* Revert "remove most of gogo tags"

This reverts commit 5ecf8d0cec.

* fix typos
2023-06-06 19:02:58 +00:00
Isaiah Becker-Mayer 03ec34708d
Converts the default Content-Security-Policy representation to a map (#27182)
* Converts the default Content-Security-Policy representation to a map
which makes it easier to programmatically add-to/overwrite the defaults
for special cases.

Also adds tests for the various custom CSPs.

* Alphabetize CSP directives for ease of testing/debugging in the future

* makes maps more easily composable

* making string concatenation more efficient

* code review tweaks

* plain require.Contains
2023-06-06 18:38:18 +00:00
Andrew Burke 7277554845
Docs: GCP join method (#27054)
* Add GCP join method docs

* Update prerequisites

* Fix linting

* Fix linting

* Address comments

* Fix Kube join link

* Fix punctuation
2023-06-06 17:47:38 +00:00
Gavin Frazar 906ef1bad4
Document all installer script template vars (#27322)
* Document all installer script template vars

* replace aws ssm reference with generic terms
2023-06-06 17:42:04 +00:00
Sakshyam Shah 796b2d29a0
device trust marshalers (#24963)
* feat: device resource in tctl get all

* check for device resource but ignore in favour of enterprise resource migration

* add firstStart indicator in auth service config. Tests

* remove device bootstrap from this PR

* multiple updates:
- remove resource marshaler, this will be added to e repo instead
- remove device resource checks in oss (not needed as resource marshaler now added to e). tests removed

* move device marshalers to service package

* run fix-imports, fix test

* remove device case from itemsFromResource
2023-06-06 17:29:49 +00:00
Paul Gottschling ca474f2ded
Trim yum release version in install-linux.mdx (#27367)
* Trim yum release version in install-linux.mdx

Fixes #20978

The `$VERSION_ID` variable we tell users to use when adding our yum repo
is incorrect, since it does not include a minor version. This
quick-and-dirty fix instructs users to trim `$VERSION_ID` to include
only the major version before adding the repo.

* lint fixes

---------

Co-authored-by: Steven Martin <steven@goteleport.com>
2023-06-06 17:13:40 +00:00
Steven Martin e80ecbfbd1
docs: add enterprise value for kube agent reference (#27446)
* docs: add enterprise value for kube agent reference

* correct spacing
2023-06-06 16:44:18 +00:00
Gabriel Corado 5a4c3d3ea6
MongoDB Atlas IAM authentication docs (#26831)
* docs(db): add section on how to configure mongo atlas aws iam auth

* Apply suggestions from code review

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

* docs(mongodb-atlas): code review changes

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-06-06 16:44:06 +00:00
Steven Martin 76a1277442
include changelog for docs tests (#27449)
* include changelog for docs tests

* correct capitalization for file type

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

* include CHANGELOG.md as ignored in bypass

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-06-06 16:36:28 +00:00
Marco André Dinis 034592e7e6
Docs: improve Postgres in GCP (#27141)
* Docs: improve Postgres in GCP

Add `auth_token` in `teleport.yaml` example.

Show how to set the `GOOGLE_APPLICATION_CREDENTIALS` in a `systemd` env.

* suggest the usage of EnvironmentFile
2023-06-06 16:20:04 +00:00
Jakub Nyckowski eb4acddf06
Move Connect build to a new Docker container (#27175)
* Move Connect build to a new Docker container

* Update comments

* Update comments
Remove unused packages and unused arguments

* Always use UID=1000 for building teleterm.
2023-06-06 15:28:20 +00:00
Michael 69702eea4f
Update eref (#27463) 2023-06-06 15:11:44 +00:00
Gabriel Corado a200271ac5
Support authenticating with AWS IAM role for MongoDB Atlas (#26439)
* feat: support authenticating with AWS IAM for MongoDB Atlas

* chore(lint): fix errors

* test(tsh): add missing database field

* refactor(mongodb): check for error on each authenticator branch

* refactor(mongodb): update log messages and atlas check

* refactor(auth): use IsRoleARN helper instead of IsARN

* chore(db): remove unused line

* chore(mongodb): split authenticator func

* refactor(db): rename get atlas token function

* tests(db): reuse already existent auth property

* chore(mongodb): add docs reference

* refactor(db): support role chaining

* feat(types): "require" iam role for atlas users

* refactor(db): use external id only on the first session

* refactor(services): add new database matcher for regular users and aws

* chore(db): rename functions to be more assertive

* chore(types): fix lint

* test(db): remove duplicated test

The test being removed here is covered by `TestMongoDBAtlas`
(lib/srv/db/auth_test.go).
2023-06-06 14:57:27 +00:00
teleport-post-release-automation[bot] 7c66bb8e24
[auto] Update AMI IDs for 13.1.0 (#27440)
Co-authored-by: GitHub <noreply@github.com>
2023-06-06 14:56:23 +00:00
Noah Stride cb39f79500
Machine ID stability: separate bot identity and impersonated identity renewal (#24267)
* Start breaking apart bot renewal loops

* Refactor initial bot identity fetching

* Tidy up some log messages

* Add renewal loop for bot identity

* Tidy up logging

* Add channel broadcaster so multiple can listen

* Fix compilation

* Ensure template instructions include join-method

* Fail harder for template failure to render

* More graceful failure to describe identity

* support partial renewals of bot identity

* Move methods to helper functions to avoid potential state confusion

* Simplify how template renderers access the bot

* Simplify bot mock in tbot/config tests

* Add integration test for whole bot

* Further tidying of test

* Fix operator sidecar bot invocations

* Fix anonymous telemetry testing

* Ensure we always return the unlock

* Nicer error message

* Use better naming for provider/organise impersonated_identity file

* Ensure impersonated client closed on failure

* Close testclient after initialize complete

* Fix tests in main package

* Missing license header

* Allow join method to be omitted for `tbot init`

* Use correct limit in log messages for bot identity renewal

* Propagate new identity before persisting it to disk

* Move warning about renewal interval

* document unsubscribe

* Support SIGHUP again
2023-06-06 10:53:25 +00:00
Rafał Cieślak 53b0118cff
Document lack of stability of lib/teleterm gRPC API (#27275) 2023-06-06 08:19:06 +00:00
Steven Martin 5e60f90016
docs: add install to fluentd linux install (#27308)
* docs: add install to fluentd linux install

* update executable call

* include install in linux
2023-06-06 02:29:08 +00:00
Brian Joerger 70c5ce7e8c
Add tsh e2e tests with various security features enabled (#26862)
* * Refactor tool/tsh to enable tsh e2e tests outside of the tsh package.

* Add tool/teleport/testenv to enable easier e2e tests from outside
  packages.

* Skip all flaky test checks when * is provided.
2023-06-06 01:25:09 +00:00
Jakub Nyckowski 724f6a1f76
[Assist] Do not parse event data is there is none (#27431)
* [Assist] Do not parse event data is there is none

If there is no session data UI should not try to parse them, otherwise it will crash as this happens currently.

* Move more code.

* Update web/packages/teleport/src/Assist/contexts/messages.tsx

Co-authored-by: Lisa Kim <lisa@goteleport.com>

---------

Co-authored-by: Lisa Kim <lisa@goteleport.com>
2023-06-05 23:31:44 +00:00
Noah Stride f4a4ae6f41
Add prometheus endpoint to tbot (#27394) 2023-06-05 23:19:58 +00:00
Forrest 2ec7490283
loadtesting automation improvements (#25366)
* move existing loadtest assets

* new loadtest automation helpers

* ignore sourcing uncovered files
2023-06-05 23:11:56 +00:00
Michael Wilson e5ba338cea
Document new Okta import rule regexes. (#27396)
* Document new Okta import rule regexes.

Okta import rules now support regex matching for label application.

* Use a better word for the example regex.
2023-06-05 22:33:34 +00:00
Alan Parra 5316027d21
chore: Bump golangci-lint to v1.53.2 (#27381)
Update to latest patch.
2023-06-05 21:37:48 +00:00