Skip to content
New issue

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

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

Already on GitHub? # to your account

Faulty Regex Pointer Not Utilized Properly On Certain DB Naming Conventions In Resource Tags #11392

Closed
Richard-Barrett opened this issue Mar 23, 2022 · 1 comment
Labels
bug c-cro Internal Customer Reference

Comments

@Richard-Barrett
Copy link

Richard-Barrett commented Mar 23, 2022

Description

Faulty Regex Pointer Not Utilized Properly On Certain DB Naming Conventions In Resource Tags

What happened:
A Customer used the following DB Resource Tags for their RDS Instances:

db_service:
  enabled: "yes"
  aws:
  - types: ["rds"]
    regions: ["us-west-1"] # AWS regions to fetch databases from
    tags: # AWS database resource tags to match
      "*": "*"
database resource: invalid label key: "ssm:tperf-rds_schedule-on". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114

What you expected to happen:
The Regex Pointer utilized watchers/rds.go:114 should allow for complex mappings, and it does not seem like it is respecting Resource Tags with syntax and/or special characters.

It should work with special characters

Reproduction Steps

As minimally and precisely as possible, describe step-by-step how to reproduce the problem.

  1. Create an RDS Instance with Special Characters
  2. Implement Syntax within the db_service resource block
  3. RDS-WATCH Fails

Server Details

  • Teleport version (run teleport version): 8.1.5
  • Where are you running Teleport? (e.g. AWS, GCP, Dedicated Hardware): AWS

Debug Logs

Please include or attach debug logs, when appropriate. Obfuscate sensitive information!

  • Start Teleport with --debug flag (teleport --debug)
  • Run tsh with --debug flag (tsh --debug)
2022-03-01T10:52:39Z INFO [RDS-WATCH] Could not convert RDS instance "***-***-***" to database resource: invalid label key: "ssm:tperf-rds_schedule-on". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114
2022-03-01T10:52:39Z INFO [RDS-WATCH] Could not convert RDS instance "***-***-***-***" to database resource: invalid label key: "ssm:tperf-rds_schedule-off". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114
2022-03-01T10:52:39Z INFO [RDS-WATCH] Could not convert RDS instance "***-***-***-***" to database resource: invalid label key: "ssm:tperf-rds_schedule-off". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114
2022-03-01T10:52:39Z INFO [RDS-WATCH] Could not convert RDS instance "***-***-***-***" to database resource: invalid label key: "ssm:tperf-rds_schedule-on". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114
2022-03-01T10:52:39Z INFO [RDS-WATCH] Could not convert RDS instance "***-***-***-***" to database resource: invalid label key: "ssm:tperf-rds_schedule-on". labels:map[*:[*]] region:ap-northeast-1 watchers/rds.go:114

gz#4231

@Richard-Barrett Richard-Barrett added bug c-cro Internal Customer Reference labels Mar 23, 2022
@zmb3
Copy link
Collaborator

zmb3 commented Apr 29, 2022

I don't exactly know what you mean by "regex pointer" but : is a valid label character as of #11563, so upgrading to the latest 8.3.x should resolve this.

@zmb3 zmb3 closed this as completed Apr 29, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug c-cro Internal Customer Reference
Projects
None yet
Development

No branches or pull requests

2 participants