tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TOMEE-1952) openejb.ejbd.authenticate-with-request hides authentication exception
Date Tue, 04 Oct 2016 15:09:20 GMT

     [ https://issues.apache.org/jira/browse/TOMEE-1952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Romain Manni-Bucau resolved TOMEE-1952.
---------------------------------------
    Resolution: Fixed

> 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)

Mime
View raw message