Skip to content

feat(secrets): add AWS Secrets Manager provider#5411

Merged
markphelps merged 20 commits intov2from
feat/aws-secrets-manager
Feb 24, 2026
Merged

feat(secrets): add AWS Secrets Manager provider#5411
markphelps merged 20 commits intov2from
feat/aws-secrets-manager

Conversation

@markphelps
Copy link
Collaborator

Summary

  • Adds AWS Secrets Manager as a secret provider for Flipt, following the same patterns as the existing GCP Secret Manager provider
  • Uses AWS SDK v2 (github.com/aws/aws-sdk-go-v2) to call GetSecretValue and ListSecrets
  • Supports configurable region and custom endpoint URL (for LocalStack in testing)
  • Includes LocalStack-based integration test for signing workflow

Changes

  • internal/config/secrets.go: Added AWSProviderConfig struct with Enabled, Region, EndpointURL fields, validation, and defaults
  • internal/coss/secrets/aws/provider.go: AWS Secrets Manager provider implementation with GetSecret and ListSecrets
  • internal/secrets/manager.go: Wired AWS provider initialization into the manager
  • cmd/flipt/main.go: Added blank import to register the AWS provider
  • config/flipt.schema.cue and config/flipt.schema.json: Added AWS provider to configuration schemas
  • build/testing/integration.go: Added signing/aws integration test case using LocalStack
  • Tests: Full test coverage for config validation, config loading, manager wiring, secret reference resolution, and unit tests

Configuration

secrets:
  providers:
    aws:
      enabled: true
      region: "us-east-1"
      endpoint_url: "http://localhost:4566"  # optional, for LocalStack

Secret references use the format: ${secret:aws:my-secret-name}

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@markphelps markphelps added the v2 Flipt v2 label Feb 20, 2026
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 58.33333% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.38%. Comparing base (687a358) to head (076447e).
⚠️ Report is 9 commits behind head on v2.

Files with missing lines Patch % Lines
internal/coss/secrets/aws/provider.go 57.62% 22 Missing and 3 partials ⚠️
internal/secrets/manager.go 60.00% 2 Missing and 2 partials ⚠️
internal/config/secrets.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #5411      +/-   ##
==========================================
- Coverage   60.39%   60.38%   -0.02%     
==========================================
  Files         139      140       +1     
  Lines       13820    13892      +72     
==========================================
+ Hits         8347     8389      +42     
- Misses       4763     4788      +25     
- Partials      710      715       +5     
Flag Coverage Δ
integrationtests 34.18% <50.00%> (+0.07%) ⬆️
unittests 51.77% <16.66%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ersion

Address PR feedback from erka:
- Remove Region field from AWSProviderConfig; rely on AWS SDK default
  config (AWS_DEFAULT_REGION env var) instead of requiring it in Flipt config
- Pin LocalStack to v4.4 due to upcoming distribution model changes

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
…o/flipt into feat/aws-secrets-manager

* 'feat/aws-secrets-manager' of https://github.com/flipt-io/flipt:
  fix(ui): use 0 as default threshold percentage in quick edit form (#5408)
  fix(ci): bump Go version to 1.26 in nightly release workflow (#5407)
Region is no longer required for the AWS secrets provider, so the
missing region test case is no longer valid.

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
The amazon/aws-cli:latest image now ships with gnupg2-minimal which
conflicts with the full gnupg2 package. Adding --allowerasing allows
yum to replace gnupg2-minimal with gnupg2.

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@markphelps markphelps marked this pull request as ready for review February 22, 2026 22:51
@markphelps markphelps requested a review from a team as a code owner February 22, 2026 22:51
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 22, 2026
Co-authored-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@dosubot
Copy link

dosubot bot commented Feb 22, 2026

Related Documentation

Checked 4 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@markphelps markphelps enabled auto-merge (squash) February 23, 2026 15:17
@markphelps markphelps disabled auto-merge February 24, 2026 01:32
@markphelps markphelps merged commit 7507f24 into v2 Feb 24, 2026
42 of 50 checks passed
@markphelps markphelps deleted the feat/aws-secrets-manager branch February 24, 2026 01:32
@github-project-automation github-project-automation bot moved this to Done in Flipt V2 Feb 24, 2026
@markphelps markphelps added the needs docs Requires documentation updates label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs docs Requires documentation updates size:XL This PR changes 500-999 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants