Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
3bc8c7ac
Commit
3bc8c7ac
authored
Apr 06, 2016
by
michael.simon
Browse files
implement match filter for direct authentication
parent
a83ba099
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-webapp/src/main/java/edu/kit/scc/webreg/sec/SecurityFilter.java
View file @
3bc8c7ac
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment