-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPC-3785] Mask Postgres details in application logs (#2318)
## 🎫 Ticket [DPC-3875](https://jira.cms.gov/browse/DPC-3785) ## 🛠 Changes - adds additional masking method for stripping out PSQL details to existing DPCJsonLayout logging layout class - this requires changes to both "exception" and "message" fields of incoming log messages. <!-- What was added, updated, or removed in this PR? --> ## ℹ️ Context Even when database entities (i.e. [OrganizationEntity](https://github.com/CMSgov/dpc-app/blob/99f63fd7ccbdf603c246f6c062eb874f4053cd0f/dpc-common/src/main/java/gov/cms/dpc/common/entities/OrganizationEntity.java)) are not explicitly logged, if an exception is raised, information from the database may show up in system logs. (See validation section below for example) <!-- Why were these changes made? Add background context suitable for a non-technical audience. --> <!-- If any of the following security implications apply, this PR must not be merged without Stephen Walter's approval. Explain in this section and add @SJWalter11 as a reviewer. - Adds a new software dependency or dependencies. - Modifies or invalidates one or more of our security controls. - Stores or transmits data that was not stored or transmitted before. - Requires additional review of security implications for other reasons. --> ## 🧪 Validation <!-- How were the changes verified? Did you fully test the acceptance criteria in the ticket? Provide reproducible testing instructions and screenshots if applicable. --> - manual testing done with the Organization `$submit` endpoint - making this API call multiple times raises a unique constraint violation - see also automated unit test added to `dpc-common/src/test/java/gov/cms/dpc/common/logging/DPCJsonLayoutUnitTest.java`
- Loading branch information
1 parent
b22e19d
commit 63b9e29
Showing
2 changed files
with
86 additions
and
6 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