This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor logging to avoid leaking sensitive data (#906)
Fixes #905. Refactors logging to make it easier to avoid logging sensitive data. Changes: - Remove `CustomLogStringConvertible`. This was too fancy, and had fallbacks which made it difficult to reason about where and how to redact. - Replace all calls to `String.loggable()` with `String(describing:)`. - Use default string representation for actions in more places. - Relatedly, give actions their own loggers. Actions will be chattier. Giving them a separate logger makes for easier filtering. - Introduce `@Redacted` property decorator. Apply to any property to implement `CustomStringConvertible` and `CustomDebugStringConvertible` to return the literal string "--redacted" - Refactor `RecoveryPhrase` to use `@Redacted` - Previously this was redacting `debugDescription`, but not `description`. This change redacts both, so you have to be very specific that you want the string value of the mnemonic by referencing the property directly. - Update `FormField` to redact all strings for value actions. We should not be logging user's input for most fields anyway, and validated form fields are most likely to contain sensitive information. - Update Noosphere and NoosphereService to receive mnemonic as String (this matches other parts of the API)
- Loading branch information
1 parent
b7489d9
commit ae98fdc
Showing
21 changed files
with
211 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.