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 redaction control based on environment variables #7

Merged
merged 7 commits into from
Sep 6, 2022

Conversation

WilliamVenner
Copy link
Contributor

There's a ton of magic to this.

The README in this PR should explain everything.

@WilliamVenner WilliamVenner requested a review from a team September 1, 2022 14:19
@WilliamVenner WilliamVenner force-pushed the feat/environment-override branch from c4765f8 to e2921d9 Compare September 5, 2022 09:35
.vscode/settings.json Outdated Show resolved Hide resolved
@WilliamVenner WilliamVenner force-pushed the feat/environment-override branch from e2f39b6 to cb6ae55 Compare September 6, 2022 09:44
cottinisimone
cottinisimone previously approved these changes Sep 6, 2022
@WilliamVenner WilliamVenner merged commit 69dd762 into master Sep 6, 2022
@WilliamVenner WilliamVenner deleted the feat/environment-override branch September 6, 2022 11:43
WilliamVenner added a commit that referenced this pull request Sep 6, 2022
* Add redaction control based on environment variables

* Add dedicated headers to make this clearer

* cargo fmt

* Add research findings on function deduplication

* Use a much clearer format for the `.veil.toml` file

* Fix documentation inconsistency with README

* Remove .vscode/settings.json - we dont need it anymore
WilliamVenner added a commit that referenced this pull request Sep 6, 2022
* Add redaction control based on environment variables

* Add dedicated headers to make this clearer

* cargo fmt

* Add research findings on function deduplication

* Use a much clearer format for the `.veil.toml` file

* Fix documentation inconsistency with README

* Remove .vscode/settings.json - we dont need it anymore
MaeIsBad added a commit that referenced this pull request Sep 22, 2022
Due to the way cargo works .veil.toml can't impact other crates
consistently.

This reverts commit 69dd762.
WilliamVenner added a commit that referenced this pull request Sep 26, 2022
* Revert "Add redaction control based on environment variables (#7)"

Due to the way cargo works .veil.toml can't impact other crates
consistently.

This reverts commit 69dd762.

* Remove all mentions of the environment aware feature

* Add a set_debug_format function

This is a simpler replacement for the environmental awareness feature.

* Mention being able to skip redacting data

* Move tests that disable redaction into a separate crate

This is neccessary because rust runs all tests in the same process,
leading to tests failing randomly, because of other tests modifying the
global state. There is some proposal on the rust compiler-team github
repo but until that gets stabilized we have to use this hack instead
rust-lang/compiler-team#508

* Loosen the version requirement of once_cell to 1.0.0

Co-authored-by: William <william@venner.io>

* Hide the disable feature behind a feature flag

Ensure that the use of this feature requires a very explicit opt-in from
the user.

* Add support for disabling veil with VEIL_DISABLE_REDACTION

* Test the toggle feature with drone

* Minor fixes to disable-redaction-test

* Rename it to veil-tests-disable-redaction
* Set publish = false
* Change the outer line doc comment describing the test into a inner
  line doc comment

* Improve the disable veil redaction docs

This avoids repeating that the disable function needs the toggle feature
flag which makes it clearer that the VEIL_DISABLE_REDACTION envar also
needs the feature flag

* Clarify RedactionBehavior doc comment

Co-authored-by: William <william@venner.io>

* Add missing space in README.md

* Update README.md

Make it clear that to skip redacting data the user needs to either call
the disable function *or* set the VEIL_DISABLE_REDACTION variable, not
both.

* Update outdated comment in the disable_redaction example

Co-authored-by: mae.kasza <mae.kasza@prima.it>
Co-authored-by: William <william@venner.io>
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