Romain Manni-Bucau created TOMEE-1952:
-----------------------------------------
Summary: openejb.ejbd.authenticate-with-request hides authentication exception
Key: TOMEE-1952
URL: https://issues.apache.org/jira/browse/TOMEE-1952
Project: TomEE
Issue Type: Bug
Reporter: Romain Manni-Bucau
Assignee: Romain Manni-Bucau
Fix For: 7.0.2
EJBException will wrap the actual exception still for runtime constraint, ex:
{code}
final Context context = new InitialContext(new PropertiesBuilder()
.p(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName())
.p(Context.PROVIDER_URL, "xxxxx")
.p(JNDIContext.AUTHENTICATE_WITH_THE_REQUEST, "true")
.p("java.naming.security.principal", "wrong")
.p("java.naming.security.credentials", "wrong")
.p("openejb.authentication.realmName", "xxxx")
.build());
final AnInterfaceRemote client = AnInterfaceRemote.class.cast(context.lookup("RemoteWithSecurityRemote"));
try {
client.call();
} catch (final EJBException e) {
assertTrue(LoginException.class.isInstance(e.getCause()));
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|