-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Mask vncPasswd being logged in agent.log #12404
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
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12404 +/- ##
============================================
+ Coverage 4.00% 16.23% +12.23%
- Complexity 0 13379 +13379
============================================
Files 402 5657 +5255
Lines 32688 498955 +466267
Branches 5822 60557 +54735
============================================
+ Hits 1309 81023 +79714
- Misses 31224 408896 +377672
- Partials 155 9036 +8881
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:
|
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
abh1sar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@blueorangutan package |
|
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
| if (logger.isDebugEnabled()) { | ||
| logger.debug(String.format("VM [%s] with XML configuration [%s] will be migrated to host [%s].", vmName, xmlDesc, target)); | ||
| logger.debug("VM {} with XML configuration {} will be migrated to host {}.", vmName, maskSensitiveInfoInXML(xmlDesc), target); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (logger.isDebugEnabled()) { | |
| logger.debug(String.format("VM [%s] with XML configuration [%s] will be migrated to host [%s].", vmName, xmlDesc, target)); | |
| logger.debug("VM {} with XML configuration {} will be migrated to host {}.", vmName, maskSensitiveInfoInXML(xmlDesc), target); | |
| } | |
| logger.debug("VM {} with XML configuration {} will be migrated to host {}.", vmName, () -> maskSensitiveInfoInXML(xmlDesc), target); |
just a suggestion, (may apply below as well)
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, the isDebugEnabled are not strictly needed anymore.
| public static String maskSensitiveInfoInXML(String xmlDesc) { | ||
| if (xmlDesc == null) return null; | ||
| // Mask VNC password in XML for logging | ||
| return xmlDesc.replaceAll("(graphics\\s+[^>]*type=['\"]vnc['\"][^>]*passwd=['\"])([^'\"]*)(['\"])", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also just remove it, btw
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16334 |
|
@blueorangutan test |
|
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
Thanks @DaanHoogland for your review and suggestions. Let me know if my response makes sense:
|
this is not how I read the documentation, but I haven’t tested it. it should lazily evaluate the lambda ony if debug is enabled.
I do not care if point 1 is out of the way. It is just cleaner code. If you are right about point 1 we have a bigger issue. I do not think either should stop this PR, but in general my experience is that follow-ups don’t happen,... |
Description
This PR fixes #10847
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?