forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aws secret manager (open-telemetry#31123)
== This is continuation of open-telemetry#19341 == **Description:** Adding AWS SecretsManager Support. To be able to inject secrets via AWS Lambda Layer **Link to tracking Issue:** [19368](open-telemetry#19368) **Testing:** Test fetching via SecretsManager emulating AWS API **Documentation:** README.md --------- Co-authored-by: Luís Duarte <lduarte@luisduarte.net>
- Loading branch information
1 parent
42cbbc9
commit f22dd2c
Showing
15 changed files
with
626 additions
and
10 deletions.
There are no files selected for viewing
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
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: |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ sokoide | |
RichieSams | ||
cheempz | ||
jerrytfleung | ||
sh0rez | ||
sh0rez | ||
driverpt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../../../Makefile.Common |
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
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/ |
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
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 | ||
) |
Oops, something went wrong.