[thelist] Writing an Apache Module ..in Java?

Kelly Hallman khallman at ultrafancy.com
Wed Apr 14 12:16:32 CDT 2004

Ok, this is a stab in the dark..  I think I know the answer, but thought
maybe some remote experts could confirm...

Is it possible to write an Apache module in Java?

Fact: I have a Java object which provides authentication utility. This
object being Java is, unfortunately, non-negotiable. It's developed using
some proprietary, commercial Java-only crypto libraries. Good or bad, that
is a fact of life here, and reverse-engineering is also not an option.

(The difficulty I had trying to work this from the Java extension for PHP
 led me to explore all my options to extricate it from Java. No dice!)

Given those requirements (or limitations, depending on your disposition)  
does anyone have any suggestions? The ideal solution would be to write a
module in Java, or use Java to hook into Apache elsewise.

More details: The goal is to replicate the behavior of mod_securid, using
another authentication system that is proprietary via this Java object.

The issue is, we currently have a very nice proxy setup, where Apache and
mod_securid authenticate users and then REMOTE_USER is set in Apache to
identify the logged in user. Advantage being that proxied apps can
leverage this authentication system, without needing to do more than
understand REMOTE_USER (pretty basic for almost any web app).

My gut feeling is, this won't fly, since my uninformed assumption is that
a module can't be written without compiling something (i.e. no JVM:)
If true, does anyone have other suggestions? The primary goal is to set
the REMOTE_USER variable in Apache. Can this be done without a module?

Since the target authentication system relies on a Java object, I'm
thinking that writing an Apache module in Java would tie it all up nicely
(and I'd probably not go crazy). The alternative model is shoehorning this
Java object into every app, with no central place to update, etc.

If ya got anything, help a brutha out!

PS - Also have mod_python, mod_perl, etc--I just need to set the
REMOTE_USER variable. If I can do that easily, the rest I can probably
work out, if this starts looking like a viable thing to try....

Kelly Hallman

More information about the thelist mailing list