Skip to content
Snippets Groups Projects
Commit 3bc8c7ac authored by Michael Simon's avatar Michael Simon
Browse files

implement match filter for direct authentication

parent a83ba099
No related branches found
No related tags found
No related merge requests found
......@@ -215,10 +215,13 @@ public class SecurityFilter implements Filter {
response.sendError( HttpServletResponse.SC_NOT_ACCEPTABLE );
return;
}
String directAuthAllow = appConfig.getConfigValue("direct_auth_allow");
/*
* need to implement subnet matching here
*/
if (! request.getRemoteAddr().matches(directAuthAllow)) {
logger.info("Denying direct-auth from {}. Does not match.", request.getRemoteAddr());
response.sendError( HttpServletResponse.SC_NOT_ACCEPTABLE );
return;
}
String auth = request.getHeader("Authorization");
if (auth != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment