[Security & JAAS/JBoss] - LDAP Module Error : JBoss 4.0.1
by ophis.m
Hi,
I curretly attempting to secure a web application by adding LDAP Authentication. It looks like it not loading the configured security Realm for the application as it ends up loading the "UsersRolesLoginModule", anything addtional i must do? I have added the changes to :
login-config.xml
jbossweb.xml
web.xml
As the any other file i need to modify ?
I am getting the following exception :
2008-04-09 18:29:55,526 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@9cd006
2008-04-09 18:29:55,527 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Added other, org.jboss.security.plugins.SecurityDomainContext@11d75b9 to map
2008-04-09 18:29:55,538 ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule] Failed to load users/passwords/role files
java.io.IOException: Properties file users.properties not found
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadProperties(UsersRolesLoginModule.java:217)
I have setup an LDAP Realm in *login-confug.xml* as follows :
....
<!-- Security domains for OpenLDAP -->
<application-policy name = "OpenLDAPRealm">
<login-module code="org.jboss.security.auth.spi.LdapLoginModulee" flag="required" >
<module-option name = "java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
<module-option name="java.naming.provider.url">ldap://ldaphosts.com:389</module-option>
<module-option name="java.naming.security.authentication">simple</module-option>
<module-option name="java.naming.security.principal">S_PRINC_AD</module-option>
<module-option name="java.naming.security.credentials">ADBrowser</module-option>
<module-option name="rolesCtxDN">OU=The Agency,DC=com</module-option>
<module-option name="matchOnUserDN">false</module-option>
<module-option name="principalDNSuffix">@theagency.com</module-option>
<module-option name="roleAttributeID">memberOf</module-option>
<module-option name="roleAttributeIsDN">true</module-option>
<module-option name="roleNameAttributeID">name</module-option>
<module-option name="uidAttributeID">sAMAccountName</module-option>
<module-option name="searchScope">SUBTREE_SCOPE</module-option>
<module-option name="defaultRole">Group_Web</module-option>
</login-module>
</application-policy>
....
and have web.xml as follows :
....
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure</web-resource-name>
<url-pattern>*.jsp</url-pattern>
<http-method>HEAD</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Group_Web</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>OpenLDAPRealm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginError.jsp</form-error-page>
</form-login-config>
</login-config>
....
and
jbossweb.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>java:/jaas/OpenLDAPRealm</security-domain>
</jboss-web>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143859#4143859
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143859
18 years, 3 months
[JBoss Portal] - What is the function of the jboss-app.xml
by speleomaniac
Hi,
I can't quite get the reason we have to place this file in a portlet deployment.
I assumed, it might help unifying several deployed war's under one application. When I tested this (when I tried to deploy several several war's containing portlets containing the same application name in jboss-app.xml), I got the exception that this application is already deployed and the war had rejected to deploy.
Then I removed the jboss-app.xml from one of the wars and try to use the application name in component-ref element in the -object.xml then portal complained this application name belongs to another war.
So if jboss-app.xml is not there to unify several wars/portlets under to one application, what is the resaon of its existence.
The reason I tried all this, when we have portlets that are deployed from different war's, they are not able to share portlet session, which is a requirement from the Servlet specification I guess, I just hope if I can unify them under one application name, they might share the same portlet session.
Anyway what is the use of the jboss-app.xml in this case?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143854#4143854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143854
18 years, 3 months
[EJB 3.0] - Re: Reference-Problems within an ear
by jwenting
the persistence context exists within the context of its entities.
Without those entities it has no real meaning.
That means those entities need to be packed with the persistence context.
You might be best off restructuring your project to have a single persistence module containing all your entities and the persistence context, and referencing to that from your other modules.
That also prevents a lot of class duplication among the other modules, which can become a major headache when table definitions or other entity-related stuff changes.
As it now stands in your application you'd need to change each module separately, rather than change just one.
I can guarantee that sooner rather than later that'll come back to bite you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143848#4143848
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143848
18 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Josso doubt
by tamilnandhu
Hi I am using Jboss with josso.
My doubt is, whether the JOSSO can be used with JSP pages only, ot can it be ued with the servlet class files also,...?
I mean, i have some servlet class files under the packages. when i gave the <url-pattern> at the web.xml file as /* and build it.
Then the Josso auth takes place, but after that i get a blank browser and the following error in the console .
12:34:25,592 INFO [SSO_AUDIT] Mon Apr 14 12:34:25 IST 2008 - sso-user - info -
| user1 - authenticationSuccess=success - remoteHost=192.168.10.10,authScheme=ba
| sic-authentication,ssoSessionId=62EEA9A789A654794D515DF3828513BC
| 12:34:31,642 ERROR [CoyoteAdapter] An exception or error occurred in the contain
| er during the request processing
| java.lang.ClassCastException: org.jnp.interfaces.NamingContext
| at org.josso.jb42.agent.JBossCatalinaRealm.prepareENC(JBossCatalinaRealm
| .java:282)
| at org.josso.jb42.agent.JBossCatalinaRealm.hasRole(JBossCatalinaRealm.ja
| va:199)
| at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.hasResourcePermis
| sion(JBossSecurityMgrRealm.java:243)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:506)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:157)
| at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:541)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 6)
| at java.lang.Thread.run(Thread.java:595)
So please tell me how to use josso with servlet classes,...
Thanks,
Nandhu.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143844#4143844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143844
18 years, 3 months
[JBoss jBPM] - Re: Xforms and Jbpm
by brca
I forgot to disable html :)
Here is the code:
I have one xhtml file for task node. In that xhtml I put code of iframe:
< iframe src="xform.xhtml" width="800" height="600">
If instead of iframe tag put just link:
< a href="xform.xhtml">Show me the xform
It's the same think.
But if I put in iframe path to html file for example home.html, when viewing the task it's displayed correctly.
I also tried to edit jbm-console.war - task.xhtml file and to put iframe tag there.
I tried to put path to xhtml file, not xforms and got the same problem. So I can't open any file with xhtml extension, while html works fine.
I tried to open xhtml page in firefox browser which has iframe tag like I wrote, and it works fine, but not work with jbpm, and with tomcat working too.
Don't know what's the problem. Is it possible to do something like that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143830#4143830
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143830
18 years, 3 months
[JBoss jBPM] - Re: Xforms and Jbpm
by brca
Here is the code:
I have one xhtml file for task node. In that xhtml I put code of iframe:
If instead of iframe tag put just link:
Show me the xform
It's the same think.
But if I put in iframe path to html file for example home.html, when viewing the task it's displayed correctly.
I also tried to edit jbm-console.war - task.xhtml file and to put iframe tag there.
I tried to put path to xhtml file, not xforms and got the same problem. So I can't open any file with xhtml extension, while html works fine.
I tried to open xhtml page in firefox browser which has iframe tag like I wrote, and it works fine, but not work with jbpm, and with tomcat working too.
Don't know what's the problem. Is it possible to do something like that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143829#4143829
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143829
18 years, 3 months