Mine is still not. Like every other Java/J2EE puzzle, you just have to keep
slugging it out until you get it. There's just no other way...
I'm increasingly more convinced that my problem is related to not having a way
to tell my JVM where the auth.conf file is. Every reference I can find says to
do it with -Djava.blah.blah.blah.... but there must also be another way.
One reference said something about assigning the
java.security.auth.login.config equal to a URL that points to the file and that
is exactly what happens when one uses the -Djava approach. But, it didn't say
what a java.security.auth.login.config is, which file it must be stated in, or
how you address using it to point to the file location.
At the moment, I'm trying to use this approach:
In the jvm\lib\security directory of my JVM, there is a file called
java.security. In that file, I guessed and added the following line:
java.security.auth.login.config=file:${java.home}/lib/security/auth.conf
and I put my auth.conf file in that /lib/security directory. The contents of
the auth.conf file are as follows:
client-login {
| org.jboss.security.ClientLoginModule required;
| };
In my java client code, I have the following about the JNDI lookup.
Properties props = new Properties();
| props.put Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.security.jndi.LoginInitialContextFactory");
| props.put(Context.PROVIDER_URL, "localhost:1099");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| props.put(Context.SECURITY_PRINCIPAL,"admin");
| props.put(Context.SECURITY_CREDENTIALS,"admin");
| props.put(Context.SECURITY_PROTOCOL,"client-login");
| Context ctx = new InitialContext(props);
That should be enough to get me an InitialContext with a LoginContext behind
the scenes, but alas, it does not.
Anyone else have any ideas?
Spoon
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861012#3861012
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861012
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user