Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14] Add database-tunnel service to Machine ID reference (40993) #41040

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/pages/machine-id/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,45 @@ principals:
(!docs/pages/includes/machine-id/common-output-config.yaml!)
```

### Services

Services are configurable long-lived components that run within `tbot`. Unlike
Outputs, they may not necessarily generate artifacts. Typically, services
provide supporting functionality for machine to machine access, for example,
opening tunnels or providing APIs.

#### `database-tunnel`

The `database-tunnel` service opens a listener for a service that tunnels
connections to a database server.

The tunnel authenticates connections for the client, meaning that any
application which can connect to the listener will be able to connect to the
database as the specified user. For this reason, we heavily recommend using the
Unix socket listener type and configuring the permissions of the socket to
ensure that only the intended applications can connect.

```yaml
# type specifies the type of the service. For the database tunnel service, this
# will always be `database-tunnel`.
type: database-tunnel
# listen specifies the address that the service should listen on.
#
# Two types of listener are supported:
# - TCP: `tcp://<address>:<port>`
# - Unix socket: `unix:///<path>`
listen: tcp://127.0.0.1:25432
# service is the name of the database server, as configured in Teleport, that
# the service should open a tunnel to.
service: postgres-docker
# database is the name of the specific database on the specified database
# service.
database: postgres
# username is the name of the user on the specified database server to open a
# tunnel for.
username: postgres
```

### Destinations

A destination is somewhere that `tbot` can read and write artifacts.
Expand Down
Loading