You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by vk...@apache.org on 2008/10/07 00:30:37 UTC
svn commit: r702294 - in
/portals/jetspeed-2/portal/branches/security-refactoring:
components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/
components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/
components/jet...
Author: vkumar
Date: Mon Oct 6 15:30:37 2008
New Revision: 702294
URL: http://svn.apache.org/viewvc?rev=702294&view=rev
Log:
Bug fixes for ldap replication and moving hardcoded values from assembly files
Added:
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java (contents, props changed)
- copied, changed from r702155, portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPostContextLoader.java
Removed:
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPostContextLoader.java
Modified:
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/administration.xml
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
Copied: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java (from r702155, portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPostContextLoader.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java?p2=portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java&p1=portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPostContextLoader.java&r1=702155&r2=702294&rev=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPostContextLoader.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java Mon Oct 6 15:30:37 2008
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.jetspeed.security.spi;
+package org.apache.jetspeed.components;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -22,6 +22,7 @@
import org.apache.jetspeed.security.JetspeedBeanInitializer;
import org.apache.jetspeed.security.SecurityException;
import org.apache.jetspeed.security.UserManager;
+import org.apache.jetspeed.security.spi.JetspeedSecuritySynchronizer;
/**
* @author <a href="mailto:vkumar@apache.org">Vivek Kumar</a>
Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/JetspeedPostContextLoader.java
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java Mon Oct 6 15:30:37 2008
@@ -143,6 +143,8 @@
{
a.setValues(attrValues);
attributes.add(a);
+ }else{
+ attributes.add(a);
}
}
else
Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java Mon Oct 6 15:30:37 2008
@@ -121,6 +121,8 @@
private void internalAddRelation(EntityDAO fromEntityDAO, EntityDAO toEntityDAO, Entity fromEntity, Entity toEntity) throws SecurityException
{
+ fromEntity = fromEntityDAO.getEntity(fromEntity.getId());
+ toEntity = toEntityDAO.getEntity(toEntity.getId());
String attrValue = null;
if (attributeContainsInternalId)
{
@@ -178,11 +180,11 @@
{
if (useFromEntityAttribute)
{
- internalAddRelation(targetDao, sourceDao, targetEntity, sourceEntity);
+ internalAddRelation(sourceDao, targetDao, sourceEntity, targetEntity);
}
else
{
- internalAddRelation(sourceDao, targetDao, sourceEntity, targetEntity);
+ internalAddRelation(targetDao, sourceDao, targetEntity, sourceEntity);
}
}
Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java Mon Oct 6 15:30:37 2008
@@ -262,7 +262,7 @@
{
try
{
- dn.add(configuration.getSearchDN());
+ dn.addAll(new DistinguishedName(configuration.getSearchDN()));
} catch (InvalidNameException inex)
{
// TODO throw exception
Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java Mon Oct 6 15:30:37 2008
@@ -32,13 +32,15 @@
public class JetspeedPrincipalLdapAssociationStorageManager implements JetspeedPrincipalAssociationStorageManager
{
private SecurityEntityManager ldapEntityManager;
+ private JetspeedPrincipalAssociationStorageManager databaseStorageManager;
/**
* @param ldapEntityManager
*/
- public JetspeedPrincipalLdapAssociationStorageManager(SecurityEntityManager ldapEntityManager)
+ public JetspeedPrincipalLdapAssociationStorageManager(JetspeedPrincipalAssociationStorageManager databaseStorageMngr,SecurityEntityManager ldapEntityManager)
{
this.ldapEntityManager = ldapEntityManager;
+ this.databaseStorageManager = databaseStorageMngr;
}
public void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
@@ -49,6 +51,7 @@
Entity toEntity = relatedFactory.createEntity(to);
SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
ldapEntityManager.addRelation(fromEntity, toEntity, relationType);
+ databaseStorageManager.addAssociation(from, to, associationName);
}
public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
@@ -59,6 +62,6 @@
Entity toEntity = relatedFactory.createEntity(to);
SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
ldapEntityManager.removeRelation(fromEntity, toEntity, relationType);
-
+ databaseStorageManager.removeAssociation(from, to, associationName);
}
}
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/administration.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/administration.xml?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/administration.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/administration.xml Mon Oct 6 15:30:37 2008
@@ -21,17 +21,17 @@
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<meta key="j2:cat" value="default" />
<property name="host">
- <value>localhost</value>
+ <value>${email.smtp.server.address}</value>
</property>
<property name="username">
- <value></value>
+ <value>${email.smtp.user.name}</value>
</property>
<property name="password">
- <value></value>
+ <value>${email.smtp.user.password}</value>
</property>
<property name="javaMailProperties">
<props>
- <prop key="mail.smtp.auth">false</prop>
+ <prop key="mail.smtp.auth">${email.smtp.auth}</prop>
</props>
</property>
</bean>
@@ -39,7 +39,7 @@
<bean id="adminVelocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<meta key="j2:cat" value="default" />
<property name="resourceLoaderPath">
- <value>/WEB-INF/templates/</value>
+ <value>${portal.core.templates.path}</value>
</property>
<property name="velocityProperties">
<props>
@@ -115,7 +115,7 @@
2 = Constraints = use Jetspeed (PageManager) Constraint-based Security
-->
<constructor-arg index="2">
- <value>2</value>
+ <value>${portal.core.security.type}</value>
</constructor-arg>
</bean>
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml Mon Oct 6 15:30:37 2008
@@ -28,11 +28,11 @@
Zero means no portlet timeout option by default.
-->
<constructor-arg index='1'>
- <value>0</value>
+ <value>${portal.core.aggregator.portlet.timeout}</value>
</constructor-arg>
<!-- Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service -->
<constructor-arg index="2">
- <value>3</value>
+ <value>${portal.core.aggregator.portlet.service.limit}</value>
</constructor-arg>
</bean>
@@ -152,19 +152,19 @@
<constructor-arg index="0">
<!-- Minimum number of workers to create -->
- <value>5</value>
+ <value>${portal.core.aggregator.worker.minthreads}</value>
</constructor-arg>
<constructor-arg index="1">
<!-- Maximum number of workers to create -->
- <value>50</value>
+ <value>${portal.core.aggregator.worker.threads}</value>
</constructor-arg>
<constructor-arg index="2">
<!-- Spare number of workers to create -->
- <value>3</value>
+ <value>${portal.core.aggregator.worker.sparethreads}</value>
</constructor-arg>
<constructor-arg index="3">
<!-- Maximum number of jobs processed by a worker before being released -->
- <value>3</value>
+ <value>${portal.core.aggregator.worker.maxjobsthreads}</value>
</constructor-arg>
</bean>
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties?rev=702294&r1=702293&r2=702294&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties Mon Oct 6 15:30:37 2008
@@ -169,6 +169,27 @@
assembly.dir=/WEB-INF/assembly
assembly.extension=.xml
+
+#-------------------------------------------------------------------------
+# Portal Core properties
+#-------------------------------------------------------------------------
+portal.core.templates.path=/WEB-INF/templates/
+#1 = Permissions = use Jetspeed Java Security Policy
+#2 = Constraints = use Jetspeed (PageManager) Constraint-based Security
+portal.core.security.type=2
+# Default portlet timeout in milliseconds:
+# Zero means no portlet timeout option by default.
+portal.core.aggregator.portlet.timeout=0
+# Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service
+portal.core.aggregator.portlet.service.limit=3
+#Minimum number of workers to create
+portal.core.aggregator.worker.minthreads=5
+#Maximum number of workers to create
+portal.core.aggregator.worker.threads=50
+#Spare number of workers to create
+portal.core.aggregator.worker.sparethreads=3
+#Maximum number of jobs processed by a worker before being released
+portal.core.aggregator.worker.maxjobsthreads=3
#-------------------------------------------------------------------------
# E M A I L
#-------------------------------------------------------------------------
@@ -178,6 +199,14 @@
email.manager = someemailaddress@somecompanyororganization.comororgornet
# email user info attribute (non standard)
email.userinfo.attribute = user.email
+# smtp email server address
+email.smtp.server.address=localhost
+# smtp email server user name
+email.smtp.user.name=
+# smtp email server user password
+email.smtp.user.password=
+#mail.smtp.auth
+email.smtp.auth=false
#-------------------------------------------------------------------------
# L A Y O U T
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org