User loginNavigation |
Authenticate via JNDI over HTTP in JBoss and building/feeding JBossASIn Weblogic you can authenticate for remote EJB authentication via JNDI like this:
In JBoss you have to do this (official verbose explanation for the bored):
With a special file called auth.conf or jaas.config in your classpath:
JBoss did add a special org.jboss.security.jndi.LoginInitialContextFactory which allows you to do this like in WebLogic, however it doesn't work with the HTTP Stack for instance. If you look inside of it, it just does the jaas login above in the getInitialContext. The problem is that you still need a auth.conf or similar in the classpath. Since like 99% of all applications are looking to shove in a username and password this is still goofy. I needed the HttpNamingContextFactory to work, and I really didn't want to change the client's code to do all that JAAS monkey business, so I patched HttpNamingContextFactory to only try to do Jaas for you if you pass in the SECURITY_PRINCIPAL. I also made it work so that if you choose it include the auth.conf/jaas.config -- it is cool with that. If you don't then it does the smart thing and assumes you meant username/password normal authentication junk.
The magic is in getConfiguration() of course:
I put the details in here. Since JBoss may or may not put out a JBossAS 4.2.4, you can download the attached jar in the bug and below and follow these instructions:
Apparently JBoss's QA server is not public and they noticed a problem shutting down (noted in the bug) (public url warning loads java plugin for some reason). The only similar issue I hit in the test suite is completely unrelated and happens whether or not this patch is applied. If you're wondering "How the heck do I run these tests now that they did all this Maven business". Maven has advanced the JBoss build to where it can no longer run the tests from the main build. You must:
This seems to be under-documented. Google found it in an unmaintained and unlinked document here. Apparently, no one ran spell check or bothered to update the document since mid-2007. You will also be wondering "so what do I check out":
On the whole, I was really kind of annoyed at the Appcelerator guys for using "git" which seemed to me to be like the bad headache when people rushed to Subversion for relatively minor benefits compared to the major headaches of the tools sucking and it being slower and project disruption in general. And Git's command line interface was designed by someone who just does not care about other people understanding what is going on. However, after having to make a relatively minor commit in 4 branches and checking out and all that. I'm all about Git. It is a big enough improvement to make the disruption and high learning curve worth it. Who the heck wants to download 4 copies of the JBoss source tree?? Git would have let me switch branches and push seamlessly. However, as much as the JBoss 5 build annoys me with its lackluster performance, lack of documentation, lack of a single point of entry, it is far nicer than Appcelerator's rake build with that horrible build/config.yml. I got both to work of course, but I won't be converting all my projects to rake or maven anytime soon. I can see a day where I only use "Git" though.
|
Recent blog posts
|