gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
16.93k stars 1.7k forks source link

Machine ID: Add Debug log on proxy template loading #43164

Closed strideynet closed 1 week ago

strideynet commented 1 week ago

We encountered a customer who had a non-visible unicode character in their proxy template file and it was causing the regex to not match. It took ages to find this. This PR logs the loaded config in a way that should make this more obvious:

Loaded proxy template template:"\u00a0'^([\\w\\d-]+)\\.([\\w\\d\\.]+)\\.label:([0-9]+)$'" proxy: host: cluster:$2 query:labels.multiple == "$1" search: tbot/service_ssh_multiplexer.go:241
public-teleport-github-review-bot[bot] commented 1 week ago

@strideynet See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR