EJB Security returning WFLYEJB0364 when accessing EJB method
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.2.3
Issue
I followed the documentation IDP and SP Setup and Configuration and it's failing with the following error even though the user has permissions:
"2019-05-17 13:37:35,618 ERROR [org.jboss.as.ejb3.invocation] (default task-2) WFLYEJB0034: EJB Invocation failed on component SecuredStatelessBean for method public void testapp.ejb.SecuredStatelessBean.testMethod(): javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public void testapp.ejb.SecuredStatelessBean.testMethod() of bean: SecuredStatelessBean is not allowed"
Resolution
A bug was identified with the Picketlink subsystem.
As a workaround, adding the LoginModule used from IDP in SP may force to retrieve the user information and allow the method execution.
Root Cause
The bug troubleshoot of the issue shows that an inner method was executed twice and cleaning the context between then, preventing the user to execute the method.
More information about it can be found at this link: Content from issues.jboss.org is not included.JBEAP-16924
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.