Skip to content
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

Aws secret manager #31123

Merged
merged 14 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/aws-secrets-manager-provider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: confmap/secretsmanagerprovider

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Initial implementation of secrets manager provider. Allows fetch variables from AWS Secrets Manager

# One or more tracking issues related to the change
issues: [19368]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions .github/ALLOWLIST
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
internal/common

## DEPRECATED components
exporter/f5cloudexporter/
processor/spanmetricsprocessor/

## UNMAINTAINED components
Expand Down
19 changes: 10 additions & 9 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cmd/oteltestbedcol/ @open-telemetry/collect
cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten

confmap/provider/s3provider/ @open-telemetry/collector-contrib-approvers @Aneurysm9
confmap/provider/secretsmanagerprovider/ @open-telemetry/collector-contrib-approvers @driverpt @atoulme

connector/countconnector/ @open-telemetry/collector-contrib-approvers @djaglowski @jpkrohling
connector/datadogconnector/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13
Expand Down Expand Up @@ -51,7 +52,7 @@ exporter/datadogexporter/ @open-telemetry/collect
exporter/datasetexporter/ @open-telemetry/collector-contrib-approvers @atoulme @martin-majlis-s1 @zdaratom-s1 @tomaz-s1
exporter/dynatraceexporter/ @open-telemetry/collector-contrib-approvers @dyladan @arminru @evan-bradley
exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @JaredTan95
exporter/f5cloudexporter/ @open-telemetry/collector-contrib-approvers @gramidt
exporter/f5cloudexporter/ @open-telemetry/collector-contrib-approvers
exporter/fileexporter/ @open-telemetry/collector-contrib-approvers @atingchen
exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95
exporter/googlecloudpubsubexporter/ @open-telemetry/collector-contrib-approvers @alexvanboxel
Expand Down Expand Up @@ -279,18 +280,18 @@ testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collect
# List of distribution maintainers for OpenTelemetry Collector Contrib
#
#####################################################
reports/distributions/core.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/contrib.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/aws.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/grafana.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/observiq.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/redhat.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/core.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/contrib.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/aws.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/grafana.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/observiq.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/redhat.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/splunk.yaml @open-telemetry/collector-contrib-approvers @atoulme @crobert-1 @dmitryax @hughesjj @jeffreyc-splunk @jinja2 @jvoravong @panotti @rmfitzpatrick @samiura
reports/distributions/sumo.yaml @open-telemetry/collector-contrib-approvers @aboguszewski-sumo @astencel-sumo @kkujawa-sumo @rnishtala-sumo @sumo-drosiek @swiatekm-sumo
reports/distributions/liatrio.yaml @open-telemetry/collector-contrib-approvers @adrielp


## UNMAINTAINED components

exporter/alibabacloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers
exporter/skywalkingexporter/ @open-telemetry/collector-contrib-approvers
exporter/alibabacloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers
exporter/skywalkingexporter/ @open-telemetry/collector-contrib-approvers
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ body:
- cmd/oteltestbedcol
- cmd/telemetrygen
- confmap/provider/s3provider
- confmap/provider/secretsmanagerprovider
- connector/count
- connector/datadog
- connector/exceptions
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ body:
- cmd/oteltestbedcol
- cmd/telemetrygen
- confmap/provider/s3provider
- confmap/provider/secretsmanagerprovider
- connector/count
- connector/datadog
- connector/exceptions
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ body:
- cmd/oteltestbedcol
- cmd/telemetrygen
- confmap/provider/s3provider
- confmap/provider/secretsmanagerprovider
- connector/count
- connector/datadog
- connector/exceptions
Expand Down
3 changes: 2 additions & 1 deletion cmd/githubgen/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ sokoide
RichieSams
cheempz
jerrytfleung
sh0rez
sh0rez
driverpt
1 change: 1 addition & 0 deletions confmap/provider/secretsmanagerprovider/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../Makefile.Common
11 changes: 11 additions & 0 deletions confmap/provider/secretsmanagerprovider/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Summary
This package provides a `ConfigMapProvider` implementation for Amazon Secrets Manager (`secretsmanager`) that allows
the
Collector the ability to read data stored in AWS Secrets Manager.
## How it works
- Just use the placeholders with the following pattern `${secretsmanager:<arn or name>}`
- Make sure you have the `secretsmanager:GetSecretValue` in the OTEL Collector Role

Prerequisites:
- Need to setup access keys from IAM console (aws_access_key_id and aws_secret_access_key) with permission to access Amazon Secrets Manager
- For details, can take a look at https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/
29 changes: 29 additions & 0 deletions confmap/provider/secretsmanagerprovider/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider

go 1.20

require (
github.com/aws/aws-sdk-go-v2 v1.21.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.4
github.com/aws/smithy-go v1.15.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/confmap v0.94.1
)

require (
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect
github.com/knadh/koanf v1.5.0 // indirect
github.com/knadh/koanf/v2 v2.0.2 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading