1 Reply Latest reply on Sep 9, 2010 9:31 AM by Bartosz Baranowski

    Accessing secured JMX console - fails with credentials

    Bartosz Baranowski Newbie

      Maybe someone faced this. Did not find any answer yet. I have secure jmx console, defined user(in jmx...properties file) admin=admin for test.

      I can log in through web.

       

      Now Im trying to access from java code. It fails.

      I have tried shutdown.sh, with and without credentials, works as expected.

       

      Now in my code I set credentials in the same way, and make call to jmx beans, and it fails, saying that there is no principial:

       

      11:16:11,859 TRACE [SecurityAssociation] setPrincipal, p=admin, server=true
      11:16:11,859 WARN  [SecurityAssociation] Using deprecated API. Move to a security context based approach
      11:16:11,859 TRACE [SecurityAssociation] setPrincipal, sc=org.jboss.security.SecurityAssociation$SubjectContext@14d466{principal=admin,subject=null}
      11:16:11,859 TRACE [SecurityAssociation] setCredential, sc=org.jboss.security.SecurityAssociation$SubjectContext@14d466{principal=admin,subject=null}
      11:16:11,859 WARN  [SecurityAssociation] Using deprecated API. Move to a security context based approach
      11:16:11,968 DEBUG [TransactionManagerImpl] Marking tx TransactionImple < ac, BasicAction: a00000a:a30:4c88a5bd:b4 status: ActionStatus.RUNNING > for rollback.
      11:16:11,984 ERROR [STDERR] java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
      11:16:11,984 ERROR [STDERR]      at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:88)
      11:16:11,984 ERROR [STDERR]      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)

       

       

      Has anyone faced this?