java - Jolokia / JMX authentication in Javascript app -


i develop javascript-based frontend jmx / jolokia backend. basically, tool should prettier html5-based jconsole people, don't code in java.

my question is, how supposed authenticate users trying read / update data jmx?

should create kind of node.js-based proxy manage sessions, user authentication , pass queries between html5 frontend , jmx or use jmx authentication?

i've come 2 solutions:

  1. ajax request -> node.js auth -> jolokia -> jmx -> jolokia -> node.js -> ajax response
  2. ajax request -> jolokia -> jmx -> jolokia -> ajax request

in 1. node.js transparent, ie. not change requests passed jolokia , returned it.

as javascript , frontend dev have experience backend technologies such ruby, node.js , popular php frameworks well, not experience java and, honest, don't know practice better. there 3rd option perhaps?

i think it's important stress fact communication xhr / json based , i'm using angular.js mvc framework here. could, instance, create angular.js service utilize js library jolokia.

you can use basic authentication directly jolokia's javascript library if secure jolokia agent accordingly. i.e. if use jolokia war-agent can set up use j2ee security. other types of agents exist similar mechanisms.

for accessing jmx directly need proxy sure, since won't able access jmx directly within javascript anyway (with or without security).

my recommendation option 2. above, please use newest snapshot releases (1.1.2-snapshot, 1.1.2 released) because contains important fixes cors access.

but before go far, know hawt.io ? quite similar planned project


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -