Skip to content

[provider/aes] Use mdatagen, promote to alpha #38252

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 5 commits into from
Feb 27, 2025
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
27 changes: 27 additions & 0 deletions .chloggen/aesprovider-alpha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Promote to alpha stability

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [38252]

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
1 change: 1 addition & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.26.1-0.20250224010654-18e18b21da7a
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.26.1-0.20250224010654-18e18b21da7a
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.26.1-0.20250224010654-18e18b21da7a
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider v0.120.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.120.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.120.1

Expand Down
14 changes: 14 additions & 0 deletions confmap/provider/aesprovider/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# AES Provider

<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [alpha] |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprovider%2Faesprovider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider%2Faesprovider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprovider%2Faesprovider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprovider%2Faesprovider) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski), [@shazlehu](https://www.github.com/shazlehu) |

[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

## Summary

This package provides a `confmap.Provider` implementation for symmetric AES encryption of credentials (and other sensitive values) in configurations. It relies on the environment variable `OTEL_AES_CREDENTIAL_PROVIDER` set to the value of the AES key, base64 encoded. 16, 24, or 32 byte keys are supported, selecting AES-128, AES-192, or AES-256 respectively.
Expand Down
13 changes: 13 additions & 0 deletions confmap/provider/aesprovider/generated_package_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions confmap/provider/aesprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.23.0
require (
github.com/stretchr/testify v1.10.0
go.opentelemetry.io/collector/confmap v1.26.1-0.20250226024140-8099e51f9a77
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
)

Expand Down
8 changes: 7 additions & 1 deletion confmap/provider/aesprovider/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
type: aes

status:
class: provider
stability:
alpha: [provider]
distributions: [contrib]
codeowners:
active: [djaglowski, shazlehu]
active: [djaglowski, shazlehu]
2 changes: 2 additions & 0 deletions confmap/provider/aesprovider/provider.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//go:generate mdatagen metadata.yaml

package aesprovider // import "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider"

import (
Expand Down
1 change: 1 addition & 0 deletions reports/distributions/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ components:
- tail_sampling
- transform
provider:
- aes
- s3
receiver:
- active_directory_ds
Expand Down