-
-
Notifications
You must be signed in to change notification settings - Fork 218
Data Masking & String Truncation Improvements #866
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
Merged
Merged
Conversation
This file contains hidden or 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
…sking to fix issues where string values could still be too long for the corresponding fields
…masking various text values, and added several new *Truncated__c fields on LogEntryEvent__e for some data points where it would be helpful to have the context that data has been truncated
… - and fixed issues in the regexes for all 3 of them ^_^
…o the new fields on LogEntryEvent__e
…lass so they only run in the pipeline These tests are intended to validate that the bundled data masking rules work correctly out-of-the-box, but people are free to edit these in their own orgs, so the this level of testing needs to happen in the pipeline only
…d with Nebula Logger have the expected values
…ion, things were getting a bit messy
…of * as replacement values I had unintentionally switched to using * when rewriting the regex
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #866 +/- ##
==========================================
+ Coverage 86.19% 91.49% +5.30%
==========================================
Files 17 58 +41
Lines 1318 6314 +4996
Branches 199 199
==========================================
+ Hits 1136 5777 +4641
- Misses 162 517 +355
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…Tests & CMDT_LoggerParameter_Tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cleanup
devops
Items related to tooling, automation, and guidelines used for developing Nebula Logger
Feature: Data Masking
Layer: Configuration
Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type
Layer: Log Management
Items related to the custom objects & Logger Console app
Layer: Logger Engine
Items related to the core logging engine
Logging Source: Apex
Items related to using Logger within Apex
Logging Source: Flow
Items related to using Nebula Logger within Flow
Logging Source: Lightning Components
Items related to using Nebula Logger using JavaScript within lightning components (lwc & aura)
Logging Source: OmniStudio
Items related to using Nebula Logger within OmniStudio
optimization
Salesforce Feature: Platform Events
Items related to how platform events are leveraged by Nebula Logger
Salesforce Feature: Reporting
Anything related to reports, dashboards, and the underlying data model
Type: Bug
Something isn't working
Type: Enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bundled Data Masking Rules Bugfixes + New American Express (AMEX) Masking Rule
LogEntryDataMaskRule__mdtrecords (stored in the fieldSensitiveDataRegEx__c). The previous regexes were too aggressive, and would sometimes incorrectly mask substrings of non-credit card & non-social security number values.SocialSecurityNumberMastercardCreditCardNumberVisaCreditCardNumberLogEntryDataMaskRule__mdtfor American Express (AMEX) credit card numbers -AmericanExpressCreditCardNumber(similar to the existing rules for Visa & Mastercard)Data Masking Bugfixes + Truncation Bugfixes + New
*Truncated__cBoolean FieldsBugfix: Fixed Text truncation does not always properly truncate (especially when combined with data masking rules) #695 by adding another round of string truncation after applying data masking to fix issues where string values could still be too long for the corresponding fields
-dashes when masked, so values like123456789(9 characters) are 2 characters longer when masked as***-**-6789(11 characters).Message__cfield in several orgs, but the same issue could/did happen with several other text fields.Optimization: Refactored some duplicated logic in
LogEntryEventBuilderfor truncating + masking various text valuesEnhancement: Added several new
*Truncated__cboolean fields on bothLogEntryEvent__e&LogEntry__cfor some data points where it would be helpful to have the context that data has been truncated. There are 5 sets of new fields included:LogEntryEvent__e.HttpRequestBodyTruncated__c➡️LogEntry__c.HttpRequestBodyTruncated__cLogEntryEvent__e.HttpResponseBodyTruncated__c➡️LogEntry__c.HttpResponseBodyTruncated__cLogEntryEvent__e.RecordJsonTruncated__c➡️LogEntry__c.RecordJsonTruncated__cLogEntryEvent__e.RestRequestBodyTruncated__c➡️LogEntry__c.RestRequestBodyTruncated__cLogEntryEvent__e.RestResponseBodyTruncated__c➡️LogEntry__c.RestResponseBodyTruncated__cEnhancement: Updated the
LogEntryRecordPageflexipage to add the new*Truncated__cboolean fields onLogEntry__c(mentioned above, and shown below)true, similar to the behavior used for the existing*Masked__cfields, likeLogEntry__c.MessageMasked__c&LogEntry__c.RecordJsonMasked__cPipeline Improvements for
extra-testsDirectoryLogEntryDataMaskRule__mdt,LoggerParameter__mdt,LoggerSObjectHandler__mdt, andLogStatus__mdtnebula-logger/extra-teststo make it a little more clear what everything is being used for. The number of files has grown a lot over the last few years, so a little cleanup was needed.