Jersey custom SecurityContext on EJB jax-rs resource

后端 未结 3 1718
执念已碎
执念已碎 2021-01-03 09:08

I am trying to implement my own ContainerRequestFilter and configure SecurityContext. It works well on jax-rs resources but EJB jax-rs throws

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-03 09:53

    I finally resolved it. I could not use javax.security.RolesAllowed since it is handled differently from EJB container. So I implemented my own RolesAllowed annotation. It has a disadvantage that it is not so advanced as implementation of original javax.security.RolesAllowed. For example it does not support entity filtering like it is described in here. There is a demand from Java EE comunity for integration of security in next Java EE 8 release and I hope we'll see better solution.

    I put the working example on github.

提交回复
热议问题