-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Password containing $
doesn't work when passed via ${env:DB_PASSWORD}
#8215
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
$
doesn't work when passed via ${env:DB_PASSWORD}
$
doesn't work when passed via ${env:DB_PASSWORD}
$
doesn't work when passed via ${env:DB_PASSWORD}
$
doesn't work when passed via ${env:DB_PASSWORD}
The Collector supports recursively expanding
In your case this would be |
Thanks for replying! Actually, the password is stored in a Secret resource: apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
...
spec:
config: <configuration mentioned above>
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secrets
key: password (By the way, the Secret resource is synchronized by External Secrets Operator in my project.) Must it be stored in the Secret resource (or its secret backend) as escaped |
$
doesn't work when passed via ${env:DB_PASSWORD}
$
doesn't work when passed via ${env:DB_PASSWORD}
I moved this to opentelemetry-collector since this is not specific to the postgresql receiver, but rather applies to configuration more generally. I think this would not happen if the expandconverter was not enabled. Since this is a legacy component that we want to remove in favor of @open-telemetry/collector-maintainers what do you think? Would you be open to such feature gate? |
Discussed in SIG 12/20, we will work towards deprecating the naked See open-telemetry/opentelemetry-specification#3744 for the spec change. As part of this, we will probably deprecate the |
**Description:** Adds an RFC about how environment variable resolution should work **Link to tracking Issue:** Fixes #9515, relates to: - #8215 - #8565 - #9162 - #9531 - #9532 --------- Co-authored-by: Alex Boten <[email protected]> Co-authored-by: Evan Bradley <[email protected]>
We've made progress toward this issue. The collector now:
To officially work towards deprecating the
|
Actually this issue is still blocked by #7111 |
**Description:** Adds an RFC about how environment variable resolution should work **Link to tracking Issue:** Fixes open-telemetry#9515, relates to: - open-telemetry#8215 - open-telemetry#8565 - open-telemetry#9162 - open-telemetry#9531 - open-telemetry#9532 --------- Co-authored-by: Alex Boten <[email protected]> Co-authored-by: Evan Bradley <[email protected]>
#### Description This PR adds a feature gate that will handle transitioning users away from expandconverter, specifically expanding `$VAR` syntax. The wholistic strategy is: 1. create a new feature gate, `confmap.unifyEnvVarExpansion`, that will be the single feature gate to manage unifying collector configuraiton resolution. 2. Update expandconverter to return an error if the feature gate is enabled and it is about to expand `$VAR` syntax. 3. Update `otelcol.NewCommand` to set a `DefaultScheme="env"` when the feature gate is enabled and no `DefaultScheme` is set, this handles `${VAR}` syntax. 4. Separately, deprecate `expandconverter`. 5. Follow a normal feature gate cycle. 6. Removed the `confmap.unifyEnvVarExpansion` feature gates and `expandconverter` at the same time Supersedes #10259 #### Link to tracking issue Related to #10161 Related to #8215 Related to #7111 #### Testing Unit tests
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Moves confmap.unifyEnvVarExpansion to beta. This means the collector will, by default, use the env var provider to expand `${FOO}` synatx and will error if the expandconverter is used to expand `$FOO` syntax. <!-- Issue number if applicable --> #### Link to tracking issue Related to #10161 Related to #8215 Related to #7111 --------- Co-authored-by: Pablo Baeyens <[email protected]>
…0508) #### Description This PR promotes the `confmap.unifyEnvVarExpansion` feature gate to stable and sets a `ToVersion` of `v0.106.0`, anticipating that the gate be completely removed in that version. We should weigh if switching the Stable should be done in `v0.105.0` or if it needs more time in `Beta` to give users more time to switch. Delaying promotion to `Stable` delays confmap 1.0. If we merge this we need to commit to merging #10510 in the same release. #### Link to tracking issue Related to #10161 Related to #7111 Related to #8215 --------- Co-authored-by: Evan Bradley <[email protected]>
Component(s)
receiver/postgresql
What happened?
Password containing
$
doesn't work when passed via${env:DB_PASSWORD}
.When passed directly, it works.
Description
Steps to Reproduce
user
p@s$w0rd
Expected Result
Authentication passes.
Actual Result
Authentication fails.
Given password directly, authentication passes.
Collector version
otel/opentelemetry-collector-contrib:0.81.0
Environment information
Environment
contrib Docker Image
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: