It seems that your example don't work (JBOSS 3.2.3 +Tomcat 4).

Code from unsecured page:


  | <%@ page import="javax.security.auth.login.LoginContext,
  |                  org.jboss.security.auth.callback.UsernamePasswordHandler,
  |                  org.jboss.security.SecurityAssociation,
  |                  javax.security.auth.Subject,
  |                  java.security.PrivilegedAction,
  |                  java.io.IOException,
  |                  XXX.core.DBHelper,
  |                  XXX.ejb.core.XXXObjectHome"%>
  | <%=SecurityAssociation.getPrincipal()%>
  | <%
  |     LoginContext lc = new LoginContext("my-domain",new 
UsernamePasswordHandler("internal","internal"));
  |     lc.login();
  | %>
  | <%=request.getUserPrincipal()%>
  | <%=SecurityAssociation.getPrincipal()%>
  | <%
  |     XXXObjectHome XXObjectHome = DBHelper.getInstance().getXXXObjectHome();
  |     XXXObjectHome.findByPath("system/object").getName();
  |     lc.logout();
  | %>
  | 

returns me in logs:


  | 2004-04-05 17:10:30,835 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBExceptio
  | n, causedBy:
  | java.lang.SecurityException: Authentication exception, principal=null
  |         at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(Se
  | curityInterceptor.java:164)
  |         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
  | tor.java:81)
  |         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
  | 20)
  |         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
  | actoryFinderInterceptor.java:93)
  |         at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java
  | :483)
  |         at org.jboss.ejb.Container.invoke(Container.java:720)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
  | nDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  |         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
  |         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
  | a:90)
  |         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
  | java:46)
  |         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
  | 5)
  |         at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
  |         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
  |         at $Proxy43.findByPath(Unknown Source)
  |         at org.apache.jsp.sec_jsp._jspService(sec_jsp.java:64)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  | 
  | 

But I have user internal/internal!
Please help me!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829211#3829211

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829211


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to