smolnar82 opened a new pull request, #902: URL: https://github.com/apache/knox/pull/902
## What changes were proposed in this pull request? I updated the passcode verification logic in a way such that it returns an HTTP error response with 401 error code if clients want to verify a passcode token without properly configured token state service. ## How was this patch tested? I added the missing JUnit test cases and re-run the `curl` command I used for reproducing the issue: ``` $ curl -iku Passcode:TkdVd1l6VTBPR0l0TmpVMk9DMDBNRFl4TFdFelpHTXROakk1TURnd09EYzJOVEJoOjpNREV6T0dGaFpXUXRZMkV5WVMwME4yWXhMVGhsWkRndFpUQmpNemszTlRrMlpqazE= https://localhost:8443/gateway/proxy-token/health/v1/gateway-status HTTP/1.1 401 Unauthorized Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html;charset=iso-8859-1 Content-Length: 684 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 401 Error in token provider config: passcode use with knox.token.exp.server-managed set to false.</title> </head> <body><h2>HTTP ERROR 401 Error in token provider config: passcode use with knox.token.exp.server-managed set to false.</h2> <table> <tr><th>URI:</th><td>/gateway/proxy-token/health/v1/gateway-status</td></tr> <tr><th>STATUS:</th><td>401</td></tr> <tr><th>MESSAGE:</th><td>Error in token provider config: passcode use with knox.token.exp.server-managed set to false.</td></tr> <tr><th>SERVLET:</th><td>proxy-token-knox-gateway-servlet</td></tr> </table> </body> </html> ``` -- 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. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org