isDistributorWorkerOrgID reports whether orgID matches the synthetic worker-name pattern that the distributor injects as X-Scope-OrgID when opening a long-lived PushStream: "ingester- -stream-push-worker- " When this pattern is detected, PushStream bypasses the orgID == req.TenantID check
(orgID string)
| 1748 | // pattern can spoof it and write to any tenant. The stream-level gRPC interceptor |
| 1749 | // enabled via -distributor.sign-write-requests-keys provides cryptographic proof. |
| 1750 | func isDistributorWorkerOrgID(orgID string) bool { |
| 1751 | return distributorWorkerOrgIDRe.MatchString(orgID) |
| 1752 | } |
| 1753 | |
| 1754 | func (u *userTSDB) acquireReadLock() error { |
| 1755 | u.stateMtx.RLock() |