-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Dynamic registration not matching AND label definitions properly #11285
Comments
@Richard-Barrett I used following setup: db agent config: db_service:
enabled: true
resources:
- labels:
env: prod
account: acc1 db dynamic rersource: kind: db
version: v3
metadata:
name: example1
labels:
env: prod
account: acc1
spec:
protocol: "postgres"
uri: "localhost:5432"
---
kind: db
version: v3
metadata:
name: example2
labels:
env: prod
account: acc2
spec:
protocol: "postgres"
uri: "localhost:5432"
---
kind: db
version: v3
metadata:
name: example3
labels:
env: dev
account: acc1
spec:
protocol: "postgres"
uri: "localhost:5432"
---
kind: db
version: v3
metadata:
name: example4
labels:
env: dev
account: acc2
spec:
protocol: "postgres"
uri: "localhost:5432" And after creation of db example* resource I can observe correct behavior where only the
Could you provide the config where this issue can be observed or point out what is the difference between upper-mentioned configuration and the config described in the issue ? |
@smallinsky Hey Marek, as per our testing this is the same result. Apparently it seems if you only used the localhost without any aws in the URI or region that will work...
or
|
Fixed in #11868 |
Description
The dynamic DB registration does not match properly when you use resource labels.
The following example showcases the use of
env
andaccount
, however, the labels are not respected and thus not properly matched.What happened:
The customer has the following architecture
Proxy with resource labels:
Which is supposed to only match database labels with
env: prod
ANDaccount: someaccount
.Databases with different accounts should not get matched with the above proxy, but they do.
What you expected to happen:
Labels should respect multiple T-Value pairs as an
AND
condition and notOR
behavior.Reproduction Steps
As minimally and precisely as possible, describe step-by-step how to reproduce the problem.
Server Details
teleport version
): 8.3.4Debug Logs
##NOTE**: CUSTOMER CAN NOT USE TAGS AS A RESULT THEY ARE TRYING TO MITIGATE WITH RESOURCE LABELS DUE TO THE WAY THEY HAVE THEIR ARCHITECTURE SET UP!!!
The text was updated successfully, but these errors were encountered: