Skip to content

✨(configuration) add configuration Value to support file path in environment #15

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soyouzpanda
Copy link

Related to suitenumerique/docs#912 and suitenumerique/docs#909

This supports use of environment variables that either reference a value or a path to file containing the value. This is useful for secrets, to avoid the secret to be in a world-readable environment file.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for environment variables that can reference either a value or the path to a file containing the value, which is particularly useful for securing secrets. Key changes include new tests for SecretFileValue behavior, a new SecretFileValue class in the configuration module, and an updated dependency in pyproject.toml to include django‑configurations.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
tests/configuration/test_secret_file.py Introduces tests validating different ways to supply secret values.
tests/configuration/init.py Provides a configuration tests initialization file.
src/lasuite/configuration/values.py Implements SecretFileValue to support both file path and direct env values.
pyproject.toml Adds dependency for django‑configurations to support this feature.
Files not reviewed (1)
  • tests/configuration/test_secret: Language not supported

@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from 451f2bf to fd2a3a7 Compare April 29, 2025 14:21
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from fd2a3a7 to 1afc245 Compare April 29, 2025 15:22
@lunika
Copy link
Member

lunika commented May 9, 2025

You should run make lint on your machine to see what you have to fix.

@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from 1afc245 to d54f4c6 Compare May 12, 2025 12:42
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from d54f4c6 to 8567894 Compare May 12, 2025 12:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants