[Security & JAAS/JBoss] - Re: Latest JAAS Tutorial for Database communication
by jaikiran
"aleksab" wrote : What about when you want to secure a client?
|
| I've added a policy to the conf/login-config.xml, which seems to work. It connects to the database, but the username is always null (found out by examining the mysql log)
|
| In the client i'm using a LoginContext, and i've included
|
| | <login-module code="org.jboss.security.ClientLoginModule" flag="required" />
| | <module-option name="restore-login-identity">true</module-option>
| | </login-module>
| |
| in the conf/login-config.xml like the FAQ says I must do in order for the authentication info propagating to the called component.
|
| But the principal (and password I assume) is never propagating.
|
| My client looks like this:
|
| | LoginContext loginContext = new LoginContext("pn-login", new CallbackHandler());
| | loginContext.login();
| |
| | Hashtable<String, String> env = new Hashtable<String, String>();
| | env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
| | env.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| | env.put(InitialContext.PROVIDER_URL, "jnp://localhost:1099");
| |
| | Context ctx = new InitialContext(env);
| | SecurityBean bean = (SecurityBean) ctx.lookup("SecurityBeanImpl/remote");
| |
|
| When i call
|
| | System.out.println("Unsecure string: " + bean.getSimpleString());
| |
|
| i get this exception:
|
| | javax.security.auth.login.FailedLoginException: No matching username found in Principals
| |
|
| What am i doing wrong? Been struggling with this for some time now...
Is your client a standalone application? Also can you post the trace logs of the security package (look at Q4 at http://wiki.jboss.org/wiki/Wiki.jsp?page=SecurityFAQ to see how it can be enabled)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024524#4024524
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024524
17Â years, 10Â months
[JBoss Portal] - Help deciding on using JBoss Portal
by moux
Dear all,
We're working on a 3 phrase project, for the first phrase we would like to have working portal up and running in less than a month. JBoss components and JBoss portal offer great features. I have following question which highly appreciate if get answered:
1) Which version to choose to start working on? 2.4 is recommended to start working on or 2.6? Is 2.6 reliable enough to base our developments on it?
2) In case if 2.4 is recommended to use over 2.6, later on when 2.6 reaches the production is it possible to upgrade 2.4 easily to 2.6?
3) Is JBoss Portal cappable of handling a high traffic web site? (off course we would deploy it on good servers and have some people on tweaking the application server)
4) Is JBoss Portal secure enough?
I do appreciate for your assistance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024521#4024521
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024521
17Â years, 10Â months