Files
teleport/lib/utils
Marco André Dinis a60d1c0f43 Download mTLS files from Web (#14526)
In the context of Teleport Discover we are trying to ease the usage of Teleport for the user's first interaction.

When adding a new database resource the user must, among other things, generate the mTLS files
Examples:
https://goteleport.com/docs/database-access/guides/postgres-self-hosted/#step-25-create-a-certificatekey-pair
https://goteleport.com/docs/database-access/guides/mysql-self-hosted/#step-24-create-a-certificatekey-pair

This PR aims to reduce this friction: the user should be able to setup the resource without prior setup of local tools (`tsh login`)
We're doing this by providing an endpoint that will return those exact files


Demo
```shell
marco@lenix ~/p/downloadmtls> curl --silent --insecure 'https://127.0.0.1.nip.io:3080/v1/webapi/sites/lenix/sign' --dat
a '{"hostname":"discover.example.com", "ttl":"9999h", "format": "db"}' --header 'Authorization: Bearer 308bf3dd3019ddc4
2cff44a48e028480' --header 'Content-Type: application/json' -OJ
marco@lenix ~/p/downloadmtls> tar -xvf teleport_mTLS_discover.example.com.tar.gz
server.key
server.crt
server.cas
marco@lenix ~/p/downloadmtls> head -1 server.*
==> server.cas <==
-----BEGIN CERTIFICATE-----

==> server.crt <==
-----BEGIN CERTIFICATE-----

==> server.key <==
-----BEGIN RSA PRIVATE KEY-----
```

Fixes https://github.com/gravitational/teleport/issues/14049
2022-08-01 10:14:18 +01:00
..
2022-04-19 20:08:36 -06:00
2022-07-26 14:47:12 +00:00
2021-07-21 14:35:04 -07:00
2022-07-14 10:51:23 +00:00
2022-06-15 22:26:24 -07:00
2022-06-18 21:28:07 +00:00
2022-06-23 00:27:29 +00:00
2022-07-14 19:22:54 -07:00
2022-07-14 10:51:23 +00:00
2020-10-13 00:22:49 +00:00
2020-04-17 20:05:38 +00:00
2021-10-19 14:00:24 -04:00
2022-07-14 19:22:54 -07:00
2022-07-14 10:51:23 +00:00
2021-10-19 09:21:55 -06:00
2021-10-19 09:21:55 -06:00
2021-10-19 09:21:55 -06:00
2021-10-19 09:21:55 -06:00
2022-06-08 18:12:45 +00:00
2022-06-18 21:28:07 +00:00
2022-06-02 17:08:24 +00:00
2022-07-14 10:51:23 +00:00
2016-12-08 18:43:37 -08:00
2021-10-19 14:00:24 -04:00
2021-12-09 19:50:44 +00:00
2020-09-28 23:08:56 -07:00
2022-07-13 11:19:18 -07:00
2019-05-07 14:17:11 -07:00
2021-10-19 14:00:24 -04:00
2022-07-14 10:51:23 +00:00
2022-07-14 19:22:54 -07:00
2022-04-05 19:44:46 +00:00