Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ private void methodAction(final HttpServletRequest req,
boolean isRedirect = false;
String pathInfo = req.getPathInfo();
final String remoteUser = req.getRemoteUser();
final String remoteUserWithIPAddress =
remoteUser + "/" + req.getRemoteAddr();

String[] parts = null;

Expand All @@ -411,7 +413,7 @@ private void methodAction(final HttpServletRequest req,
}

if ((parts == null) || (parts.length < 2)) {
LOG.warn("{} gave an invalid proxy path {}", remoteUser, pathInfo);
LOG.warn("{} gave an invalid proxy path {}", remoteUserWithIPAddress, pathInfo);
notFound(resp, "Your path appears to be formatted incorrectly.");
return;
}
Expand All @@ -423,7 +425,7 @@ private void methodAction(final HttpServletRequest req,

if (id == null) {
LOG.warn("{} attempting to access {} that is invalid",
remoteUser, appId);
remoteUserWithIPAddress, appId);
notFound(resp, appId + " appears to be formatted incorrectly.");
return;
}
Expand Down Expand Up @@ -467,7 +469,7 @@ private void methodAction(final HttpServletRequest req,

if (applicationReport == null) {
LOG.warn("{} attempting to access {} that was not found",
remoteUser, id);
remoteUserWithIPAddress, id);

URI toFetch =
ProxyUriUtils
Expand Down Expand Up @@ -500,7 +502,7 @@ private void methodAction(final HttpServletRequest req,
if (checkUser && !runningUser.equals(remoteUser)) {
LOG.info("Asking {} if they want to connect to the "
+ "app master GUI of {} owned by {}",
remoteUser, appId, runningUser);
remoteUserWithIPAddress, appId, runningUser);
warnUserPage(resp, ProxyUriUtils.getPathAndQuery(id, rest,
req.getQueryString(), true), runningUser, id);

Expand All @@ -513,7 +515,7 @@ private void methodAction(final HttpServletRequest req,

LOG.info("{} is accessing unchecked {}"
+ " which is the app master GUI of {} owned by {}",
remoteUser, toFetch, appId, runningUser);
remoteUserWithIPAddress, toFetch, appId, runningUser);

switch (applicationReport.getYarnApplicationState()) {
case KILLED:
Expand Down