This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 161276 - SecurityException: Failed to authenticate principal=admin, securityDomain=jmx-console
Summary: SecurityException: Failed to authenticate principal=admin, securityDomain=jmx...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Petr Hejl
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 16:07 UTC by Marian Mirilovic
Modified: 2010-12-01 06:38 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 57105


Attachments
stacktrace (828 bytes, text/plain)
2010-05-06 14:38 UTC, jasondonmoyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2009-03-26 16:07:50 UTC
23 duplicates so far ... reported also for 6.7/trunk

Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86
User comments: watching tv
STACKTRACE: (first 10 lines)
java.lang.SecurityException: Failed to authenticate principal=admin, securityDomain=jmx-console
        at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:0)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
Comment 1 joelmmx 2009-03-30 15:53:29 UTC
Hi. When I start the Jboss Server using NetBeans IDE this Exception is generate for the NetBenas IDE while the server is
starting! thanks for you help!
Comment 2 francisdb 2009-04-09 16:58:58 UTC
we have our own security settings on the jmx console
a solution would be to provide a login/password field for jmx authentication when setting up the server in netbeans
Comment 3 Petr Hejl 2009-09-17 16:03:49 UTC
Make sure there is a proper name and password in serverdir/conf/props/jmx-console-users.properties as a workaround.

Please provide a sample configuration of your server and exact version.
Comment 4 jasondonmoyer 2010-05-06 14:38:28 UTC
Created attachment 98568 [details]
stacktrace

used the 'attach debugger to port 9797' menu item from the debugger drop down
Comment 5 sweetlandj 2010-05-27 19:25:05 UTC
I have JBoss configured to use UserRoleLoginModule for the jmx-console and have
configured users and roles in conf/props/jmx-console-user.properties and
conf/props/jmx-console-roles.properties in both my configured server directory
and the default server directory but I still get this error.
Comment 6 sweetlandj 2010-10-06 19:48:14 UTC
I looked through the JBoss module source code and I finally figured out what the issue was.  When it sets up the RMI connection to JBoss to query the MBeans it only sets the security credentials (parsed from $SERVER_HOME/conf/props/jmx-console-users.properties) if the file $JBOSS_HOME/client/auth.conf is found.  If $JBOSS_HOME/client/auth.conf does not exist, then it does not set any credentials (i.e. it tries an anonymous connection).

For some reason auth.conf was missing on my system.  I copied the auth.conf file from a JBoss 4 installation and everything started working.

I'm not sure why having auth.conf is a prerequisite.  I don't see it in any of the JBoss 5 instances I have.  Is it even still relevant in JBoss 5?

I second the request to be able to explicitly specify a username and password in the server configuration screen, perhaps along with a checkbox indicating that authentication is required.  (This checkbox value could be used in place of auth.conf to determine whether credentials should be passed.)
Comment 7 Petr Hejl 2010-11-30 14:02:55 UTC
Fixed in web-main f09b919e47ca.

I filed issue 192674 for username/password in properties dialog.
Comment 8 Quality Engineering 2010-12-01 06:38:26 UTC
Integrated into 'main-golden', will be available in build *201012010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f09b919e47ca
User: Petr Hejl <phejl@netbeans.org>
Log: #161276 SecurityException: Failed to authenticate principal=admin, securityDomain=jmx-console