Skip to content
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

Feat: Redact remote endpoint IP addresses in log messages. #2188

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions jvb/src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,14 @@ public Conference(Videobridge videobridge,
{
try
{
logger.info("RECV colibri2 request: " + XmlStringBuilderUtil.toStringOpt(request.getRequest()));
logger.info( () -> {
String reqStr = XmlStringBuilderUtil.toStringOpt(request.getRequest());
if (VideobridgeConfig.getRedactRemoteAddresses())
{
reqStr = RedactColibriIp.Companion.redact(reqStr);
}
return "RECV colibri2 request: " + reqStr;
});
long start = System.currentTimeMillis();
Pair<IQ, Boolean> p = colibri2Handler.handleConferenceModifyIQ(request.getRequest());
IQ response = p.getFirst();
Expand All @@ -236,8 +243,13 @@ public Conference(Videobridge videobridge,
request.getTotalDelayStats().addDelay(totalDelay);
if (processingDelay > 100)
{
String reqStr = XmlStringBuilderUtil.toStringOpt(request.getRequest());
if (VideobridgeConfig.getRedactRemoteAddresses())
{
reqStr = RedactColibriIp.Companion.redact(reqStr);
}
logger.warn("Took " + processingDelay + " ms to process an IQ (total delay "
+ totalDelay + " ms): " + XmlStringBuilderUtil.toStringOpt(request.getRequest()));
+ totalDelay + " ms): " + reqStr);
}
logger.info("SENT colibri2 response: " + XmlStringBuilderUtil.toStringOpt(response));
request.getCallback().invoke(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ class VideobridgeConfig private constructor() {
val initialDrainMode: Boolean by config {
"videobridge.initial-drain-mode".from(JitsiConfig.newConfig)
}

@JvmStatic
val redactRemoteAddresses: Boolean by config {
"videobridge.redact-remote-addresses".from(JitsiConfig.newConfig)
}
}
}
1 change: 1 addition & 0 deletions jvb/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ ice4j {
use-dynamic-ports = false
}
}
redact-remote-addresses = ${videobridge.redact-remote-addresses}
}
3 changes: 3 additions & 0 deletions jvb/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ videobridge {
# size for which the filter is enabled.
stats-filter-threshold = 20

# Whether to redact remote endpoint IP addresses from logs
redact-remote-addresses = true

ssrc-limit {
# maximum number of SSRCs to send to an endpoint for video
video = 50
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ice4j</artifactId>
<version>3.0-69-ga53b402</version>
<version>3.0-72-g824cd4b</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jitsi-xmpp-extensions</artifactId>
<version>1.0-80-g0ce9883</version>
<version>1.0-81-g3816e5a</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Loading