[JBoss-user] [Security & JAAS/JBoss] - Re: Secure the Invokers
Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces"); properties.put(Context.PROVIDER_URL, serverURL); Context ctx = new InitialContext(properties); JBossCallBackHandler jb = new JBossCallBackHandler(); System.setProperty("java.security.auth.login.config","/usr/ciji/JBoss/CodeSamples/Security/auth.conf"); LoginContext lc = new LoginContext("other", jb); lc.login(); Object obj = ctx.lookup("jmx/invoker/RMIAdaptor"); RMIAdaptor rmiAdaptor_ = (RMIAdaptor)PortableRemoteObject.narrow(obj,RMIAdaptor.class); JBossCallBackHandler public class JBossCallBackHandler implements CallbackHandler { /* (non-Javadoc) * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[]) */ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks instanceof NameCallback) { // prompt the user for a username NameCallback nc = (NameCallback)callbacks; // ignore the provided defaultName nc.setName("admin"); } else if (callbacks instanceof PasswordCallback) { // prompt the user for sensitive information PasswordCallback pc = (PasswordCallback)callbacks; System.err.print(pc.getPrompt()); System.err.flush(); char[] test ={'a','d','m','i','n'}; pc.setPassword(test); } } // TODO Auto-generated method stub } } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846852#3846852 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846852 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Security & JAAS/JBoss] - ava.lang.SecurityException: Failed to authenticate principal
HI All, I secured the RmiAdaptor using the Wiki Documnet and while tryiong to invoke any operations using the RMIAdaptor handle i am getting the exception that is listed below. Any help regarding this is mot welcome. java.lang.RuntimeException: java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:203) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96) at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53) at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) at $Proxy0.queryNames(Unknown Source) at SecurityTest.discoverDomain(SecurityTest.java:40) at SecurityTest.main(SecurityTest.java:33) Java Code is : Properties env = new Properties(); env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); env.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces"); env.setProperty("jnp.sotimeout","1"); String jmxConnectionURL="jnp://"+serverURL+":"+port; env.setProperty(Context.PROVIDER_URL, jmxConnectionURL); env.put(Context.SECURITY_PRINCIPAL, "admin"); env.put(Context.SECURITY_CREDENTIALS, "admin"); InitialContext ctx_ = new InitialContext(env);Object obj = ctx_.lookup("jmx/invoker/RMIAdaptor"); RMIAdaptor rmiAdaptor_ = (RMIAdaptor)PortableRemoteObject.narrow(obj,RMIAdaptor.class); Thanks & Regards Ciji View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846411#3846411 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846411 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Security & JAAS/JBoss] - Re: Required jboss-3.2.3.tar !
Try out this URL http://prdownloads.sourceforge.net/jboss/ View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846409#3846409 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846409 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Security & JAAS/JBoss] - Re: Secure the Invokers
Thanks for the reply Scott. The issue is that i would like to know whether we can apply the Security Credentials and secure the JBoss Server , if we are securing the invokers in the way suggested in the Wiki. Please find attatced the code Properties env = new Properties(); env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); env.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces"); env.setProperty("jnp.sotimeout","1"); String jmxConnectionURL="jnp://"+serverURL+":"+port; env.setProperty(Context.PROVIDER_URL, jmxConnectionURL); env.put(Context.SECURITY_PRINCIPAL, "user"); env.put(Context.SECURITY_CREDENTIALS, "passwd"); InitialContext ctx_ = new InitialContext(env); Object obj = ctx_.lookup("jmx/invoker/RMIAdaptor"); RMIAdaptor rmiAdaptor_ = (RMIAdaptor)PortableRemoteObject.narrow(obj,RMIAdaptor.class); Thanks in Advance. Regards Ciji View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846255#3846255 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846255 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Security & JAAS/JBoss] - Secure the Invokers
Hi All, I am using an RMIAdaptor to get hold of the MBean Server and i am in the process of developiung an application that discovers JBoss 3.2.x. running in a network.Whether there is any way to secure the RMIAdaptor Service ? We want to restrict the access to those who knolw the proper Security Credentiols. IN the Wiki there is a document http://www.jboss.org/wiki/Wiki.jsp?page=SecureTheInvokers Can anyone provide me more clue or alternate ideas for the issue i am facing.? Thanks in Advance. Regards Ciji Joseph Please feel free to mail to [EMAIL PROTECTED] , for any clarifications reagrding this. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846246#3846246 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846246 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [HTTPD, Servlets & JSP] - java.lang.reflect.UndeclaredThrowableException
Hi All, I am trying to programatically read all the Connector Attribute Values for the Tomcat deployed in the JBoss.I am using an RMIAdaptior and after trying to read the value of "Config" from the JMX Console by using the filter "jboss.web:service=WebServer,*", I am getting the following Exception. "java.lang.reflect.UndeclaredThrowableException . Caused by: java.io.NotSerializableException: org.apache.xerces.dom.NodeListCache " Can someOne please help me how to resolve this issue.? Thanks in Advance. Regards CijiJoseph View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839667#3839667 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839667 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user