Commit Graph
38 Commits
Author SHA1 Message Date
STeve (Xin) Huang 54652cf690 Force directConnection=true for mongo clients (#52979) 2025-03-12 13:58:18 +00:00
Paul Gottschling 70d70a2d60 Fix outdated docs URLs (#50923)
- Web UI source
- README
- lib
- api

Do not touch docs URLs in test case names or test data where we don't
expect users to navigate to the URLs.
2025-01-16 18:17:35 +00:00
Krzysztof Skrzętnicki 7b0de4136e Support Oracle connections without wallet (#49753)
* Add support for Oracle connections without wallet. Backwards compatible.

* Bypass maybeAddOracleOptions for non-Oracle protos

* use named const

* fix lint issues

* Update PR to slog

* lint fix
2025-01-03 18:01:46 +00:00
rosstimothy 267b9f0f26 Convert lib/teleterm to use slog (#50335) 2024-12-18 22:46:08 +00:00
Zac Bergquist ec3e48bec4 all: use package filepath for file paths (#47061)
Some day Teleport will run on systems that don't use / as a path
separator.
2024-10-01 21:49:43 +00:00
Nic Klaassen 7906e13952 split user keys for db access (#44718) 2024-08-08 01:10:41 +00:00
STeve (Xin) Huang f240bfb312 Amazon DocumentDB access part 1 (#43867)
* Amazon DocumentDB access part 1

* fix lint

* make derive
2024-07-16 15:17:06 +00:00
STeve (Xin) Huang e33400ad40 Fix an issue Oracle access failed through trusted cluster (#42880)
* Fix an issue Oracle access failed through trusted cluster

* add note on profile.Cluster
2024-06-13 16:24:47 +00:00
Gavin Frazar ed7d0d223e support gcloud spanner in tsh and web UI (#41129)
* add spanner to tsh and teleterm

* handle spanner events in web ui

* update web audit events test snapshot

* customize web ui connect for spanner

* update ConnectDialog snapshot
2024-05-07 23:17:03 +00:00
Rafał Cieślak 584fd5def7 Use dbcmd.WithPrintFormat only for preview of teleterm gateway command (#39906)
* Use dbcmd.WithPrintFormat only for preview of teleterm gateway command

* Update comments for GatewayCLICommand message

* Mark check funcs as helpers, verify args length first
2024-03-29 15:35:52 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2023-12-01 17:48:14 +00:00
Marek Smoliński cef6f0f616 Fix Oracle Windows Path Separator (#31077) 2023-08-29 06:45:58 +00:00
Marek Smoliński 3160e90119 Add ClickHouse DB Engine (#27004) 2023-07-21 15:19:24 +00:00
Gavin Frazar e620afae3e Fix MySQL and Postgres opt file path override (#29220)
* add test-specific override flags instead of reusing .tsh
  dir override.
2023-07-20 18:20:36 +00:00
STeve (Xin) Huang 336518e0b5 Connect Kube gateway part 2: command provider (#28920)
* Connect Kube gateway part 2: command provider

* gateway.Database and gateway.Kube interface

* remove cmd.ProviderManager and fix integration test

* revert cluster.RootClusterName change for now as profile may not have key
2023-07-17 13:11:30 +00:00
Gavin Frazar 2b2de5c6be update tsh db resource selection (#28505)
* update tsh db resource selection

* add --labels and --query to tsh db subcommands
* tsh db [login | logout | env | config | connect]
* tsh proxy db

* add hasPrefix to predicate lang

* add teleport.dev/discovered-name
* print "discovered name" of databases discovered by discovery service,
  which is the name of the database resource in the cloud, when using
  tsh db ls without --verbose flag. This avoids printing verbose
  uniquely identifying names when discovery service is updated to append
  a uniquely identify suffix to discovered databases in AWS/Azure/GCP.
* tsh db ls --verbose ignores the label
* fix db connect string in tsh db ls

* select database by prefix, labels, and/or query predicate.
* chooses active database by exact match if the "prefix" matches exactly
  and no labels/predicate is given.
* logout of a subset of databases with tsh db logout.
* print an "ambiguous match" error if prefix/labels/query matches
  multiple databases where one is required.
* move all --labels cli flags to cf.Labels from cf.UserHost

* update tsh db tests
    * speedup slow tsh db tests
    * postgres/mysql profile respect home dir
    * rename test cases for consistency
    * test database listing uses discovered-name
    * test login/env/config/logout with prefix/label/predicate selectors
    * test active db filtering logic

* fix tests broken by merge
2023-07-14 23:41:32 +00:00
Gabriel Corado caacc54696 feat(dbcmd): add sqlcmd support (#28918) 2023-07-11 12:42:59 +00:00
STeve (Xin) Huang 2cba82cb33 tsh db connect should prefer mongosh (#28539) 2023-07-04 19:47:30 +00:00
Gavin Frazar dbb2aaf5f8 refactor tsh db (#26182)
* simplify and consolidate db info retrieval
* avoid fetching the same database multiple times
* simplify tsh db connect local proxy requirements
2023-05-19 21:37:11 +00:00
Rafał Cieślak ad1af246ed Replace GetConnectCommandNoAbsPath with os.exec.Cmd.Args (#26121)
* Replace GetConnectCommandNoAbsPath with os.exec.Cmd.Args

* Remove dbcmd.Execer.Command

It is no longer needed now that GetConnectCommandNoAbsPath has been removed.

* Refactor Gateway.CLICommand and add test
2023-05-15 15:30:17 +00:00
Krzysztof Skrzętnicki 2af9d76ec0 AWS-hosted OpenSearch support (#23305)
* AWS-hosted OpenSearch support.

* Review: comments, case, cleanup.

* Review: comments, region discovery, typos, shared func, fix error type, fix empty CA case.

* Review: address comments.

- add docs
- refactor opensearch engine code
- make `opensearchsql` default client
- drop utils.CloneRequest function, it is not suitable for general use
- drop "extra args" functionality, it should be a separate PR and more generic
- minor refactorings

* Fix: linting, refactoring issues.

* Review: update the comment for accuracy.

* Correct merge issue.

* Review: reuse transport, use different context, rename tests

* Review: unexport internal error types, explicitly test the error serialization.
2023-04-13 06:14:39 +00:00
Marek Smoliński 0f3c14e0f9 Add Support for Oracle protocol (#23227) 2023-03-31 17:35:21 +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
STeve (Xin) Huang b901aced00 Fix "tsh db connect" with "mariadb" when proxy is in seperate port mode (#20353) 2023-01-18 21:04:16 +00:00
Gavin Frazar 5bb0ef15db add dynamodb database access (#18843)
* Add a new db engine
* Add tests for new engine
* Update tsh db subcommands
* Refactor error message and suggestions for unsupported tsh commands
* Add dynamodb to test plan
* Add AWS external ID to db config and update protos
2022-12-30 18:22:30 +00:00
Gavin FrazarandMarek Smoliński ab91963d58 db access denied error message improvement (#16228)
* Fix matchers not being printed in err message

* Add helpful message when access is denied to db connect

* Add test for converting command errors

* Simplify error message when access to db is denied

* Update lib/client/db/dbcmd/dbcmd_test.go

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

* Remove unnecessary cmd.Run in test

* Fix import order

* Add full error to message

* Fix formatting of github suggestion

* Add troubleshooting link

* Update troubleshooting link to use subheading

Co-authored-by: Marek Smoliński <marek@goteleport.com>
2022-10-26 12:13:09 -07:00
Marek Smoliński 7aa224e430 Add Cassandra/Scylla database support (#15895) 2022-10-10 12:37:51 +02:00
Krzysztof Skrzętnicki af7cd0239d Elasticsearch: alternative clients (#16670) 2022-09-29 17:53:49 +00:00
STeve (Xin) Huang d58740e513 Fix issue "tsh db env" returns error when TLS routing enabled (#16252) 2022-09-16 13:03:44 +00:00
44b89c75c0 Elasticsearch support (#15768)
Co-authored-by: Anton Miniailo <anton@goteleport.com>
Co-authored-by: Marek Smoliński <marek@goteleport.com>
2022-09-05 18:58:21 +02:00
STeve (Xin) Huang cf88c0a283 Capture stderr from "tsh db connect" and reformat redis error (#13843) 2022-07-05 21:25:43 +00:00
Rafał Cieślak a7760a4f71 Teleport Connect: Add SetGatewayTargetSubresourceName RPC (#13476)
* clusters.CreateGateway: Trim spaces when building a CLI command

If cliCommand.Env is empty, the returned command has an empty space at
the front.

* Do not pass TargetSubresourceName when fetching certs for gateway

Since we want to be able to freely specify the db name after the gateway
creation, let's not pass the db name when creating the gateway to show
the intent more clearly.

* Make CLICommand a method on Gateway rather than a field

* Extract getting cluster by resource URI to Storage
2022-06-27 13:43:48 +00:00
STeve (Xin) Huang 188354f95e Remove lib/srv/db/common import from tsh (#13866) 2022-06-25 13:51:58 +00:00
STeve (Xin) Huang 8cb7522aab Mongo clients with serverSelectionTimeoutMS set to 5000 (#13408) 2022-06-24 18:43:18 +00:00
rosstimothy e5c745f331 Add manual tracing instrumentation to tsh (#13204)
Create spans for all public facing TeleportClient,
ProxyClient, and NodeClient methods. This makes
correlating spans easier to reason about when
looking at `tsh` traces. As a result of creating
spans, some additional context propagation is
required as well to ensure that spans are linked
properly.

This also removes the unused `quiet` argument from
`ConnectToCluster`. It's usage was not consistent
by existing callers, and it was ignored, so in order
to avoid confusion in future calls, it was removed.

#12241
2022-06-11 15:34:40 +00:00
Jakub NyckowskiandMarek Smoliński 9c046930ff Snowflake integration (#12564)
Add Snowflake integration.

Co-authored-by: Marek Smoliński <marek@goteleport.com>
2022-06-06 17:49:38 +00:00
Jakub Nyckowski b699eee50b Never use --tlsUseSystemCA and --tlsCAFile together with mongosh (#12361)
`mongosh` doesn't support `--tlsUseSystemCA` and `--tlsCAFile` combination passed together and fails CA validation with error when the required CA is not in the system store 
```
MongoServerSelectionError: unable to verify the first certificate
```
This change makes those flags mutually exclusive.
2022-05-02 18:36:44 +00:00
Rafał Cieślak 60f59725a9 Generate DB CLI commands for Teleterm from tsh daemon (#11835)
* Extract dbcmd.go into a new package under lib/client/db/dbcmd

* Use dbcmd to generate CliCommand for gateways

* Return relative db command from tsh daemon

* Add WithTolarateMissingCLIClient func to dbcmd
2022-04-14 08:29:26 +00:00