Skip to content

Added a New Provider Component - Google Secrets Provider #39790

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

Merged
merged 52 commits into from
May 8, 2025

Conversation

XuechunHou
Copy link
Contributor

Description

This PR adds the full implementation of the Google Secret Provider component. It allows users to securely reference secrets in Otel configurations. This is achieved by replacing plaintext secrets with placeholders in config files; the actual secrets are then retrieved dynamically from Google Secret Manager during the Otel Collector initialization.

Link to tracking issue

#39665

Testing

Unit tests are added for the Retrieve method, and cover the following scenarios:

  1. Given an identifier that matches a secret entry stored in Google Secret Manager, Retrieve() returns the corresponding plaintext secret.
  2. Given an identifier that does not match any stored secret entry in Google Secret Manager, Retrieve() returns an error.
  3. Given an identifier with an invalid scheme, Retrieve() should return an error.
  4. Given an identifier with invalid opaque_data, Retrieve() should return an error.

Documentation

README.md

@XuechunHou XuechunHou requested a review from a team as a code owner April 30, 2025 19:32
@XuechunHou XuechunHou requested a review from fatsheep9146 April 30, 2025 19:32
Copy link

linux-foundation-easycla bot commented Apr 30, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@atoulme atoulme added the Sponsor Needed New component seeking sponsor label May 2, 2025
Copy link
Contributor

@braydonk braydonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced googlesecretsprovider is the right name. I feel like we should refer to it by the exact GCP service being used, i.e. googlesecretmanagerprovider.

@atoulme atoulme marked this pull request as draft May 2, 2025 16:32
@atoulme
Copy link
Contributor

atoulme commented May 2, 2025

Moving to draft, please address CI and review, and mark ready to review when done.

@XuechunHou XuechunHou force-pushed the main branch 2 times, most recently from 93610fd to 5c63ff3 Compare May 7, 2025 16:52
@XuechunHou XuechunHou force-pushed the main branch 3 times, most recently from 39cd1f4 to b5182fc Compare May 7, 2025 17:38
@braydonk braydonk added the ready to merge Code review completed; ready to merge by maintainers label May 7, 2025
@braydonk
Copy link
Contributor

braydonk commented May 7, 2025

Adding ready to merge label, but if a maintainer wants to give a review they may remove it.

@atoulme atoulme merged commit 49a05ab into open-telemetry:main May 8, 2025
182 checks passed
@github-actions github-actions bot added this to the next release milestone May 8, 2025
atoulme pushed a commit that referenced this pull request May 9, 2025
…bility (#39956)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

The full implementation of the component is added in :
#39790.

This PR marks the component "alpha" stability compliant. 

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

#39665

<!--Describe what testing was performed and which tests were added.-->
#### Testing

[Unit
tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/confmap/provider/googlesecretmanagerprovider/provider_test.go)
<!--Describe the documentation added.-->
#### Documentation


[README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/confmap/provider/googlesecretmanagerprovider/README.md)
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Braydon Kains <[email protected]>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
…try#39790)

#### Description
This PR adds the full implementation of the Google Secret Provider
component. It allows users to securely reference secrets in Otel
configurations. This is achieved by replacing plaintext secrets with
placeholders in config files; the actual secrets are then retrieved
dynamically from Google Secret Manager during the Otel Collector
initialization.


#### Link to tracking issue

open-telemetry#39665


#### Testing

Unit tests are added for the `Retrieve` method, and cover the following
scenarios:
1. Given an identifier that matches a secret entry stored in Google
Secret Manager, Retrieve() returns the corresponding plaintext secret.
2. Given an identifier that does not match any stored secret entry in
Google Secret Manager, Retrieve() returns an error.
3. Given an identifier with an invalid scheme, `Retrieve()` should
return an error.
4. Given an identifier with invalid opaque_data, `Retrieve()` should
return an error.


#### Documentation
README.md

---------

Co-authored-by: Braydon Kains <[email protected]>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
…bility (open-telemetry#39956)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

The full implementation of the component is added in :
open-telemetry#39790.

This PR marks the component "alpha" stability compliant. 

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

open-telemetry#39665

<!--Describe what testing was performed and which tests were added.-->
#### Testing

[Unit
tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/confmap/provider/googlesecretmanagerprovider/provider_test.go)
<!--Describe the documentation added.-->
#### Documentation


[README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/confmap/provider/googlesecretmanagerprovider/README.md)
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Braydon Kains <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants