Commit graph

13 commits

Author SHA1 Message Date
Krzysztof Skrzętnicki 734362909b
Changes for tctl sso test, tctl sso configure commands [SAML] (#11508)
* Changes for tctl sso test, tctl sso configure commands.

* Log SSO diagnostic information for SSO test flows. 

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-05-04 11:48:20 +02:00
Jakub Nyckowski d5d2a72ace
Advertise correct MySQL server version (#12196)
Teleport now will try to extract MySQL server version from initial handshake package instead of sending `8.0.0-Teleport` every time. This string can be overridden by new configuration option `mysql.server_version`. On DB service start Teleport will also try to fetch the current version from MySQL/MariaDB instance. After that the server version will be updated on every successful connection to keep it up to date.

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2022-04-29 22:22:11 +00:00
Rafał Cieślak 83b5f1dcb7
Connect: Use SSHAgentLogin when second_factor is set to optional or on (#12322) 2022-04-29 16:21:24 +02:00
Rafał Cieślak 8c24affcbc
Connect: Refresh leaf cluster certs before fetching certs for database (#12293)
* Storage.fromProfile: Set correct SiteName for leaf clusters

* Cluster.CreateGateway: Use SiteName for CertPath

* Cluster.ReissueDBCerts: Refresh leaf cluster certs
2022-04-29 09:06:04 +00:00
Grzegorz Zdunek d9deaff3d4
Add proxy_host and temporary actual_name fields to the cluster response object (#12234) 2022-04-28 09:24:21 +00:00
Rafał Cieślak b3db804fc7
Teleport Connect: Accept database name when setting up proxy (#12173)
* Add target_subresource_name to proto files

* Pass database name when creating certs and CLI command
2022-04-26 09:38:56 +00:00
Rafał Cieślak 856f0920c3
Expose RoleSet.EnumerateDatabaseUsers to Teleport Terminal (#12070) 2022-04-21 09:13:46 +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
Roman Tkachenko 97c0b5cb83
Add auth'd tunnel mode to tsh proxy db command (#11720) 2022-04-07 18:33:39 +00:00
Rafał Cieślak ef2ae6f7de
Move WebConfig from lib/web/ui to api/client/webclient (#11690)
* Move WebConfig from lib/web/ui to api/client/webclient

Web config was shared with the Web UI through the dynamically generated
/web/config.js file available on the cluster. With the addition of
Teleport Terminal (RFD 63), the Electron app needs to get a hold of this
config as well.

However, unlike the Web UI which directly loads the file and injects
the config this way, any communication between the cluster and Teleport
Terminal is done through the tsh daemon (RFD 63). The tsh daemon needs
to essentially pipe this config from /web/config.js to the gRPC response
it gives to Teleport Terminal.

To achieve this, a GetWebConfig function was added to TeleportClient.
Unfortunately, this breaks the build on Windows as lib/web (where WebConfig
resides) includes code which is not meant to be compiled or run on Windows.

Since we need to share the web config with another frontend application,
it only makes sense to move it to the webclient package. We already have
types shared between the server and the client there, for example the
PingResponse struct.
2022-04-05 08:47:53 +00:00
Rafał Cieślak 3999b1798b Use db name for URI in Teleterm rather than db server host ID
The previous version of the code used GetHostId return value for the URI.
That caused problems as a single host can run multiple database servers.
This in turn resulted in stuff like Teleterm not listing all databases.

There's `Database.GetURI` function which I decided not to use, because it's
an URI on its own which might include stuff like port numbers and what not.
I wanted to avoid a situation in which the database URI creates some potential
conflicts with the Teleterm URIs.

I noticed that the Web UI code runs `DeduplicateDatabases` already and it
uses `Database.GetName` underneath, so I deemed it a good candidate to be
a part of a database URI in Teleterm.

Fixes gravitational/webapps.e#127
2022-04-01 13:02:56 +02:00
Rafał Cieślak 113ac5344e Use oneof for LoginRequest params
The login is either local or SSO but not both.
2022-04-01 13:02:56 +02:00
Alexey Kontsevoy 4d0c0b2c84 teleterm (alpha) 2022-04-01 13:02:56 +02:00