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

Add support for addon-specific environment variables and secrets management #2896

Open
tiborrr opened this issue Dec 23, 2024 · 0 comments
Open

Comments

@tiborrr
Copy link
Contributor

tiborrr commented Dec 23, 2024

Add Environment Variables Support for Addons

Problem

Docspell addons need a secure and standardized way to handle environment variables and secrets. Currently, there's no built-in way to pass environment variables to addons.

Proposed Solution

docspell.joex.addons {
  configs = [
    {
      name = "my-postgres-addon"
      enabled = true
      envs = [
        {
          name = "POSTGRES_HOST"
          value = "localhost"
        },
        {
          name = "POSTGRES_PASSWORD"
          valueFrom = { # future feature
            env = "DS_POSTGRES_PASSWORD" 
          }
        }
      ]
    }
  ]
}

Environment Variable Mapping

DOCSPELL_JOEX_ADDONS_CONFIGS_0_NAME="my-postgres-addon"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_0_NAME="POSTGRES_HOST"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_0_VALUE="localhost"
DOCSPELL_JOEX_ADDONS_CONFIGS_0_ENVS_1_NAME="POSTGRES_PASSWORD"

Key Features

  • Simple array-based configuration
  • Support for direct values and environment variable references
  • Extensible valueFrom field for future secret providers
  • Consistent with Docspell's configuration style

Future Extensions

The valueFrom field can be extended to support additional providers like:

  • File-based secrets
  • HashiCorp Vault
  • Kubernetes secrets
  • Cloud provider secret managers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant