HADOOP-13693. Remove the message about HTTP OPTIONS in SPNEGO initialization message from kms audit log.

This commit is contained in:
Xiao Chen 2016-10-18 18:24:37 -07:00
parent efdf810cf9
commit d75cbc5749
1 changed files with 7 additions and 3 deletions

View File

@ -145,9 +145,13 @@ public class KMSAuthenticationFilter
requestURL.append("?").append(queryString); requestURL.append("?").append(queryString);
} }
KMSWebApp.getKMSAudit().unauthenticated( if (!method.equals("OPTIONS")) {
request.getRemoteHost(), method, requestURL.toString(), // an HTTP OPTIONS request is made as part of the SPNEGO authentication
kmsResponse.msg); // sequence. We do not need to audit log it, since it doesn't belong
// to KMS context. KMS server doesn't handle OPTIONS either.
KMSWebApp.getKMSAudit().unauthenticated(request.getRemoteHost(), method,
requestURL.toString(), kmsResponse.msg);
}
} }
} }