gatein SVN: r8438 - portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-02-20 16:38:57 -0500 (Mon, 20 Feb 2012)
New Revision: 8438
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
Log:
- Fix possible NPE.
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-02-20 16:39:02 UTC (rev 8437)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-02-20 21:38:57 UTC (rev 8438)
@@ -55,12 +55,16 @@
{
for (int i = 0; i < messageArgs_.length; i++)
{
- String arg = messageArgs_[i].toString();
- if (isArgsLocalized())
+ final Object messageArg = messageArgs_[i];
+ if (messageArg != null)
{
- arg = resolveMessage(arg);
+ String arg = messageArg.toString();
+ if (isArgsLocalized())
+ {
+ arg = resolveMessage(arg);
+ }
+ msg = msg.replace("{" + i + "}", arg);
}
- msg = msg.replace("{" + i + "}", arg);
}
}
12 years, 10 months
gatein SVN: r8437 - in epp/portal/branches/EPP_5_2_Branch: component/web/security/src/main/java/org/exoplatform/web/login and 5 other directories.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-20 11:39:02 -0500 (Mon, 20 Feb 2012)
New Revision: 8437
Added:
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/ConversationStateCredentialsAccessor.java
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/DoLoginServlet.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/GateinWCIController.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/web.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5/src/main/application/lib/jboss5integration.jar/conf/configuration.xml
Log:
Bug 793651 ( JBEPP-729 )
- Upgrade WCI and WSRP
- Get rid of credentials from HTTP Session
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/DoLoginServlet.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/DoLoginServlet.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/DoLoginServlet.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -19,11 +19,14 @@
package org.exoplatform.web.login;
+import org.exoplatform.container.web.AbstractHttpServlet;
+import org.exoplatform.services.security.ConversationState;
+import org.exoplatform.web.security.AuthenticationRegistry;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.security.Credentials;
import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -33,7 +36,7 @@
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
*/
-public class DoLoginServlet extends HttpServlet
+public class DoLoginServlet extends AbstractHttpServlet
{
/** . */
@@ -65,7 +68,39 @@
initialURI = req.getContextPath();
}
+ // Now user is successfuly authenticated, so that we can remove credentials from temporary AuthenticationRegistry
+ // and add them to ConversationState
+ Credentials credentials = removeCredentialsFromRegistry(req);
+ setCredentialsToConversationState(credentials);
+
//
resp.sendRedirect(resp.encodeRedirectURL(initialURI));
}
+
+ /**
+ * Remove credentials from temporary AuthenticationRegistry because authentication of user is now finished.
+ *
+ * @param req
+ * @return credentials,which were removed from AuthenticationRegistry
+ */
+ protected Credentials removeCredentialsFromRegistry(HttpServletRequest req)
+ {
+ AuthenticationRegistry authenticationRegistry = (AuthenticationRegistry)getContainer().getComponentInstanceOfType(AuthenticationRegistry.class);
+ return authenticationRegistry.removeCredentials(req);
+ }
+
+ /**
+ * Add credentials to {@link ConversationState}.
+ *
+ * @param credentials
+ */
+ protected void setCredentialsToConversationState(Credentials credentials)
+ {
+ ConversationState currentConversationState = ConversationState.getCurrent();
+ if (currentConversationState != null && credentials != null)
+ {
+ log.debug("Adding credentials to conversationState for user " + credentials.getUsername());
+ currentConversationState.setAttribute(Credentials.CREDENTIALS, credentials);
+ }
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/GateinWCIController.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/GateinWCIController.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/GateinWCIController.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -19,6 +19,9 @@
package org.exoplatform.web.login;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.web.security.AuthenticationRegistry;
+import org.exoplatform.web.security.PortalLoginModule;
import org.gatein.wci.security.Credentials;
import org.gatein.wci.security.WCIController;
@@ -94,7 +97,17 @@
@Override
public Credentials getCredentials(final HttpServletRequest req, final HttpServletResponse resp)
{
- return (Credentials)req.getSession().getAttribute(Credentials.CREDENTIALS);
+ AuthenticationRegistry credRegistry = (AuthenticationRegistry)PortalContainer.getCurrentInstance(servletContext).
+ getComponentInstanceOfType(AuthenticationRegistry.class);
+ Credentials credentials = credRegistry.getCredentials(req);
+
+ // Try to find AuthenticatedCredentials in HTTP session
+ if (credentials == null)
+ {
+ credentials = (Credentials)req.getSession().getAttribute(PortalLoginModule.AUTHENTICATED_CREDENTIALS);
+ }
+
+ return credentials;
}
@Override
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -21,6 +21,7 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.web.AbstractFilter;
+import org.exoplatform.web.security.AuthenticationRegistry;
import org.exoplatform.web.security.security.CookieTokenService;
import org.exoplatform.web.controller.router.PercentEncoding;
import org.gatein.common.logging.Logger;
@@ -68,7 +69,9 @@
token, false);
if (o instanceof Credentials)
{
- req.getSession().setAttribute(Credentials.CREDENTIALS, o);
+ AuthenticationRegistry authenticationRegistry = (AuthenticationRegistry)getContainer().getComponentInstanceOfType(AuthenticationRegistry.class);
+ authenticationRegistry.setCredentials(req, (Credentials)o);
+
resp.sendRedirect(resp.encodeRedirectURL(
loginUrl(
req.getContextPath(),
Added: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.web.security;
+
+import org.gatein.wci.security.Credentials;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * Temporary registry for hold credentials (and potentially other attributes) during login process.
+ *
+ *
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public interface AuthenticationRegistry
+{
+
+ public Credentials getCredentials(HttpServletRequest request);
+
+
+ public void setCredentials(HttpServletRequest request, Credentials credentials);
+
+
+ public Credentials removeCredentials(HttpServletRequest request);
+
+
+ public void removeClient(String sessionId);
+
+}
Added: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.web.security;
+
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.security.Credentials;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * Temporary registry for hold credentials (and potentially other attributes) during login process to avoid store them in session.
+ * Registry is used only during authentication process and attributes of target client are cleared after successful authentication,
+ *
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public class AuthenticationRegistryImpl implements AuthenticationRegistry
+{
+ private static final Logger log = LoggerFactory.getLogger(AuthenticationRegistryImpl.class);
+
+ // Key is ID of HTTP Session. Value is map with various attributes of single client (session),
+ // which will be used during authentication process.
+ private final ConcurrentMap<String, Map<String, Object>> registry = new ConcurrentHashMap<String, Map<String, Object>>();
+
+
+ public Credentials getCredentials(HttpServletRequest request)
+ {
+ String sessionId = getSessionId(request);
+ Map<String, Object> attributesOfClient = registry.get(sessionId);
+
+ if (attributesOfClient == null)
+ {
+ return null;
+ }
+
+ return (Credentials)attributesOfClient.get(Credentials.CREDENTIALS);
+ }
+
+
+ public void setCredentials(HttpServletRequest request, Credentials credentials)
+ {
+ String sessionId = getSessionId(request);
+
+ Map<String, Object> attributesOfClient = getAttributesOfClient(sessionId);
+ attributesOfClient.put(Credentials.CREDENTIALS, credentials);
+ }
+
+
+ public Credentials removeCredentials(HttpServletRequest request)
+ {
+ String sessionId = getSessionId(request);
+
+ Map<String, Object> attributesOfClient = getAttributesOfClient(sessionId);
+
+ Credentials credentials = (Credentials)attributesOfClient.remove(Credentials.CREDENTIALS);
+
+ // Clear map if no more attributes are here.
+ if (attributesOfClient.size() == 0)
+ {
+ removeClient(sessionId);
+ }
+
+ return credentials;
+ }
+
+
+ public void removeClient(String sessionId)
+ {
+ registry.remove(sessionId);
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("Entry cleared for session " + sessionId);
+ }
+ }
+
+
+ private Map<String, Object> getAttributesOfClient(String sessionId)
+ {
+ Map<String, Object> attributes = registry.get(sessionId);
+
+ if (attributes == null)
+ {
+ attributes = new ConcurrentHashMap<String, Object>();
+ registry.putIfAbsent(sessionId, attributes);
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("New entry created in AuthenticationRegistry for session " + sessionId);
+ }
+ }
+
+ return registry.get(sessionId);
+ }
+
+
+ private String getSessionId(HttpServletRequest req)
+ {
+ return req.getSession().getId();
+ }
+}
Added: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.web.security;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractHttpSessionListener;
+
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public class AuthenticationRegistryListener extends AbstractHttpSessionListener
+{
+
+ @Override
+ protected boolean requirePortalEnvironment()
+ {
+ return true;
+ }
+
+
+ @Override
+ protected void onSessionCreated(ExoContainer container, HttpSessionEvent event)
+ {
+ }
+
+
+ @Override
+ protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event)
+ {
+ AuthenticationRegistry authenticationRegistry = (AuthenticationRegistry)container.getComponentInstanceOfType(AuthenticationRegistry.class);
+ authenticationRegistry.removeClient(event.getSession().getId());
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -19,6 +19,7 @@
package org.exoplatform.web.security;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.web.login.InitiateLoginServlet;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
@@ -28,6 +29,7 @@
import org.gatein.wci.security.WCILoginController;
import java.io.IOException;
+import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
@@ -63,7 +65,7 @@
{
//Create token
AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
- Credentials credentials = (Credentials)req.getSession().getAttribute(Credentials.CREDENTIALS);
+ Credentials credentials = getCredentials(req);
String cookieToken = tokenService.createToken(credentials);
log.debug("Found a remember me request parameter, created a persistent token " + cookieToken + " for it and set it up " +
@@ -94,4 +96,34 @@
String redirectURI = req.getContextPath() + "/dologin?initialURI=" + uri;
resp.sendRedirect(resp.encodeRedirectURL(redirectURI));
}
+
+ /**
+ * Read credentials from ConversationState instead of HTTP session.
+ *
+ * @param req
+ * @return credentials
+ */
+ @Override
+ protected Credentials getCredentials(HttpServletRequest req)
+ {
+ return getAuthenticationRegistry(req).getCredentials(req);
+ }
+
+ /**
+ * Set credentials to ConversationState instead of HTTP session
+ *
+ * @param req
+ * @param credentials
+ */
+ @Override
+ protected void setCredentials(HttpServletRequest req, Credentials credentials)
+ {
+ getAuthenticationRegistry(req).setCredentials(req, credentials);
+ }
+
+ private AuthenticationRegistry getAuthenticationRegistry(HttpServletRequest req)
+ {
+ return (AuthenticationRegistry) ExoContainerContext.getCurrentContainer().
+ getComponentInstanceOfType(AuthenticationRegistry.class);
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -169,7 +169,6 @@
else
{
request.getSession().setAttribute(AUTHENTICATED_CREDENTIALS, wc);
- handleCredentialsRemoving(request);
}
}
catch(Exception e)
@@ -187,6 +186,13 @@
*/
public boolean abort() throws LoginException
{
+ HttpServletRequest request = getCurrentHttpServletRequest();
+
+ if (request != null)
+ {
+ handleCredentialsRemoving(request);
+ }
+
return true;
}
@@ -210,14 +216,24 @@
}
/**
- * Remove credentials of authenticated user from HTTP session.
+ * Remove credentials of authenticated user from AuthenticationRegistry.
*
* @param request httpRequest
*/
protected void handleCredentialsRemoving(HttpServletRequest request)
{
- // TODO: We can't remove credentials from HTTP session right now because WSRP-Security relies on it. See method WSSecurityCredentialHelper.handleRequest
- // request.getSession().removeAttribute(Credentials.CREDENTIALS);
+ try
+ {
+ AuthenticationRegistry authenticationRegistry = (AuthenticationRegistry)getContainer().getComponentInstanceOfType(AuthenticationRegistry.class);
+ if (request != null)
+ {
+ authenticationRegistry.removeCredentials(request);
+ }
+ }
+ catch (Exception e)
+ {
+ log.debug("Unable to remove credentials from credentialsRegistry.", e);
+ }
}
private HttpServletRequest getCurrentHttpServletRequest()
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2012-02-20 16:39:02 UTC (rev 8437)
@@ -50,10 +50,10 @@
<org.gatein.parent.version>1.1.0-GA</org.gatein.parent.version>
<org.gatein.common.version>2.0.4-GA</org.gatein.common.version>
<org.gatein.dep.version>1.1.0-GA</org.gatein.dep.version>
- <org.gatein.wci.version>2.1.0-GA</org.gatein.wci.version>
+ <org.gatein.wci.version>2.1.1-Beta03</org.gatein.wci.version>
<org.gatein.pc.version>2.3.0-GA</org.gatein.pc.version>
<org.picketlink.idm>1.3.1.CR01</org.picketlink.idm>
- <org.gatein.wsrp.version>2.1.0-EPP520-GA</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.1.1-CR01</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-GA</org.gatein.mop.version>
<org.gatein.mgmt.version>1.0.1-GA</org.gatein.mgmt.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2012-02-20 16:39:02 UTC (rev 8437)
@@ -184,6 +184,11 @@
</init-params>
</component>
+ <component>
+ <key>org.exoplatform.web.security.AuthenticationRegistry</key>
+ <type>org.exoplatform.web.security.AuthenticationRegistryImpl</type>
+ </component>
+
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
<component-plugin>
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/web.xml 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/web.xml 2012-02-20 16:39:02 UTC (rev 8437)
@@ -200,6 +200,9 @@
<listener>
<listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
</listener>
+ <listener>
+ <listener-class>org.exoplatform.web.security.AuthenticationRegistryListener</listener-class>
+ </listener>
<!-- ================================================================== -->
<!-- SERVLET -->
<!-- ================================================================== -->
Added: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/ConversationStateCredentialsAccessor.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/ConversationStateCredentialsAccessor.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/ConversationStateCredentialsAccessor.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.integration.wsrp.wss;
+
+import org.exoplatform.services.security.ConversationState;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.security.Credentials;
+import org.gatein.wsrp.wss.credentials.CredentialsAccessor;
+
+/**
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public class ConversationStateCredentialsAccessor implements CredentialsAccessor
+{
+
+ private static final Logger log = LoggerFactory.getLogger(ConversationStateCredentialsAccessor.class);
+
+ /**
+ * Reading credentials from @{link ConversationState} of current user.
+ *
+ * @return credentials
+ */
+ @Override
+ public Credentials getCredentials()
+ {
+ if (ConversationState.getCurrent() == null)
+ {
+ log.warn("Cannot find Credentials because ConversationState not set.");
+ return null;
+ }
+ return (Credentials)ConversationState.getCurrent().getAttribute(Credentials.CREDENTIALS);
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java 2012-02-20 16:39:02 UTC (rev 8437)
@@ -23,6 +23,7 @@
package org.gatein.integration.wsrp.wss;
import org.gatein.wsrp.wss.WebServiceSecurityFactory;
+import org.gatein.wsrp.wss.credentials.CredentialsAccessor;
import org.picocontainer.Startable;
import org.wsrp.wss.jboss5.handlers.consumer.JBWSSecurityHandlerWrapper;
import org.wsrp.wss.jboss5.handlers.consumer.WSSecurityCredentialHandler;
@@ -35,12 +36,13 @@
{
private final WebServiceSecurityFactory wssFactory;
- private final WSSecurityCredentialHandler WS_CREDENTIAL_HANDLER = new WSSecurityCredentialHandler();
+ private final WSSecurityCredentialHandler WS_CREDENTIAL_HANDLER;
private final JBWSSecurityHandlerWrapper JBWS_SECURITY_WRAPPER = new JBWSSecurityHandlerWrapper();
- public JBoss5WSSServiceIntegration()
+ public JBoss5WSSServiceIntegration(CredentialsAccessor credentialsAccessor)
{
wssFactory = WebServiceSecurityFactory.getInstance();
+ WS_CREDENTIAL_HANDLER = new WSSecurityCredentialHandler(credentialsAccessor);
}
public void start()
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5/src/main/application/lib/jboss5integration.jar/conf/configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5/src/main/application/lib/jboss5integration.jar/conf/configuration.xml 2012-02-20 13:23:45 UTC (rev 8436)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5/src/main/application/lib/jboss5integration.jar/conf/configuration.xml 2012-02-20 16:39:02 UTC (rev 8437)
@@ -28,6 +28,16 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
<component>
+ <key>org.gatein.wsrp.wss.credentials.CredentialsAccessor</key>
+
+ <!-- Reading credentials from HTTP session -->
+ <!--<type>org.gatein.wsrp.wss.credentials.HTTPSessionCredentialsAccessor</type>-->
+
+ <!-- Reading credentials from ConversationState -->
+ <type>org.gatein.integration.wsrp.wss.ConversationStateCredentialsAccessor</type>
+ </component>
+
+ <component>
<type>org.gatein.integration.wsrp.wss.JBoss5WSSServiceIntegration</type>
</component>
12 years, 10 months
gatein SVN: r8436 - epp/portal/branches/EPP_5_2_Branch.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-20 08:23:45 -0500 (Mon, 20 Feb 2012)
New Revision: 8436
Modified:
epp/portal/branches/EPP_5_2_Branch/pom.xml
Log:
Bug 793956 ( JBEPP-1027 ) , Bug 793956 ( JBEPP-1195 ) , Bug 793909 ( JBEPP-980 ) - Update Picketlink IDM to cover latest fixes into EPP.
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2012-02-20 13:12:15 UTC (rev 8435)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2012-02-20 13:23:45 UTC (rev 8436)
@@ -52,7 +52,7 @@
<org.gatein.dep.version>1.1.0-GA</org.gatein.dep.version>
<org.gatein.wci.version>2.1.0-GA</org.gatein.wci.version>
<org.gatein.pc.version>2.3.0-GA</org.gatein.pc.version>
- <org.picketlink.idm>1.3.0.GA</org.picketlink.idm>
+ <org.picketlink.idm>1.3.1.CR01</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-EPP520-GA</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-GA</org.gatein.mop.version>
<org.gatein.mgmt.version>1.0.1-GA</org.gatein.mgmt.version>
12 years, 10 months
gatein SVN: r8435 - epp/portal/branches/EPP_5_2_Branch/distribution.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-20 08:12:15 -0500 (Mon, 20 Feb 2012)
New Revision: 8435
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
Log:
Bug 793838 ( JBEPP-912 ) SSO component update
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2012-02-20 09:49:40 UTC (rev 8434)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2012-02-20 13:12:15 UTC (rev 8435)
@@ -19,7 +19,7 @@
<epp.dir>jboss-epp-5.2</epp.dir>
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
- <sso.version>1.1.0-GA</sso.version>
+ <sso.version>1.1.1-CR01</sso.version>
<portletbridge.version>2.2.0.GA.EPP520</portletbridge.version>
<org.jboss.eppsp.version>${project.version}</org.jboss.eppsp.version>
12 years, 10 months
gatein SVN: r8434 - portal/trunk.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-20 04:49:40 -0500 (Mon, 20 Feb 2012)
New Revision: 8434
Modified:
portal/trunk/pom.xml
Log:
GTNPORTAL-2354 Upgrade Picketlink IDM from 1.3.0.GA to 1.3.1.CR01
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2012-02-20 02:50:08 UTC (rev 8433)
+++ portal/trunk/pom.xml 2012-02-20 09:49:40 UTC (rev 8434)
@@ -46,7 +46,7 @@
<org.gatein.common.version>2.0.4-GA</org.gatein.common.version>
<org.gatein.wci.version>2.1.1-Beta03</org.gatein.wci.version>
<org.gatein.pc.version>2.3.1-Beta02</org.gatein.pc.version>
- <org.picketlink.idm>1.3.0.GA</org.picketlink.idm>
+ <org.picketlink.idm>1.3.1.CR01</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.1-CR01</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.1-GA</org.gatein.mop.version>
<org.gatein.mgmt.version>1.0.1-GA</org.gatein.mgmt.version>
12 years, 10 months
gatein SVN: r8433 - in epp/docs/branches/5.2/Installation_Guide: en-US and 1 other directory.
by do-not-reply@jboss.org
Author: jaredmorgs
Date: 2012-02-19 21:50:08 -0500 (Sun, 19 Feb 2012)
New Revision: 8433
Modified:
epp/docs/branches/5.2/Installation_Guide/en-US/Author_Group.xml
epp/docs/branches/5.2/Installation_Guide/en-US/Book_Info.xml
epp/docs/branches/5.2/Installation_Guide/en-US/DatabaseConfiguration.xml
epp/docs/branches/5.2/Installation_Guide/en-US/Installation_Guide.xml
epp/docs/branches/5.2/Installation_Guide/en-US/Revision_History.xml
epp/docs/branches/5.2/Installation_Guide/en-US/Test_Your_Installation.xml
epp/docs/branches/5.2/Installation_Guide/publican.cfg
Log:
https://bugzilla.redhat.com/show_bug.cgi?id=794386 - Heavily reworked the Database Configuration section to note the requirement for separate IDM and JCR databases
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/Author_Group.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/Author_Group.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/Author_Group.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,50 +1,44 @@
-<?xml version='1.0' encoding='utf-8' ?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
%BOOK_ENTITIES;
-<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
+
%BOOK_ENTITIES;
]>
<authorgroup>
- <editor>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <affiliation>
- <shortaffil>Red Hat</shortaffil>
- <orgdiv>Engineering Content Services</orgdiv>
- </affiliation>
- </editor>
- <editor>
- <firstname>Luc</firstname>
- <surname>Texier</surname>
- <affiliation>
- <shortaffil>Red Hat</shortaffil>
- <orgdiv>JBoss Engineering</orgdiv>
- </affiliation>
- </editor>
- <editor>
- <firstname>Thomas</firstname>
- <surname>Heute</surname>
- <affiliation>
- <shortaffil>Red Hat</shortaffil>
- <orgdiv>JBoss Engineering</orgdiv>
- </affiliation>
- </editor>
- <editor>
- <firstname>Ben</firstname>
- <surname>Clare</surname>
- <affiliation>
- <shortaffil>Red Hat</shortaffil>
- <orgdiv>Engineering Content Services</orgdiv>
- </affiliation>
- </editor>
- <othercredit>
- <affiliation>
- <orgname><emphasis role="bold"><ulink type="http" url="http://www.jboss.org/gatein/">GateIn</ulink></emphasis> and <emphasis role="bold"><ulink type="http" url="http://www.exoplatform.com">eXo Platform</ulink></emphasis></orgname>
- <orgdiv>Documentation Teams</orgdiv>
- </affiliation>
- <contrib>Original product documentation by:</contrib>
- </othercredit>
+ <editor>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <affiliation>
+ <shortaffil>Red Hat</shortaffil>
+ <orgdiv>Engineering Content Services</orgdiv>
+ </affiliation>
+ </editor>
+ <editor>
+ <firstname>Luc</firstname>
+ <surname>Texier</surname>
+ <affiliation>
+ <shortaffil>Red Hat</shortaffil>
+ <orgdiv>JBoss Engineering</orgdiv>
+ </affiliation>
+ </editor>
+ <editor>
+ <firstname>Thomas</firstname>
+ <surname>Heute</surname>
+ <affiliation>
+ <shortaffil>Red Hat</shortaffil>
+ <orgdiv>JBoss Engineering</orgdiv>
+ </affiliation>
+ </editor>
+ <othercredit>
+ <affiliation>
+ <orgname><emphasis role="bold">
+ <ulink url="http://www.jboss.org/gatein/" type="http">GateIn</ulink>
+ </emphasis> and <emphasis role="bold">
+ <ulink url="http://www.exoplatform.com" type="http">eXo Platform</ulink>
+ </emphasis></orgname>
+ <orgdiv>Documentation Teams</orgdiv>
+ </affiliation>
+ <contrib>Original product documentation by:</contrib>
+ </othercredit>
</authorgroup>
-
-
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/Book_Info.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/Book_Info.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,36 +1,31 @@
-<?xml version='1.0' encoding='utf-8' ?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
%BOOK_ENTITIES;
]>
<bookinfo id="book-Install_Guide-Install_Guide">
- <title>Installation Guide</title>
- <subtitle>An Installation Guide for JBoss Enterprise Portal Platform &VZ;</subtitle>
- <productname>JBoss Enterprise Portal Platform</productname>
- <productnumber>5.2</productnumber>
- <edition>5.2.0</edition>
- <pubsnumber>100</pubsnumber>
- <abstract>
- <para>
- This book provides information about obtaining, installing and running JBoss Enterprise Portal Platform. It forms part of the complete document suite along with the <emphasis role="bold">User Guide</emphasis> and <emphasis role="bold">Reference Guide</emphasis> available at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/index...." />.
+ <title>Installation Guide</title>
+ <subtitle>An Installation Guide for JBoss Enterprise Portal Platform &VZ;</subtitle>
+ <productname>JBoss Enterprise Portal Platform</productname>
+ <productnumber>5.2</productnumber>
+ <edition>5.2.1</edition>
+ <pubsnumber>1</pubsnumber>
+ <abstract>
+ <para>
+ This book provides information about obtaining, installing and running JBoss Enterprise Portal Platform. It forms part of the complete document suite along with the <emphasis role="bold">User Guide</emphasis> and <emphasis role="bold">Reference Guide</emphasis> available at <ulink url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/index...." type="http"/>.
</para>
- </abstract>
- <corpauthor>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG" />
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
-
-<!--FOR PUBLICAN -->
-<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Legal_Notice.xml">
-<!--FOR JDOCBOOK:-->
- <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="fallback_content/Legal_Notice.xml"
- xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- </xi:fallback>
-</xi:include>
- <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </abstract>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+<!--FOR PUBLICAN --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Legal_Notice.xml">
+ <!--FOR JDOCBOOK:--> <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fallback_content/Legal_Notice.xml"/>
+ </xi:fallback>
+ </xi:include>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Author_Group.xml"/>
</bookinfo>
-
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/DatabaseConfiguration.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/DatabaseConfiguration.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/DatabaseConfiguration.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,130 +1,210 @@
-<?xml version='1.0'?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Database_Configuration">
- <title>Database Configuration</title>
- <indexterm>
- <primary>Configuration</primary>
- <secondary>Database</secondary>
- </indexterm>
- <indexterm>
- <primary>Database</primary>
- <secondary>Configuration</secondary>
- </indexterm>
- <section id="sect-Reference_Guide-Database_Configuration-Overview">
- <title>Overview</title>
-
- <para>
- A Java Database Connectivity (JDBC) connector/driver is required for JBoss Enterprise Portal Platform to communicate with a relational database management system (RDBMS). JBoss Enterprise Portal Platform comes bundled with the Hypersonic SQL (HSQL) database in order for users to get up and running quickly without having to initially set up a database and the server. However, HSQL should not be used in a production environment and Red Hat does not offer ANY support for it. Therefore we recommend to setup a RDBMS and JBoss Enterprise Portal Platform connect to it as follows:
- </para>
-
- <para>JBoss Enterprise Portal Platform has two different database dependencies. One is the
- identity service configuration, which depends on Hibernate. The other
- database dependency is the Java Content Repository (JCR) service, which
- depends on the native JDBC API. JCR has the capability to integrate with
- any existing datasource implementation.</para>
-
- <para>When you start the portal for the first time,
- it will automatically create the proper schema (assuming that the
- database user has the appropriate permissions).</para>
-
- <note><para>JBoss Enterprise Portal Platform assumes the default encoding for your database is
- <literal>latin1</literal>.</para></note>
- </section>
-
- <section id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
- <title>Configuring the database datasource for JCR</title>
-
- <para>To configure the database datasource used by JCR you will need to edit the
- datasource descriptor located at
- <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein-ds.xml</filename>:
-<programlisting language="XML" role="XML">
-<local-tx-datasource>
- <jndi-name>gatein-jcr</jndi-name>
- <connection-url>
- jdbc:hsqldb:${jboss.server.data.dir}${/}gatein${/}hypersonic${/}gatein-jcr-localDB
- </connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
-
- <min-pool-size>5</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <idle-timeout-minutes>0</idle-timeout-minutes>
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
-</local-tx-datasource>
-</programlisting>
-</para>
-
- <para>Edit the values of driver-class, connection-url, user-name and
- password to match the specific values for your database (Please refer to your database
- JDBC driver documentation for more information about these attributes).</para>
-
- <para>In the case of HSQL, the databases are created automatically. For any
- other database you will need to firstly create the database.</para>
-
- <para>Make sure the user has rights to create tables on the database and
- to update them as, during the first start up, they will be automatically
- created.</para>
-
- <para>Add the JDBC driver to the classpath, by copying the relevant
- JAR file to the <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/lib</filename> directory.</para>
-
-
- </section>
-
- <section>
- <title>Configuring the database datasource for the default identity store</title>
-
- <para>To configure the database datasource used by IDM you will need to edit the
- datasource descriptor located at <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein-ds.xml</filename>:
-
-<programlisting language="XML" role="XML">
-<no-tx-datasource>
- <jndi-name>gatein-idm</jndi-name>
- <connection-url>
- jdbc:hsqldb:${jboss.server.data.dir}${/}gatein${/}hypersonic${/}gatein-idm-localDB
- </connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
-
- <min-pool-size>5</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <idle-timeout-minutes>0</idle-timeout-minutes>
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
-</no-tx-datasource>
-</programlisting>
- </para>
-
- <para>More information about setting up datasources can be found in the Enterprise Application Platform documentation.</para>
-
- <warning>
- <title>Using Sybase</title>
- <para>Sybase requires a particular configuration of JBoss Enterprise Portal Platform, to switch on that configuration, it is
- mandatory to run the portal with the extra <literal>sybase</literal> profile. This would
- mean to run the application server with <literal>sh run.sh -Dexo.profiles=sybase</literal> in a single node
- and <literal>sh run.sh -Dexo.profiles=sybase,cluster</literal> for a cluster node.</para>
- </warning>
-
- <warning>
- <title>Do not delete <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/data</filename></title>
- <para>
+ <title><remark>BZ#794386 </remark>Database Configuration</title>
+ <para><remark>20120220 - Reworked section to make procedures task-based, and reordered info to be more logical. </remark>A JDBC connector is required for JBoss Enterprise Portal Platform to communicate with a relational database management system (RDBMS). </para>
+ <para>JBoss Enterprise Portal Platform ships with the Hypersonic SQL (HSQLDB) database, which allows users to set up a database quickly for testing purposes. </para>
+ <para>HSQLDB must not be used in a production environment because it does not scale effectively, and does not support clustering. It is therefore not a supported database configuration. You must install and configure a supported RDBMS for JBoss Enterprise Portal Platform.
+ </para>
+ <para>JBoss Enterprise Portal Platform has two different production RDBMS dependencies: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Java Content Repository (JCR) service, which depends on the native JDBC API. JCR has the capability to integrate with
+ any existing datasource implementation</para>
+ </listitem>
+ <listitem>
+ <para>Identity Management (IDM) service, which depends on JBoss Hibernate.</para>
+ </listitem>
+ </itemizedlist>
+ <warning>
+ <title>Warning: Separate JCR and IDM Databases</title>
+ <para>You must create a separate database for both the JCR and IDM services. If you do not create a separate database for each service, database table conflicts will occur and JBoss Enterprise Portal Platform will not start.</para>
+ </warning>
+ <warning>
+ <title>Warning: Do not delete <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/data</filename></title>
+ <para>
The JCR can store information both in a database and on the file system depending on the configuration of the value storage. Refer to the JBoss Enterprise Portal Platform Reference Guide for more information.
</para>
- <para>
+ <para>
By default, the portal will store information required to run the portal in <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/data/gatein/jcr/values/</filename>.
</para>
- <para>
+ <para>
You can change this directory location by editing the <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/conf/gatein/configuration.properties</filename> file, the name of the property being: <literal>gatein.jcr.storage.data.dir</literal></para>
- </warning>
+ </warning>
+ <para>In the case of HSQLDB, databases are created automatically. For production databases, you must first install the database and create a default user so the platform can create the correct database schema when it is first started.</para>
+ <task id="task-Create_Production_Database">
+ <title><remark>BZ#794386</remark>Task: Provision JCR and IDM Production Databases</title>
+ <tasksummary>
+ <para>Read and understand the guideline steps in this task to prepare a JCR production database for JBoss Enterprise Portal Platform.</para>
+ </tasksummary>
+ <taskprerequisites>
+ <title>Prerequisites</title>
+ <itemizedlist>
+ <listitem>
+ <para>JBoss Enterprise Portal Platform installed, in its default state.</para>
+ </listitem>
+ <listitem>
+ <para>A JDBC-compliant database installer, from the list of certified databases described at <ulink url="http://www.redhat.com/resourcelibrary/articles/jboss-enterprise-applicati...">the Red Hat Resource Library for JBoss Enterprise Portal Platform</ulink></para>
+ </listitem>
+ <listitem>
+ <para>A JDBC connector, which is compatible with the selected JDBC-compliant production database.</para>
+ </listitem>
+ </itemizedlist>
+ </taskprerequisites>
+ <procedure>
+ <step>
+ <para>Install the chosen production database, according to the database installation instructions.</para>
+ </step>
+ <step>
+ <para>Copy the JDBC driver file (the .jar file) to the <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/lib</filename> directory. This adds the driver to the classpath.</para>
+ </step>
+ <step>
+ <para>Create a database that the JCR service will use exclusively.</para>
+ </step>
+ <step>
+ <para>Create another database that the IDM service will use exclusively.</para>
+ </step>
+ <step>
+ <para>Create a database user that has access to both databases, with the following minimum permissions:</para>
+ <itemizedlist>
+ <listitem>
+ <para>create tables</para>
+ </listitem>
+ <listitem>
+ <para>update tables.</para>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <para>In subsequent procedures, the user you create is specified in configuration files and is used as part of the first run schema configuration process. Make note of the user name and password now to make subsequent configuration easier to complete.</para>
+ </note>
+ </step>
+ </procedure>
+ </task>
+ <para>Now you have installed the database and created a user, you can set the JCR and IDM directives in the configuration files as described in <xref linkend="task-Configure_JCR_Database_Datasource"/> and <xref linkend="task-Configure_IDM_Database_Datasource"/>.</para>
+ <task id="task-Configure_JCR_Database_Datasource">
+ <title><remark>BZ#794386</remark>Task: Configure the JCR Database Datasource</title>
+ <tasksummary>
+ <para>Complete this task to configure the JCR datasource descriptor.</para>
+ </tasksummary>
+ <taskprerequisites>
+ <title>Prerequisites</title>
+ <itemizedlist>
+ <listitem>
+ <para>Complete <xref linkend="task-Create_Production_Database"/></para>
+ </listitem>
+ </itemizedlist>
+ </taskprerequisites>
+ <procedure>
+ <step>
+ <para>Open <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein-ds.xml</filename> in a text editor.</para>
+ </step>
+ <step>
+ <para>Locate the <jndi-name>gatein-jcr</jndi-name> directives that affect JCR datasource descriptors: </para>
+ <itemizedlist>
+ <listitem>
+ <para><connection-url></para>
+ </listitem>
+ <listitem>
+ <para><driver-class></para>
+ </listitem>
+ <listitem>
+ <para><user-name></para>
+ </listitem>
+ <listitem>
+ <para><password></para>
+ </listitem>
+ </itemizedlist>
+ </step>
+ <step>
+ <para>Change the <connection-url> and <driver-class> directive values to match those specified in the JDBC documentation for your chosen production database.</para>
+ <important>
+ <para>Ensure you specify the JCR-specific database in the <connection-url>.</para>
+ </important>
+ </step>
+ <step>
+ <para>Change the <user-name> and <password> directive values to the default user created in <xref linkend="task-Create_Production_Database"/>. </para>
+ <important>
+ <para>The password you specify in <password> is in plain text, and anyone with access to the server can discover the password. Consider encrypting this password.</para>
+ </important>
+ </step>
+ <step>
+ <formalpara>
+ <title>Result</title>
+ <para>You have provided the key information in the <filename>gatein-ds.xml</filename> directives, and the JCR datasource is ready for production use.</para>
+ </formalpara>
+ </step>
+ </procedure>
+ </task>
+ <task id="task-Configure_IDM_Database_Datasource">
+ <title><remark>BZ#794386</remark>Task: Configure the IDM Database Datasource</title>
+ <tasksummary>
+ <para>Complete this task to configure the IDM datasource descriptor.</para>
+ </tasksummary>
+ <taskprerequisites>
+ <title>Prerequisites</title>
+ <itemizedlist>
+ <listitem>
+ <para>Complete <xref linkend="task-Configure_JCR_Database_Datasource"/></para>
+ </listitem>
+ </itemizedlist>
+ </taskprerequisites>
+ <procedure>
+ <step>
+ <para>Open <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein-ds.xml</filename> in a text editor.</para>
+ </step>
+ <step>
+ <para>Locate the <jndi-name>gatein-idm</jndi-name> directives that affect JCR datasource descriptors: </para>
+ <itemizedlist>
+ <listitem>
+ <para><connection-url></para>
+ </listitem>
+ <listitem>
+ <para><driver-class></para>
+ </listitem>
+ <listitem>
+ <para><user-name></para>
+ </listitem>
+ <listitem>
+ <para><password></para>
+ </listitem>
+ </itemizedlist>
+ </step>
+ <step>
+ <para>Change the <connection-url> and <driver-class> directive values to match those specified in the JDBC documentation for your chosen production database.</para>
+ <important>
+ <para>Ensure you specify the IDM-specific database in the <connection-url>.</para>
+ </important>
+ </step>
+ <step>
+ <para>Change the <user-name> and <password> directive values to the default user created in <xref linkend="task-Create_Production_Database"/>. </para>
+ <important>
+ <para>The password you specify in <password> is in plain text, and anyone with access to the server can discover the password. Consider encrypting this password using a keypair.</para>
+ </important>
+ </step>
+ <step>
+ <formalpara>
+ <title>Result</title>
+ <para>You have provided the key information in the <filename>gatein-ds.xml</filename> directives, and the IDM datasource is ready for production use.</para>
+ </formalpara>
+ </step>
+ </procedure>
+ </task>
+ <para>More information about setting up datasources can be found in the JBoss Enterprise Application Platform <citetitle>Getting Started Guide</citetitle>, in the <citetitle>Using Other Databases</citetitle> chapter. </para>
+ <section>
+ <title>First-run Database Schema Creation</title>
+ <para>When you start JBoss Enterprise Portal Platform for the first time,
+ it will create the proper database schema based on the database configuration you specified in <xref linkend="sect-Reference_Guide-Database_Configuration"/>.</para>
+ <note>
+ <para>JBoss Enterprise Portal Platform assumes the default encoding for your database is
+ <literal>latin1</literal>.</para>
+ </note>
+ <para>Before starting the server for the first time, continue to <xref linkend="sect-Reference_Guide-EMail_Service_Configuration"/> for the next mandatory configuration requirement.</para>
</section>
-
<section>
<title>Example with MySQL Server 5.1</title>
-
<indexterm>
<primary>Configuration</primary>
<secondary>MySQL</secondary>
@@ -141,63 +221,63 @@
<para>The MySQL JDBC connector is required for EPP to use a <application>MySQL</application> database:</para>
</formalpara>
<para>
- The <literal>mysql-java-connector</literal> package is available through <ulink type="http" url="https://www.redhat.com/wapps/sso/rhn/login.html?redirect=http%3A%2F%2Frhn...">Red Hat Network</ulink>. This is the recommended installation method.
+ The <literal>mysql-java-connector</literal> package is available through <ulink url="https://www.redhat.com/wapps/sso/rhn/login.html?redirect=http%3A%2F%2Frhn..." type="http">Red Hat Network</ulink>. This is the recommended installation method.
</para>
<para>
- For users who are not able to access the Red Hat Network, <application>MySQL</application> is available directly from <ulink type="http" url="http://www.mysql.com/downloads/connector/j/">http://www.mysql.com</ulink>. You should download a version listed in the Certified Configurations table available on the <ulink url="http://www.jboss.com/products/platforms/portals/testedconfigurations/">JBoss Enterprise Portal Platform</ulink> JBoss website.
+ For users who are not able to access the Red Hat Network, <application>MySQL</application> is available directly from <ulink url="http://www.mysql.com/downloads/connector/j/" type="http">http://www.mysql.com</ulink>. You should download a version listed in the Certified Configurations table available on the <ulink url="http://www.jboss.com/products/platforms/portals/testedconfigurations/">JBoss Enterprise Portal Platform</ulink> JBoss website.
</para>
-
- <formalpara id="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database">
- <title>Creating a MySQL Database</title>
- <para>
+ <formalpara id="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database">
+ <title>Creating a MySQL Database</title>
+ <para>
If you have just installed MySQL, make sure the MySQL server is running, and then run the following command to set the root user password:
</para>
- </formalpara>
- <para>
+ </formalpara>
+ <para>
<screen>
-mysqladmin -u root password '<replaceable>new-root-user-password</replaceable>'
+mysqladmin -u root password '<replaceable>new-root-user-password</replaceable>'
</screen>
</para>
- <orderedlist>
- <listitem>
- <para>
+ <orderedlist>
+ <listitem>
+ <para>
Run the following command to log in to MySQL. Enter the root user password when prompted:
</para>
- <para>
+ <para>
<screen>
mysql -u root -p
</screen>
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
Use the <command>CREATE DATABASE</command> command to create a new gateinjcr database.
</para>
- <note><title>Note: Database names</title>
- <para>
+ <note>
+ <title>Note: Database names</title>
+ <para>
The remainder of this guide, and the configuration examples that follow assume the database names to be gateinjcr and gateinidm. If you change the database names, please update <filename>gatein-ds.xml</filename> accordingly (for each server configuration used).
</para>
- </note>
- <para>
+ </note>
+ <para>
<screen>
mysql> CREATE DATABASE gateinjcr;
</screen>
</para>
- <para>
+ <para>
The output should be similar to the following:
</para>
-<screen>
+ <screen>
Query OK, 1 row affected (0.00 sec)
</screen>
- <para>
+ <para>
Then repeat with:
</para>
-<screen>mysql> CREATE DATABASE gateinidm;
+ <screen>mysql> CREATE DATABASE gateinidm;
</screen>
- <para>
+ <para>
At this point, the <command>SHOW DATABASES;</command> command should display the <command>gatein</command> databases:
</para>
- <para>
+ <para>
<screen>
mysql> SHOW DATABASES;
+--------------------+
@@ -211,28 +291,28 @@
4 rows in set (0.00 sec)
</screen>
</para>
- <para>
+ <para>
It is safe to ignore the other databases.
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
Add a new user and give that user access to the gatein databases. The following example adds a new user named <computeroutput>gateinuser</computeroutput>, with the password <computeroutput>gateinpassword</computeroutput>. It is recommended that you choose a different password to the one supplied here by changing <replaceable>gateinpassword</replaceable> to some other password:
</para>
- <screen>CREATE USER 'gateinuser'@'localhost' IDENTIFIED BY 'gateinpassword';</screen>
- </listitem>
- <listitem>
- <para>
+ <screen>CREATE USER 'gateinuser'@'localhost' IDENTIFIED BY 'gateinpassword';</screen>
+ </listitem>
+ <listitem>
+ <para>
Grant the necessary privileges to the user:
</para>
- <para>
+ <para>
<screen>
-mysql> GRANT ALL PRIVILEGES ON gateinjcr.* TO '<replaceable>gateinuser</replaceable>'@'localhost'
-IDENTIFIED BY '<replaceable>gateinpassword</replaceable>' WITH GRANT OPTION;
+mysql> GRANT ALL PRIVILEGES ON gateinjcr.* TO '<replaceable>gateinuser</replaceable>'@'localhost'
+IDENTIFIED BY '<replaceable>gateinpassword</replaceable>' WITH GRANT OPTION;
</screen>
<screen>
-mysql> GRANT ALL PRIVILEGES ON gateinidm.* TO '<replaceable>gateinuser</replaceable>'@'localhost'
-IDENTIFIED BY '<replaceable>gateinpassword</replaceable>' WITH GRANT OPTION;
+mysql> GRANT ALL PRIVILEGES ON gateinidm.* TO '<replaceable>gateinuser</replaceable>'@'localhost'
+IDENTIFIED BY '<replaceable>gateinpassword</replaceable>' WITH GRANT OPTION;
</screen>
</para>
<!--
@@ -241,74 +321,71 @@
If you changed the portal user's password, remember to also change the password in the MySQL Datasource descriptor.
</para>
</note>
--->
- </listitem>
- </orderedlist>
-
- <formalpara id="form-Portal_EAP-Using_a_MySQL_Database-MySQL_Datasource_Descriptor">
- <title>MySQL Datasource Descriptor</title>
- <para>
+--> </listitem>
+ </orderedlist>
+ <formalpara id="form-Portal_EAP-Using_a_MySQL_Database-MySQL_Datasource_Descriptor">
+ <title>MySQL Datasource Descriptor</title>
+ <para>
You now need to change the portal database descriptor
</para>
- </formalpara>
- <orderedlist>
- <listitem>
- <para>
+ </formalpara>
+ <orderedlist>
+ <listitem>
+ <para>
Edit the file located at <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein-ds.xml</filename>.
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
Update the following lines in the Datasource descriptor to reflect the correct database, username and password respectively:
<itemizedlist>
- <listitem>
- <para>
+ <listitem>
+ <para>
<computeroutput><connection-url>jdbc:mysql://mysql-hostname:3306/<replaceable>DATABASE</replaceable></connection-url></computeroutput>;
<itemizedlist>
- <listitem>
- <para>
+ <listitem>
+ <para>
In this example the database name is <literal>gateinjcr</literal> for the first datasource listed in <filename>gatein-ds.xml</filename>.
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
The database name for the second datasource is <literal>gateinidm</literal>. See the example <filename>gatein-ds.xml</filename> file provided.
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
<computeroutput><user-name><replaceable>USER-NAME</replaceable></user-name></computeroutput>;
<itemizedlist>
- <listitem>
- <para>
+ <listitem>
+ <para>
The user-name for this example is <literal>gateinuser</literal>.
</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<computeroutput><password><replaceable>PASSWORD</replaceable></password></computeroutput>;
<itemizedlist>
- <listitem>
- <para>
- This example uses the <literal>gateinpassword</literal> password. Enter this or the password chosen at <xref linkend="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database"></xref>.
+ <listitem>
+ <para>
+ This example uses the <literal>gateinpassword</literal> password. Enter this or the password chosen at <xref linkend="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database"/>.
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- </orderedlist>
-
- <para><filename>gatein-ds.xml</filename> will then look like:</para>
-<programlisting language="XML" role="XML"><![CDATA[<datasources>
+ </listitem>
+ </orderedlist>
+ <para><filename>gatein-ds.xml</filename> will then look like:</para>
+ <programlisting language="XML" role="XML"><![CDATA[<datasources>
<no-tx-datasource>
<jndi-name>gatein-idm</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/gateinidm</connection-url>
@@ -336,14 +413,11 @@
</local-tx-datasource>
</datasources>]]>
</programlisting>
-
- <important>
- <title>Important</title>
- <para>
+ <important>
+ <title>Important</title>
+ <para>
Some underlying JBoss Enterprise Application Platform services might still be using Hypersonic which is an in-VM database server loaded in the same memory space. To connect these services to another RDBMS or disable them please refer to the EAP documentation or simply contact JBoss Support for assistance.
</para>
- </important>
-
-
+ </important>
</section>
</section>
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/Installation_Guide.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/Installation_Guide.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/Installation_Guide.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,19 +1,18 @@
-<?xml version='1.0' encoding='utf-8' ?>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
]>
-<book>
- <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Getting_Started.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Installation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Post_Installation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Add-ons.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Test_Your_Installation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Uninstall_JBoss.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <index />
+<book status="draft">
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Info.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Preface.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Introduction.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Getting_Started.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Installation.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Post_Installation.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configuration.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add-ons.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Test_Your_Installation.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Uninstall_JBoss.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Revision_History.xml"/>
</book>
-
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/Revision_History.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/Revision_History.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,85 +1,99 @@
-<?xml version='1.0' encoding='utf-8' ?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
%BOOK_ENTITIES;
]>
<appendix id="appe-Release_Notes-Revision_History">
- <title>Revision History</title>
- <simpara>
- <revhistory>
- <revision>
- <revnumber>5.2.0-100</revnumber>
- <date>Wed Dec 14 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Publication build.</member>
- </simplelist>
- </revdescription>
- </revision>
- <revision>
- <revnumber>5.2.0-4</revnumber>
- <date>Tue Dec 13 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>JBEPP-1431: Actioning QA feedback.</member>
- </simplelist>
- </revdescription>
- </revision>
- <revision>
- <revnumber>5.2.0-3</revnumber>
- <date>Tue Nov 15 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Corrected JMX/HTTP Invoker filepaths.</member>
- <member>Updated references to no-tx-datasource (local-tx-datasource used in 5.2)</member>
- <member>Updated <filename>configuration.properties</filename> snippet.</member>
- </simplelist>
- </revdescription>
- </revision>
- <revision>
- <revnumber>5.2.0-2</revnumber>
- <date>Fri Oct 21 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Push to staging server.</member>
- </simplelist>
- </revdescription>
- </revision>
- <revision>
- <revnumber>5.2.0-1</revnumber>
- <date>Mon Aug 29 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Updating version and resetting pubs/ed numbers.</member>
- </simplelist>
- </revdescription>
- </revision>
- </revhistory>
- </simpara>
-</appendix>
\ No newline at end of file
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>5.2.1-1</revnumber>
+ <date>Mon Feb 20 2012</date>
+ <author>
+ <firstname>Jared</firstname>
+ <surname>Morgan</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Incorporated changes to https://bugzilla.redhat.com/show_bug.cgi?id=794386.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-100</revnumber>
+ <date>Wed Dec 14 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Publication build.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-4</revnumber>
+ <date>Tue Dec 13 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>JBEPP-1431: Actioning QA feedback.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-3</revnumber>
+ <date>Tue Nov 15 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Corrected JMX/HTTP Invoker filepaths.</member>
+ <member>Updated references to no-tx-datasource (local-tx-datasource used in 5.2)</member>
+ <member>Updated <filename>configuration.properties</filename> snippet.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-2</revnumber>
+ <date>Fri Oct 21 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Push to staging server.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-1</revnumber>
+ <date>Mon Aug 29 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Updating version and resetting pubs/ed numbers.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </simpara>
+</appendix>
Modified: epp/docs/branches/5.2/Installation_Guide/en-US/Test_Your_Installation.xml
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/en-US/Test_Your_Installation.xml 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/en-US/Test_Your_Installation.xml 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,41 +1,46 @@
-<?xml version='1.0'?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Installation_Guide.ent">
%BOOK_ENTITIES;
]>
-
<chapter id="Test_your_Installation">
- <title>Test your Installation</title>
-
- <para>
+ <title>Test your Installation</title>
+ <para>
After you have installed the JBoss Enterprise Portal Platform, it is wise to perform a simple start up test to validate that there are no major problems with your Java VM/operating system combination. Make sure you have set the <literal>JBOSS_HOME</literal> environment variables as explained in <xref linkend="Post_Installation_Configuration"/>.
</para>
- <para>
+ <warning>
+ <title>Warning: Sybase Requirements</title>
+ <para>Sybase requires a particular configuration of JBoss Enterprise Portal Platform, to switch on that configuration, it is
+ mandatory to run the portal with the extra <literal>sybase</literal> profile. This would
+ mean to run the application server with <literal>sh run.sh -Dexo.profiles=sybase</literal> in a single node
+ and <literal>sh run.sh -Dexo.profiles=sybase,cluster</literal> for a cluster node.</para>
+ </warning>
+ <para>
To test your installation:
<itemizedlist>
- <listitem>
- <para>
+ <listitem>
+ <para>
move to the <filename><replaceable>JBOSS_HOME</replaceable>/bin</filename> directory;
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
execute the <filename>run.bat</filename> (for Windows) or <filename>run.sh</filename> (for Linux) script, as appropriate for your operating system;
<itemizedlist>
- <listitem>
- <para>
- Ensure that you run the configuration corresponding to the <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/</filename> chosen in <xref linkend="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database"></xref>
+ <listitem>
+ <para>
+ Ensure that you run the configuration corresponding to the <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/</filename> chosen in <xref linkend="form-Portal_EAP-Using_a_MySQL_Database-Creating_a_MySQL_Database"/>
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </itemizedlist>
</para>
- <para>
+ <para>
The example below uses the production configuration. Your output should look like the following (accounting for installation directory differences and version numbers) and should not contain any error or exception messages:
</para>
-<programlisting>
+ <programlisting>
[user@localhost bin]$ ./run.sh -c production
=========================================================================
@@ -65,37 +70,35 @@
...
23:27:32,061 INFO [JMXKernel] Legacy JMX core initialized
</programlisting>
- <note><title>Note: Production server log file</title>
- <para>
- There is no "Server Started" message shown at the console when the server is started using the <literal>production</literal> profile. This message may be observed in the <filename>server.log</filename> file located in the <filename><replaceable>JBOSS_HOME</replaceable>/server/production/log</filename> subdirectory.
+ <note>
+ <title>Note: Production server log file</title>
+ <para>
+ There is no "Server Started" message shown at the console when the server is started using the <literal>production</literal> profile. This message may be observed in the <filename>server.log</filename> file located in the <filename><replaceable>JBOSS_HOME</replaceable>/server/production/log</filename> subdirectory.
</para>
- </note>
-
- <para>
+ </note>
+ <para>
Ensure that port 8080 is not already in use and open <literal>http://localhost:8080/portal</literal> in your web browser.
<note>
- <para>
+ <para>
On some machines, the name localhost won’t resolve properly and you should use the local loopback address <uri>127.0.0.1</uri> instead.
</para>
- </note>
- The contents of your page should look similar to this: <xref linkend="Test_your_Installation-Test_your_Installation" />.
+ </note>
+ The contents of your page should look similar to this: <xref linkend="Test_your_Installation-Test_your_Installation"/>.
</para>
- <para>
+ <para>
<figure id="Test_your_Installation-Test_your_Installation">
- <title>Test your Installation</title>
- <mediaobject>
- <imageobject role="html">
- <imagedata fileref="images/test_install.png" format="PNG" align="center" scale="100" />
- </imageobject>
- <imageobject role="fo">
- <imagedata fileref="images/test_install.png" format="PNG" align="center" contentwidth="444px" />
- </imageobject>
- </mediaobject>
- </figure>
+ <title>Test your Installation</title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/test_install.png" format="PNG" align="center" scale="100"/>
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/test_install.png" format="PNG" align="center" contentwidth="444px"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</para>
- <para>
- You are now ready to use JBoss Enterprise Portal Platform. Refer to the User Guide and Reference Guide for more information about the product's feature set and example applications showcasing JBoss Enterprise Portal Platform in action.
+ <para>
+ You are now ready to use JBoss Enterprise Portal Platform. Refer to the User Guide and Reference Guide for more information about the product's feature set and example applications showcasing JBoss Enterprise Portal Platform in action.
</para>
-
</chapter>
-
Modified: epp/docs/branches/5.2/Installation_Guide/publican.cfg
===================================================================
--- epp/docs/branches/5.2/Installation_Guide/publican.cfg 2012-02-17 16:40:24 UTC (rev 8432)
+++ epp/docs/branches/5.2/Installation_Guide/publican.cfg 2012-02-20 02:50:08 UTC (rev 8433)
@@ -1,13 +1,6 @@
-# Config::Simple 4.59
-# Wed Nov 25 09:17:17 2009
-
-
xml_lang: en-US
type: Book
brand: JBoss
debug:1
-#show_remarks:1
-
-cvs_branch: DOCS-RHEL-6
-cvs_root: :ext:cvs.devel.redhat.com:/cvs/dist
-cvs_pkg: JBoss_Enterprise_Portal_Platform-Installation_Guide-5.2-web-__LANG__
\ No newline at end of file
+show_remarks:1
+git_branch: docs-rhel-6
12 years, 10 months
gatein SVN: r8432 - portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm.
by do-not-reply@jboss.org
Author: bdaw
Date: 2012-02-17 11:40:24 -0500 (Fri, 17 Feb 2012)
New Revision: 8432
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
Log:
GTNPORTAL-2353 Unable to remove DB users if LDAP store is not read-only
Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-17 16:05:56 UTC (rev 8431)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-17 16:40:24 UTC (rev 8432)
@@ -284,6 +284,23 @@
//TODO: impl force in IDM
getIdentitySession().getPersistenceManager().removeGroup(child, true);
}
+
+
+ // Obtain parents
+
+ Collection<org.picketlink.idm.api.Group> parents =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup, null, false, false);
+
+ // not possible to disassociate only one child...
+ Set dummySet = new HashSet();
+ dummySet.add(jbidGroup);
+
+ for (org.picketlink.idm.api.Group parent : parents)
+ {
+ getIdentitySession().getRelationshipManager().disassociateGroups(parent, dummySet);
+ }
+
+
}
catch (Exception e)
{
12 years, 10 months
gatein SVN: r8431 - portal/trunk/docs/reference-guide/en-US/modules/Configuration.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-02-17 11:05:56 -0500 (Fri, 17 Feb 2012)
New Revision: 8431
Modified:
portal/trunk/docs/reference-guide/en-US/modules/Configuration/ValidatorConfiguration.xml
Log:
- GTNPORTAL-1673: Added mention on the fact that some components require all lowercase usernames.
Modified: portal/trunk/docs/reference-guide/en-US/modules/Configuration/ValidatorConfiguration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en-US/modules/Configuration/ValidatorConfiguration.xml 2012-02-16 13:59:38 UTC (rev 8430)
+++ portal/trunk/docs/reference-guide/en-US/modules/Configuration/ValidatorConfiguration.xml 2012-02-17 16:05:56 UTC (rev 8431)
@@ -116,6 +116,13 @@
</itemizedlist>
</para>
</note>
+
+ <important>
+ <para>
+ Some components that leverage &PRODUCT_NAME; depend on user names being all lowercase. We therefore strongly
+ recommend that you also only accept lowercase user names.
+ </para>
+ </important>
</section>
<section id="sect-Reference_Guide-Validator_Developer-Configuration">
12 years, 10 months
gatein SVN: r8430 - components/sso/trunk/saml/gatein-saml-portal.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-16 08:59:38 -0500 (Thu, 16 Feb 2012)
New Revision: 8430
Modified:
components/sso/trunk/saml/gatein-saml-portal/pom.xml
Log:
GTNSSO-4 Renaming maven artifact to same pattern with others.
Modified: components/sso/trunk/saml/gatein-saml-portal/pom.xml
===================================================================
--- components/sso/trunk/saml/gatein-saml-portal/pom.xml 2012-02-16 09:32:31 UTC (rev 8429)
+++ components/sso/trunk/saml/gatein-saml-portal/pom.xml 2012-02-16 13:59:38 UTC (rev 8430)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.sso</groupId>
- <artifactId>gatein-saml-pkg</artifactId>
+ <artifactId>sso-saml-pkg</artifactId>
<packaging>pom</packaging>
<name>GateIn SSO - SAML - Portal packaging</name>
12 years, 10 months
gatein SVN: r8429 - in portal/trunk: web/portal/src/main/webapp/WEB-INF and 1 other directory.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-16 04:32:31 -0500 (Thu, 16 Feb 2012)
New Revision: 8429
Added:
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java
Modified:
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
Log:
GTNPORTAL-2275 Added AuthenticationRegistryListener to make sure that AuthenticationRegistry entry is cleared when session expire.
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java 2012-02-15 21:18:41 UTC (rev 8428)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistry.java 2012-02-16 09:32:31 UTC (rev 8429)
@@ -47,4 +47,7 @@
public Credentials removeCredentials(HttpServletRequest request);
+
+ public void removeClient(String sessionId);
+
}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java 2012-02-15 21:18:41 UTC (rev 8428)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryImpl.java 2012-02-16 09:32:31 UTC (rev 8429)
@@ -24,6 +24,8 @@
package org.exoplatform.web.security;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.security.Credentials;
import javax.servlet.http.HttpServletRequest;
@@ -39,7 +41,8 @@
*/
public class AuthenticationRegistryImpl implements AuthenticationRegistry
{
-
+ private static final Logger log = LoggerFactory.getLogger(AuthenticationRegistryImpl.class);
+
// Key is ID of HTTP Session. Value is map with various attributes of single client (session),
// which will be used during authentication process.
private final ConcurrentMap<String, Map<String, Object>> registry = new ConcurrentHashMap<String, Map<String, Object>>();
@@ -79,13 +82,24 @@
// Clear map if no more attributes are here.
if (attributesOfClient.size() == 0)
{
- registry.remove(sessionId);
+ removeClient(sessionId);
}
return credentials;
}
+ public void removeClient(String sessionId)
+ {
+ registry.remove(sessionId);
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("Entry cleared for session " + sessionId);
+ }
+ }
+
+
private Map<String, Object> getAttributesOfClient(String sessionId)
{
Map<String, Object> attributes = registry.get(sessionId);
@@ -94,6 +108,11 @@
{
attributes = new ConcurrentHashMap<String, Object>();
registry.putIfAbsent(sessionId, attributes);
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("New entry created in AuthenticationRegistry for session " + sessionId);
+ }
}
return registry.get(sessionId);
Added: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java (rev 0)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/AuthenticationRegistryListener.java 2012-02-16 09:32:31 UTC (rev 8429)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.web.security;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractHttpSessionListener;
+
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public class AuthenticationRegistryListener extends AbstractHttpSessionListener
+{
+
+ @Override
+ protected boolean requirePortalEnvironment()
+ {
+ return true;
+ }
+
+
+ @Override
+ protected void onSessionCreated(ExoContainer container, HttpSessionEvent event)
+ {
+ }
+
+
+ @Override
+ protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event)
+ {
+ AuthenticationRegistry authenticationRegistry = (AuthenticationRegistry)container.getComponentInstanceOfType(AuthenticationRegistry.class);
+ authenticationRegistry.removeClient(event.getSession().getId());
+ }
+}
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2012-02-15 21:18:41 UTC (rev 8428)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2012-02-16 09:32:31 UTC (rev 8429)
@@ -180,7 +180,10 @@
</listener>
<listener>
<listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
- </listener>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.web.security.AuthenticationRegistryListener</listener-class>
+ </listener>
<!-- ================================================================== -->
<!-- SERVLET -->
<!-- ================================================================== -->
12 years, 10 months