Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When JACC is enabled, annotated role mapping is not enforced properly. #8903

Closed
toshiyamamoto opened this issue Sep 10, 2019 · 0 comments · Fixed by #8932
Closed

When JACC is enabled, annotated role mapping is not enforced properly. #8903

toshiyamamoto opened this issue Sep 10, 2019 · 0 comments · Fixed by #8932
Assignees
Labels
in:Security release bug This bug is present in a released version of Open Liberty release:190010 team:Core Security

Comments

@toshiyamamoto
Copy link
Contributor

When servlet roles are defined by ServletSecurity annotations, the annotations are not parsed correctly, but throws the following exception:

java.lang.NullPointerException
at com.ibm.ws.security.authorization.jacc.web.impl.URLMap.convertMethod(URLMap.java:962)
at com.ibm.ws.security.authorization.jacc.web.impl.URLMap.convertRTM(URLMap.java:1005)
at com.ibm.ws.security.authorization.jacc.web.impl.URLMap.mergeRTM(URLMap.java:952)
at com.ibm.ws.security.authorization.jacc.web.impl.URLMap.getRoleMap(URLMap.java:348)
at com.ibm.ws.security.authorization.jacc.web.impl.WebSecurityPropagatorImpl.processUrlMap(WebSecurityPropagatorImpl.java:333)

This is an example of annotation:

@DeclareRoles({ "Role1" })
@ServletSecurity(value = @HttpConstraint(rolesAllowed = {
"Role1 }), httpMethodConstraints = {
@HttpMethodConstraint(value = "GET", rolesAllowed = "Role1"),
@HttpMethodConstraint(value = "POST", rolesAllowed = "Role1") })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:Security release bug This bug is present in a released version of Open Liberty release:190010 team:Core Security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants