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

Feature: add custom marshaller for env vars to hide them in the UI #230

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

thielepaul
Copy link
Contributor

@thielepaul thielepaul commented Nov 17, 2024

I am using cheek to trigger regular backups with restic and need to pass the credentials as environment variables. These credentials should remain on the device and should not be accessible via the API or be displayed in the UI. Thus, I introduced a custom marshaller that replaces them with "***"

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.43%. Comparing base (67eab8f) to head (d3d8cfc).
Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
- Coverage   74.34%   65.43%   -8.91%     
==========================================
  Files           5        6       +1     
  Lines         569      758     +189     
==========================================
+ Hits          423      496      +73     
- Misses        107      210     +103     
- Partials       39       52      +13     

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

@bart6114
Copy link
Member

Thanks for the PR @thielepaul.

Do you see any good use cases to have env vars be visible in the UI? In other words, what if we just use your secret marshalling technique on all the env vars? 🤔 This would negate the need for a specific secret_env field.

@thielepaul thielepaul changed the title Feature: add secret_env to pass secrets to jobs without leaking them to the UI Feature: add custom marshaller for env vars to hide them in the UI Nov 18, 2024
@thielepaul
Copy link
Contributor Author

Yes, I do agree, there should be no need to see their values in the UI and I always prefer to keep it simple if possible

@bart6114
Copy link
Member

Thanks for the contrib ❤️

@bart6114 bart6114 merged commit d17d5a3 into datarootsio:main Nov 18, 2024
5 of 11 checks passed
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.

2 participants