Apache 2.2.24 mod_jk 1.2.37

I'm trying to pass the siteminder username through to Tomcat which is configured with mod_jk. The siteminder username is available a request header named "SM_USER".

When I hard code a value using the environment variable JK_REMOTE_USER(http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html), mod_jk picks it up and passes it through to Tomcat.

e.g.(works with static username) SetEnv JK_REMOTE_USER "nickw"

However, I want to take the SM_USER header and pass it through dynamically.

e.g.(user passed through is null) SetEnvIfNoCase SM_USER ^[a-z].* JK_REMOTE_USER

Is there an obvious problem with the config I'm using? Is the SetEnvIfNoCase processing occuring after the call to mod_jk? Or is there another simpler way that would accomplish the same thing?


Is there an obvious problem with the config I'm using?

yes. try to avoid mod_jk / mod_ajp, except you have strong reasons to use these connectors, this is what i learned from 7 years apache/tomcat - experience.

for those who downvote: discuss or gtfo. there is a reason why i wrote my statement, and i can prove it.

  • 2
    Please do prove it – Zotov Sep 19 '16 at 12:51
  • @Zotov: many many performance-tests we made back then. if you dont believe it go prove for yourself. it took us 6 months to figure out that mod_jk is far less reliable than expected. – that guy from over there Nov 13 '16 at 20:54
  • How about discussing why it should be avoided? What other proxying methods do you suggest for Apache/Tomcat? These two seem to be the dominating factor. They can be tricky (first hand experience with production loadbalancing servers), but once set up correctly, prove to be quite useful. – Shawn Mar 14 '17 at 13:17
  • Also, this isn't an answer, and more suited as a comment. – Shawn Mar 14 '17 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.