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

[Feat]: Substitute environment variables in config file #2521

Open
AndersBennedsgaard opened this issue Jul 3, 2024 · 0 comments
Open

[Feat]: Substitute environment variables in config file #2521

AndersBennedsgaard opened this issue Jul 3, 2024 · 0 comments
Labels
feature New feature or request rm-external Roadmap item submitted by non-maintainers

Comments

@AndersBennedsgaard
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I am trying to set up authentication up with OIDC, which requires a client secret in plain text in the config. I would like a way for me to not have the client secret as plain text, and it seems to be pretty common practice to support environment variable substitution in config files.

Describe the solution you'd like

Substitute environment variables in configuration files

It does not seem to be possible with native Viper, but there are workarounds like spf13/viper#418 (comment)

Describe alternatives you've considered

Add a clientsecretEnv specifying which environment variable to pull the client secret from. I would personally be fine with this, but I would guess that there are other locations where substitution could be nice. It could for example simplify the code for authenticating to S3 storage, since the credentials file could be replaced with this.

Alternatively, I could run envsubst or similar on config files before starting Zot, in order to substitute them manually

Additional context

No response

@AndersBennedsgaard AndersBennedsgaard added the feature New feature or request label Jul 3, 2024
@rchincha rchincha added the rm-external Roadmap item submitted by non-maintainers label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request rm-external Roadmap item submitted by non-maintainers
Projects
None yet
Development

No branches or pull requests

2 participants