<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We have discussed it, but we don't understand all the details. We are also unsure how to best expose it to the end user. Let's say there was a command line option -XX:FlightRecorder:scrub-file=<file>.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
What would you fill that file with? I want examples that work on real data to understand how expressive the filters must be.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Erik</div>
<div id="appendonsend"></div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg">
<div style="direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<b>From:</b> hotspot-jfr-dev <hotspot-jfr-dev-retn@openjdk.org> on behalf of Erwan Viollet <erwan.viollet@gmail.com><br>
<b>Sent:</b> Monday, June 2, 2025 3:30 PM<br>
<b>To:</b> hotspot-jfr-dev@openjdk.org <hotspot-jfr-dev@openjdk.org><br>
<b>Subject:</b> JFR: Scrubbing sensitive information from events</div>
<div style="direction: ltr;"> </div>
</div>
<div style="direction: ltr;">Hello,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I am currently looking into how to remove sensitive information from JFR events. The main events that typically contain sensitive information: jdk.SystemProcess, jdk.InitialSystemProperty, jdk.JVMInformation. Passwords from command
lines can typically be found in these events.</div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Dropping these events altogether is not ideal, as we need them to make relevant performance recommendations to users (e.g. suggesting JVM or system setting adjustments).</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Dropping them or scrubbing them on the backend side (after the fact) requires decompressing and re-writing these events, which is wasteful in terms of both compute and storage. The approach is
not perfect, as we still end up intaking and temporarily storing sensitive information.</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Ideally, we would like to be able to scrub or redact only the sensitive fields within these events (for example, using a simple regex or pattern-based rule), rather than dropping the whole event. We
also want to avoid handling this only after the event has already been written to the JFR file, as that does not fully mitigate the risk of exposing sensitive data.</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">At present, it appears there is no public API or supported mechanism to intercept or scrub JFR events in-process, before they are persisted. What would you think of an API accepting custom scrubbing
patterns so that sensitive data never leaves the JVM in an unredacted state?</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Are there any plans or discussions in this area? I am fairly new to the JFR world, so it is likely that I missed previous discussions around this.</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Thank you, Best regards,</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Erwan Viollet, </p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Profiling team, Datadog</p>
</body>
</html>