Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11212

Create test for EJB client configured only using AuthenticationContext

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • EJB, Security, Test Suite
    • None

      EJB client configured programmatically like this:

      AuthenticationConfiguration common = AuthenticationConfiguration.empty()
            .useProtocol("remote+http")
            .useHost("127.0.0.1")
            .usePort(8080);
      final AuthenticationContext authCtx = AuthenticationContext.empty().with(MatchRule.ALL, common);
      
      AuthenticationContext.getContextManager().setThreadDefault(authCtx);
      
      InitialContext ctx = new InitialContext(getCtxProperties());
      String lookupName = "ejb:/server/HelloBean!ejb.HelloBeanRemote";
      HelloBeanRemote bean = (HelloBeanRemote)ctx.lookup(lookupName);
      

      Inspired by this project https://github.com/jmartisk/mock-artifacts/tree/42f38cb259b035ad898222bc68370dfccfb8f796/ejbclient/eap7.1-authentication-context-unsecured

              jmartisk@redhat.com Jan Martiska
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: