I have configured my Java application to require authentication but not SSL
JVM args:
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=localIpAddress
management.properties:
com.sun.management.jmxremote.rmi.port=39998
com.sun.management.jmxremote.port=39999
com.sun.management.jmxremote.authenticate=true
com.sun.management.jmxremote.ssl=false
jmxremote.access
monitorRole readonly
dev readwrite
tester readwrite
jmxremote.password
monitorRole guest
dev dev
tester test
However, I am able to access this application without having to enter any credentials.
jconsole ipOfApplication:39998
I get direct access, without any password prompts. How do I make sure that I get prompted to login?
NOTE: Even after enabling SSL, the same behavior occurs.
You can use the following configuration:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=6002
-Dcom.sun.management.jmxremote.rmi.port=6003
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
and open ports 6002, 6003 on your FW for the JMX traffic. This will enable you to access JMX server remotely without introducing any custom RMI agent.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.