Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9106665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:23:30+00:00 2026-06-17T02:23:30+00:00

all. Have been trying to get remoted JMX with JAAS authentication to work usin

  • 0

all.

Have been trying to get remoted JMX with JAAS authentication to work usin Camel version 2.10.3 + Java 6.

The app uses Java DSL and is “hand wired”, and runs with system properties:

-Dcom.sun.management.jmxremote.authenticate=true 
-Djmx.remote.x.login.config=StagingJmxAuthConfig 
-Dorg.apache.camel.jmx.usePlatformMBeanServer=true 
-Djava.security.auth.login.config=./src/main/resources/conf/ldap-auth.config 
-Dcom.sun.management.jmxremote.ssl=false
-Dorg.apache.camel.jmx.createRmiConnector=true
-Dorg.apache.camel.jmx.rmiConnector.registryPort=9140

However, for all intents and purposes it seems that I might as well be running with authentication/authorization switched off.

Debugging into the JRE’s JMX and JAAS classes (and Camel as well), note the following:

In the class org.apache.camel.management.DefaultManagementAgent:

cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);

This in turn later creates an instance of javax.management.remote.rmi.RMIJRMPServerImpl with an empty Map for the env constructor argument.

Now, I wonder if there’s something that’s just escaping me — when a request later comes to the the connector, and the javax.management.remote.rmi.RMIServerImpl does a doNewClient(), it can’t possibly trigger any JAAS activity?

Line 197-208 of RMIServerImpl – remember Camel sets “env” to null, which is translated to empty map:

JMXAuthenticator authenticator =
    (JMXAuthenticator) env.get(JMXConnectorServer.AUTHENTICATOR);
if (authenticator == null) {
    /*
     * Create the JAAS-based authenticator only if authentication
     * has been enabled
     */
    if (env.get("jmx.remote.x.password.file") != null ||
    env.get("jmx.remote.x.login.config") != null) {
    authenticator = new JMXPluggableAuthenticator(env);
    }
}

Am I correct in assuming that to get remoted, JAAS authenticated JMX to work one must hand code the JMX RMI connector setup?

Shouldn’t Camel have provided an environment to get JAAS to work? Doesn’t even seem to touch the JAAS config file…

UPDATE: SOLVED

Setting the following system properties on the VM did the trick:

-Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.port=9410
-Dcom.sun.management.jmxremote.authenticate=true
-Djmx.remote.x.login.config=StagingJmxAuthConfig
-Dorg.apache.camel.jmx.usePlatformMBeanServer=true
-Djava.security.auth.login.config=./src/main/resources/conf/ldap-auth.config
-Dcom.sun.management.jmxremote.ssl=false 
-Dorg.apache.camel.jmx.createRmiConnector=false 
-Dcom.sun.management.jmxremote.login.config=StagingJmxAuthConfig

For us, using a secured LDAP, the following is the login config:

StagingJmxAuthConfig {
   com.sun.security.auth.module.LdapLoginModule REQUIRED
   java.naming.security.authentication="simple"
   java.naming.security.principal="cn=Directory Manager"
   java.naming.security.credentials="PASSWORD"
   userProvider="ldap://LDAPHOST:389/BASEDN"
   userFilter="(&(uid={USERNAME})(appRole=SOME_VALUE))"
   authzIdentity=monitorRole
   debug=true
   useSSL=false;
   };

Now I’m able to connect using jmxterm:

java -jar jmxterm-1.0-alpha-4-uber.jar -l service:jmx:rmi:///jndi/rmi://THEHOST:9410/jmxrmi -u LDAPUSER -p LDAPPASS

Note that the JNDI RMI name is missing the “/camel” postfix — this is the only difference, it seems.

HOORAY!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:23:31+00:00Added an answer on June 17, 2026 at 2:23 am

    In essence:

    • Use Java6 authenticated JMX remoting
    • Set org.apache.camel.jmx.createRmiConnector=false
    • Set org.apache.camel.jmx.usePlatformMBeanServer=true

    The example above also shows how to connect to a search protected LDAP, which is actually isolated as the application in question uses a different LDAP for JNDI lookup for JMS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying all afternoon to get the CoreData portion of my app
Alright so I have been trying to get all of my separate classes (At
I have been trying all afternoon to get the jQuery Sifr Plugin ( http://jquery.thewikies.com/sifr/
I have been trying all day to get some data properly formatted in a
I have been struggling all afternoon trying to get a simple mailto: tag to
I have been trying to get a ruby on rails app going on my
I have been trying all day to find a way to make this work.
I have been trying to get my Android App to post data to a
I have been trying to get xdebug, netbeabs 7.0 and drupal work to no
All i have something i have been trying to do for a while and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.