-
Notifications
You must be signed in to change notification settings - Fork 316
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
config: allow exposing real secret value through marshal #487
Merged
roidelapluie
merged 1 commit into
prometheus:main
from
GiedriusS:allow_exposing_real_value
Apr 15, 2024
Merged
config: allow exposing real secret value through marshal #487
roidelapluie
merged 1 commit into
prometheus:main
from
GiedriusS:allow_exposing_real_value
Apr 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are external projects out there that marshal/unmarshal the Prometheus config that has secrets. To get the real value currently such horrible workarounds are in place: https://github.com/tkestack/kvass/blob/master/pkg/sidecar/injector.go#L175-L214 Let's add a way to get the original values through the `Secret` type to avoid such things. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
SuperQ
reviewed
Feb 28, 2024
desc string | ||
data tmp | ||
expected string | ||
trueValue bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"trueValue" isn't a very descriptive name. How about:
Suggested change
trueValue bool | |
marshalSecret bool |
Good idea, minor nit about the test setup. |
Is there any plan to merge the code in the next period of time? |
thanks, I think we can do the test improvement later on. |
SuperQ
added a commit
that referenced
this pull request
Apr 15, 2024
Make code more readable by replacing overly generic `trueValue` with the actual meaning `marshalSecret`. Fixes: #487 Signed-off-by: SuperQ <superq@gmail.com>
Merged
SuperQ
added a commit
that referenced
this pull request
Apr 15, 2024
Make code more readable by replacing overly generic `trueValue` with the actual meaning `marshalSecret`. Fixes: #487 Signed-off-by: SuperQ <superq@gmail.com>
codeboten
pushed a commit
to open-telemetry/opentelemetry-collector
that referenced
this pull request
Apr 23, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.53.0`](https://github.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://github.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@​grobinson-grafana](https://github.com/grobinson-grafana) in [prometheus/common#618 - config: allow exposing real secret value through marshal by [@​GiedriusS](https://github.com/GiedriusS) in [prometheus/common#487 - Fix up config test by [@​SuperQ](https://github.com/SuperQ) in [prometheus/common#621 - LabelSet.String: restore faster sort call by [@​bboreham](https://github.com/bboreham) in [prometheus/common#619 - LabelSet: add unit test for String method by [@​bboreham](https://github.com/bboreham) in [prometheus/common#620 #### New Contributors - [@​grobinson-grafana](https://github.com/grobinson-grafana) made their first contribution in [prometheus/common#618 - [@​GiedriusS](https://github.com/GiedriusS) made their first contribution in [prometheus/common#487 **Full Changelog**: prometheus/common@v0.52.3...v0.53.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
codeboten
pushed a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Apr 23, 2024
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.53.0`](https://github.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://github.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@​grobinson-grafana](https://github.com/grobinson-grafana) in [prometheus/common#618 - config: allow exposing real secret value through marshal by [@​GiedriusS](https://github.com/GiedriusS) in [prometheus/common#487 - Fix up config test by [@​SuperQ](https://github.com/SuperQ) in [prometheus/common#621 - LabelSet.String: restore faster sort call by [@​bboreham](https://github.com/bboreham) in [prometheus/common#619 - LabelSet: add unit test for String method by [@​bboreham](https://github.com/bboreham) in [prometheus/common#620 #### New Contributors - [@​grobinson-grafana](https://github.com/grobinson-grafana) made their first contribution in [prometheus/common#618 - [@​GiedriusS](https://github.com/GiedriusS) made their first contribution in [prometheus/common#487 **Full Changelog**: prometheus/common@v0.52.3...v0.53.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Yang Song <songy23@users.noreply.github.com>
rimitchell
pushed a commit
to rimitchell/opentelemetry-collector-contrib
that referenced
this pull request
May 8, 2024
…n-telemetry#32631) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.53.0`](https://github.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://github.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) in [prometheus/common#618 - config: allow exposing real secret value through marshal by [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) in [prometheus/common#487 - Fix up config test by [@&open-telemetry#8203;SuperQ](https://github.com/SuperQ) in [prometheus/common#621 - LabelSet.String: restore faster sort call by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#619 - LabelSet: add unit test for String method by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#620 #### New Contributors - [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) made their first contribution in [prometheus/common#618 - [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) made their first contribution in [prometheus/common#487 **Full Changelog**: prometheus/common@v0.52.3...v0.53.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Yang Song <songy23@users.noreply.github.com>
andrzej-stencel
pushed a commit
to andrzej-stencel/opentelemetry-collector
that referenced
this pull request
May 27, 2024
…#10021) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.53.0`](https://github.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://github.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) in [prometheus/common#618 - config: allow exposing real secret value through marshal by [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) in [prometheus/common#487 - Fix up config test by [@&open-telemetry#8203;SuperQ](https://github.com/SuperQ) in [prometheus/common#621 - LabelSet.String: restore faster sort call by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#619 - LabelSet: add unit test for String method by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#620 #### New Contributors - [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) made their first contribution in [prometheus/common#618 - [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) made their first contribution in [prometheus/common#487 **Full Changelog**: prometheus/common@v0.52.3...v0.53.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
cparkins
pushed a commit
to AmadeusITGroup/opentelemetry-collector-contrib
that referenced
this pull request
Jul 11, 2024
…n-telemetry#32631) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.53.0`](https://github.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://github.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) in [prometheus/common#618 - config: allow exposing real secret value through marshal by [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) in [prometheus/common#487 - Fix up config test by [@&open-telemetry#8203;SuperQ](https://github.com/SuperQ) in [prometheus/common#621 - LabelSet.String: restore faster sort call by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#619 - LabelSet: add unit test for String method by [@&open-telemetry#8203;bboreham](https://github.com/bboreham) in [prometheus/common#620 #### New Contributors - [@&open-telemetry#8203;grobinson-grafana](https://github.com/grobinson-grafana) made their first contribution in [prometheus/common#618 - [@&open-telemetry#8203;GiedriusS](https://github.com/GiedriusS) made their first contribution in [prometheus/common#487 **Full Changelog**: prometheus/common@v0.52.3...v0.53.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are external projects out there that marshal/unmarshal the Prometheus config that has secrets. To get the real value currently such horrible workarounds are in place:
https://github.com/tkestack/kvass/blob/master/pkg/sidecar/injector.go#L175-L214
Let's add a way to get the original values through the
Secret
type to avoid such things.