pzampino opened a new pull request #434: URL: https://github.com/apache/knox/pull/434
## What changes were proposed in this pull request? Replace the logging of Knox token UUIDs in TokenResource with masked representations which are safe to present in logs. ## How was this patch tested? mvn -Ppackage,release clean install 1. Installed the gateway and enabled DEBUG logging. 2. Deployed the KNOXTOKEN service with server-managed state enabled. 3. Deployed a topology with the JWTProvider (server-managed state enabled) and WEBHDFS. 4. Requested a token. 5. curl -ivku Token:$TOKEN "https://localhost:8443/gateway/pz-demo/webhdfs/v1/?op=LISTSTATUS" 6. curl -ivku Passcode:$PASSCODE "https://localhost:8443/gateway/pz-demo/webhdfs/v1/tmp?op=LISTSTATUS" 7. Performed the same with invalid token/passcode (to verify UnknownTokenException contents). 8. Grepped the logs for (\S){8}-(\S){4}-(\S){4}-(\S){4}-(\S){12} - confirmed no matches 9. Grepped the logs for (\S){8}\.{3}(\S){12} - confirmed matches -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
