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: Support for environment variables substitution in config file #381

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

dadrus
Copy link
Owner

@dadrus dadrus commented Dec 15, 2022

This PR closes #67

Example configuration which shows the new possibility.

id: hydra_authenticator
type: oauth2_introspection
config:
  introspection_endpoint:
    url: http://hydra:4445/oauth2/introspect
    auth:
      type: basic_auth
      config:
        user: ${INTROSPECT_EP_USER}
        password: ${INTROSPECT_EP_PASSWORD}

This PR is a replacement for #378, which tried to implement the same functionality, unfortunately using a library, which clashed with go templates. Template support is now covered by the tests as well

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #381 (25de2b3) into main (fa6f965) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
+ Coverage   86.43%   86.50%   +0.06%     
==========================================
  Files         193      193              
  Lines        7743     7753      +10     
==========================================
+ Hits         6693     6707      +14     
+ Misses        898      894       -4     
  Partials      152      152              
Impacted Files Coverage Δ
internal/config/parser/yaml.go 100.00% <100.00%> (ø)
internal/rules/repository.go 97.29% <0.00%> (+3.60%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dadrus dadrus merged commit 5a6ec65 into main Dec 15, 2022
@dadrus dadrus deleted the feat/envsubst branch December 15, 2022 22:34
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

Successfully merging this pull request may close these issues.

Enable usage of environment variables in config file to ease usage
1 participant