How To Code To Prevent Sensitive Data Exposure
Too Long; Didn't Read
When a data field contains some sensitive value, it should be encapsulated within the below data class to achieve data obfuscation by default. Since the "masked" method is overridden, where “masked” is always returned, its actual value can’t be printed out unless explicitly requested. In cases where a developer really has to obtain a sensitive data field, they can do so by calling the function "getSensitive()" The result should be:Explicit Request on Sensitive Data. It’s still possible that the sensitive data value is shown on the UI.
Share Your Thoughts