for use with Red Hat JBoss Portal 6.2 and its patch releases.
Legal Notice
Abstract
- Preface
- 1. Documentation Advice
- 2. Introduction
- 3. Platform Requirements
- 4. Download the Platform
- 5. Install the Platform
- 5.1. Install OpenJDK on Red Hat Enterprise Linux
- 5.2. Install Red Hat JBoss Portal
- 5.3. Install and Configure JBoss Operations Network Plug-in
- 5.4. Installation Structure and Details
- 5.5. Run as an Operating System Service
- 5.6. Start as a Standalone Server
- 5.7. Test the Installation
- 5.8. Uninstall Red Hat JBoss Portal (Zip Installation)
- 6. Common Configuration
- 7. Platform-specific Configuration
- 7.1. Configure the Portal Root Password
- 7.2. About JBoss Portal Domain Mode
- 7.3. Provision JCR and IDM Databases
- 7.4. JTA Support Configuration
- 7.5. Email Service Configuration
- 7.6. Email Notifications Configuration
- 7.7. Clustering Configuration
- 7.8. Setting mod_jk for Cluster Configuration
- 7.9. HTTPS Configuration
- 7.10. Enable HTTPS Communication
- 7.11. Specify White-list and Black-list Gadget Proxy Resources
- 7.12. Validator Configuration
- 7.13. Custom Password Policy
- 7.14. Password Encryption
- A. Revision History
1. Document Conventions
1.1. Typographic Conventions
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to a virtual terminal.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, select the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typessh username@domain.nameat a shell prompt. If the remote machine isexample.comand your username on that machine is john, typessh john@example.com.Themount -o remount file-systemcommand remounts the named file system. For example, to remount the/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -q packagecommand. It will return a result as follows:package-version-release.
Publican is a DocBook publishing system.
1.2. Pull-quote Conventions
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO "%s: device hasn't been assigned before, "
"so cannot be deassigned\n", __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(&kvm->lock);
return r;
}1.3. Notes and Warnings
Note
Important
Warning
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
- Search or browse through a knowledge base of technical support articles about Red Hat products.
- Submit a support case to Red Hat Global Support Services (GSS).
- Access other product documentation.
2.2. We Need Feedback
Chapter 1. Documentation Advice
1.1. Cross-product content disclaimer
Chapter 2. Introduction
2.1. Overview
2.2. New and Changed Features
Chapter 3. Platform Requirements
3.1. Java Requirements
3.2. Hardware Requirements
- Disk space: 1.5 GB
- This includes the 700 MB required for a base install, including JDK; 500 MB for the server log file (the default configuration for the log file); and 330 MB for deployed JBoss applications.
- CPU: 1 GHz Intel Pentium Processor
- Intel Core 2 Duo, Intel Core 2 Quad and Intel Xeon CPUs improve server performance for high demand applications.
- RAM: 1.5 GB
- This is the bare minimum required to run JBoss Portal.To deploy and run small to medium applications, 2 GB or more is required.4 GB or more is recommended to run larger applications, or to run a server managed via a Graphical User Interface (GUI).
3.3. Operational Requirements
- application size.
- application complexity.
- client numbers.
- client request frequency.
- log file size.
- post-installation server tuning and configuration.
Chapter 4. Download the Platform
4.1. About the Red Hat Customer Portal
- Manage and maintain Red Hat entitlements and support contracts.
- Download officially-supported software.
- Access product documentation and the Red Hat Knowledgebase.
- Contact Global Support Services.
- File bugs against Red Hat products.
4.2. Available Downloads
Table 4.1. Available Downloads
| Name | Description | Operating Systems |
|---|---|---|
| Documentation |
The documents are available at https://access.redhat.com/site/documentation/Red_Hat_JBoss_Portal/
|
Platform-independent
|
| Source Code |
The Java source code for JBoss Portal is provided.
|
Platform-independent
|
| Portal Platform |
The ZIP installation package which can be installed and run on every supported platform.
|
Platform-independent
|
| Quickstarts and wolf repo |
Both quickstarts and maven repository ZIP packages are provided and can be used on every supported platform.
|
Platform-independent
|
4.3. Download the Platform and Related Plug-ins
4.3.1. Download Red Hat JBoss Portal
- Load https://access.redhat.com in a web browser.
- Click the Downloads option, and then select Red Hat JBoss Portal from the alphabetical list.
- Select the latest released version from the Version field to display the available downloads
- Click the Download link next to the Red Hat JBoss Portal 6.2 item to begin the download.
- Repeat the previous step for any supplemental packages required (for example, the Quickstarts archive).
4.3.2. Download JBoss Operations Network Plug-in
Previous Step in Download the Platform and Related Plug-ins
- Load https://access.redhat.com in a web browser.
- Click the Downloads option, and then select Red Hat JBoss Operations Network from the alphabetical list.
- Select
JBoss ON for Portal Platformfrom the Product drop-down menu. - Select the latest version available from the Version field.
- Download the following files by clicking the link beside each item:
- Base Distribution
- Portal Platform Plug-in Pack
- All Patches applicable to the version you are downloading.Patches are applied to JBoss Operations Network after installing the base distribution and plug-in.
Chapter 5. Install the Platform
- 5.1. Install OpenJDK on Red Hat Enterprise Linux
- 5.2. Install Red Hat JBoss Portal
- 5.3. Install and Configure JBoss Operations Network Plug-in
- 5.4. Installation Structure and Details
- 5.5. Run as an Operating System Service
- 5.6. Start as a Standalone Server
- 5.7. Test the Installation
- 5.8. Uninstall Red Hat JBoss Portal (Zip Installation)
5.1. Install OpenJDK on Red Hat Enterprise Linux
Download and Install OpenJDK
Note
Prerequisites
- Red Hat Enterprise Linux is installed and running on the server hosting the Red Hat JBoss server.
- The server running Red Hat Enterprise Linux must be registered with RHN and subscribed to the base channel. See https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/part-Package_Management.html for more information about managing subscriptions and entitlements on Red Hat Enterprise Linux systems.
Install the OpenJDK RPM
Install OpenJDK using the yum command-line interface as a root user. Install the latest compatible version of OpenJDK for your Red Hat Enterprise Linux installation.- OpenJDK 6
yum install java-1.6.0-openjdk-devel- OpenJDK 7
yum install java-1.7.0-openjdk-devel
Optional: Install and configure the alternatives utility
Red Hat Enterprise Linux includes a utility calledalternatives, which lets you change the default Java version for applications which allow multiple versions to be installed. OpenJDK is one such application.To use thealternativesutility, perform the following steps.- Log in as the
rootuser, or prefix the commands below with thesudocommand. - The
alternativescommand is not installed by default, but may already be installed on your system. If not, install thealternativespackage by running the following command:yum install alternatives
- Issue the following command:
/usr/sbin/alternatives --config java
- Follow the prompts to set the default version of OpenJDK.
Optional: Set the
JAVA_HOMEenvironment variableSome applications, such as Apache Maven and Apache Ant, and utilities, such asalternativesrequire you to set theJAVA_HOMEenvironment variable. TheJAVA_HOMEvariable points to thebindirectory containing the required Java executable. To set theJAVA_HOMEenvironment variable perform the following steps.- Determine the correct value for
JAVA_HOME. For example, Red Hat Enterprise Linux installs OpenJDK 1.6 into either/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/or/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/, depending on whether your system is a 32-bit or 64-bit architecture. - As the user who will use OpenJDK, open the shell configuration file. For the Bash shell, this file is
/home/username/.bashrc. - At the bottom of the file, type the following line, replacing the hypothetical path with the actual path to use on your own system:
export JAVA_HOME="/path/to/java/home"If you are setting the environment variable foralternativesutility, then at the bottom of the file type the following line:export JAVA_HOME="/etc/alternatives/jre" - Save the file, and log out of and back into your session.
JAVA_HOME environment variable has been specified as well. If necessary, the default OpenJDK for your system has been set using the alternatives utility.
5.2. Install Red Hat JBoss Portal
- Navigate to the parent directory where the Red Hat JBoss Portal (JBoss Portal) Zip archive will be extracted.Before continuing, verify the chosen directory, and it's access permissions, meet organizational security and deployment requirements.
- Unzip
jboss-portal-[version].zipto extract the Zip archive contents to the directory.A command-line or GUI archive manager is suitable for this task, depending on the server environment.Thejboss-portal-[version]directory is created with an installation of JBoss Portal in its default configuration.
5.3. Install and Configure JBoss Operations Network Plug-in
5.4. Installation Structure and Details
Example 5.1. Top Level Directories
jboss-jpp-6.2
├── appclient
│ └── configuration
├── bin
│ ├── add-user.bat
│ ├── add-user.sh
│ ├── appclient.bat
│ ├── appclient.conf
│ ├── appclient.conf.bat
│ ├── appclient.sh
│ ├── client
│ ├── demo-domain-setup.sh
│ ├── domain.bat
│ ├── domain.conf
│ ├── domain.conf.bat
│ ├── domain.sh
│ ├── init.d
│ ├── jboss-cli.bat
│ ├── jboss-cli-logging.properties
│ ├── jboss-cli.sh
│ ├── jboss-cli.xml
│ ├── jconsole.bat
│ ├── jconsole.sh
│ ├── jdr.bat
│ ├── jdr.sh
│ ├── portal-setup.bat
│ ├── portal-setup.sh
│ ├── product.conf
│ ├── run.bat
│ ├── run.sh
│ ├── standalone.bat
│ ├── standalone.conf
│ ├── standalone.conf.bat
│ ├── standalone.sh
│ ├── vault.bat
│ ├── vault.sh
│ ├── wsconsume.bat
│ ├── wsconsume.sh
│ ├── wsprovide.bat
│ └── wsprovide.sh
├── bundles
│ └── system
├── docs
│ ├── examples
│ ├── licenses
│ └── schema
├── domain
│ ├── configuration
│ ├── data
│ └── tmp
├── gatein
│ ├── extensions
│ └── gatein.ear
├── JBossEULA.txt
├── jboss-modules.jar
├── LICENSE.txt
├── modules
│ ├── layers.conf
│ └── system
│ └── layers
│ ├── base
│ └── gatein
├── standalone
│ ├── configuration
│ ├── data
│ ├── deployments
│ ├── lib
│ ├── log
│ └── tmp
├── version.txt
└── welcome-content
├── eap.css
├── favicon.ico
├── images
├── index.html
├── index_noconsole.html
├── jpp.css
├── noconsole.html
└── noredirect.html
gatein-management └── gatein-management-cli.war
gatein-sso
├── cas
│ └── plugin
├── josso
│ ├── gatein-josso-181
│ ├── gatein-josso-182
│ ├── josso-181
│ └── josso-182
├── opensso
│ └── plugin
├── README
└── saml
└── idp-sig.war
Example 5.2. Directories within the gatein/ directory
gatein
├── extensions
│ ├── gatein-wsrp-integration.ear
│ │ ├── extension-war.war
│ │ ├── lib
│ │ ├── META-INF
│ │ ├── wsrp-admin-gui.war
│ │ └── wsrp-producer.war
│ ├── jpp-branding-extension.ear
│ └── jpp-mobile-integration.ear
│ ├── gatein-mobile-login.war
│ ├── jpp-information-portlet.war
│ ├── jpp-mobile-configuration.war
│ ├── jpp-responsive-skin.war
│ ├── META-INF
│ ├── redirect-portlet.war
│ ├── responsive-banner-portlet.war
│ ├── responsive-features-portlet.war
│ ├── responsive-footer-portlet.war
│ ├── responsive-header-portlet.war
│ └── responsive-navigation-portlet.war
└── gatein.ear
├── dashboard.war
├── exoadmin.war
├── eXoGadgetServer.war
├── eXoGadgets.war
├── eXoResources.war
│ ├── javascript
│ ├── META-INF
│ ├── skin
│ └── WEB-INF
├── gwtGadgets.war
├── integration.war
│ └── WEB-INF
├── META-INF
│ ├── application.xml
│ └── jboss-deployment-structure.xml
├── portal.war
│ ├── device
│ ├── error
│ ├── favicon.ico
│ ├── groovy
│ ├── login
│ ├── META-INF
│ ├── setup
│ ├── templates
│ ├── WEB-INF
│ └── welcome.jsp
├── redirect-admin.war
├── rest.war
└── web.war
Example 5.3. Directories within the standalone/ directory
standalone
├── configuration
│ ├── application-roles.properties
│ ├── application-users.properties
│ ├── gatein
│ │ ├── codec
│ │ ├── configuration.properties
│ │ ├── configuration.xml
│ │ ├── controller.xml
│ │ ├── gadgets
│ │ ├── portlet.xml
│ │ └── wsrp
│ ├── logging.properties
│ ├── mgmt-users.properties
│ ├── standalone-full-ha.xml
│ ├── standalone-full.xml
│ ├── standalone-ha.xml
│ ├── standalone-osgi.xml
│ ├── standalone.xml
│ └── standalone_xml_history
│ ├── current
│ ├── snapshot
│ ├── standalone.boot.xml
│ ├── standalone.initial.xml
│ └── standalone.last.xml
├── data
│ ├── content
│ ├── gatein
│ │ ├── jcr
│ │ └── portal
│ ├── timer-service-data
│ ├── tx-object-store
│ │ └── ShadowNoFileLockStore
│ └── wsdl
│ └── gatein-wsrp-integration.ear
├── deployments
│ └── README.txt
├── lib
│ └── ext
├── log
│ ├── server.log
│ └── server.log.2013-09-04
└── tmp
├── auth
├── vfs
│ ├── deployment1e5dbb2debad1ef9
│ ├── deploymentaa52d43feb530be9
│ ├── deploymentbbd242b840f00e6
│ ├── temp16524ed851e8e554
│ ├── temp44c44c4d38f5c74c
│ └── tempac089482639a2df5
└── work
└── jboss.web
5.5. Run as an Operating System Service
5.5.1. Install as a Service in Red Hat Enterprise Linux
Install Red Hat JBoss Portal as a Red Hat Enterprise Linux Service
Copy the startup script to the
/etc/jboss-as/directoryThe startup script, and an associated configuration file, are located in the$JPP_HOME/bin/init.d/directory. Copy each file to the required location.[user@host init.d]$sudo cp jboss-as.conf /etc/jboss-as[user@host init.d]$sudo cp jboss-as-standalone.sh /etc/init.d/Add the startup script as a service
Add the newjboss-as-standalone.shservice to list of automatically started services, using thechkconfigservice management command.[user@host init.d]$sudo chkconfig --add jboss-as-standalone.shConfigure script options and variables
Edit thejboss-as.conffile to customize startup options for JBoss Portal and the JVM. Use the comments in the file as general guidance.Because the start-up script makes default assumptions about the name of the start-up file and the location of the JBoss Portal instance, some customization is required to the script before it can be run as a service. Customize the script, paying special attention to the following variables:- JBOSS_HOME
- Location where JBoss Portal is extracted.It is recommended to set the
JBOSS_HOMEvariable to point to the directory where you extracted JBoss Portal. Some applications require this variable in order to function correctly. Do not add a trailing slash (/) at the end of the directory name. - JBOSS_USER
- User with the ability to run JBoss Portal as a non-privileged user (superuser privileges are not required to run JBoss Portal).
- JBOSS_CONFIG
- Name of the configuration file used to start JBoss Portal, such as
standalone.xml - JBOSS_SCRIPT
- Script used to start JBoss Portal, such as
standalone.sh.
Optional: Start the service.
If desired, start the new service using the standard syntax for starting Red Hat Enterprise Linux services.[user@host bin]$sudo service jboss-as-standalone start
5.6. Start as a Standalone Server
- Red Hat Enterprise Linux.
- Run the following command to start the server in standalone mode:
JPP_HOME/bin/standalone.sh - Optional: Specify additional parameters.
- To print a list of additional parameters to pass to the start-up scripts, use the
-hparameter.
5.7. Test the Installation
Look for error messages in the log file
After you start the server, view the log file inJPP_HOME/standalone/log/.Result:If the server started properly, there will be no errors, and you will see output similar to the following:Example 5.4. Example of a successful start-up
14:36:32,632 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Portal Platform 6.0.0.ER04.2 (AS 7.1.3.Final-redhat-4) started in 23519ms - Started 919 of 1041 services (116 services are passive or on-demand)
Browse to the Management Console.
If the installation worked properly and your server is running, you should be able to access the Management Console by pointing your web browser at an address similar tohttp://YOUR_SERVER:9990/, replacing YOUR_SERVER with a valid value.Result:The front page of the Management Console appears.
5.8. Uninstall Red Hat JBoss Portal (Zip Installation)
Prerequisites
- Navigate to the directory where the JBoss Portal 6 folder from the Zip file is extracted.
- JBoss Portal 6 installs in a single directory. Delete the installation directory to uninstall JBoss Portal 6.
- Delete any initialization scripts, or other scripts which depended upon JBoss Portal 6 being installed on the server.
Chapter 6. Common Configuration
6.1. Network Ports Used By JBoss EAP 6
- Whether your server groups use one of the default socket binding groups, or a custom group.
- The requirements of your individual deployments.
Numerical port offsets
8080, and your server uses a port offset of 100, its HTTP port is 8180.
The default socket binding groups
full-ha-socketsfull-socketsha-socketsstandard-sockets
domain.xml. The standalone server profiles contain only standard socket binding group. This group corresponds to standard-sockets in standalone.xml, ha-sockets for standalone-ha.xml, full-sockets for standalone-full.xml, and full-ha-sockets for standalone-full-ha.xml. Standalone profiles contain some more socket bindings, for example, management-{native,http,https}.
Table 6.1. Reference of the default socket bindings
| Name | Port | Multicast Port | Description | full-ha-sockets | full-sockets | ha-socket | standard-socket |
|---|---|---|---|---|---|---|---|
ajp | 8009 | Apache JServ Protocol. Used for HTTP clustering and load balancing. | Yes | Yes | Yes | Yes | |
http | 8080 | The default port for deployed web applications. | Yes | Yes | Yes | Yes | |
https | 8443 | SSL-encrypted connection between deployed web applications and clients. | Yes | Yes | Yes | Yes | |
jacorb | 3528 | CORBA services for JTS transactions and other ORB-dependent services. | Yes | Yes | No | No | |
jacorb-ssl | 3529 | SSL-encrypted CORBA services. | Yes | Yes | No | No | |
jgroups-diagnostics | 7500 | Multicast. Used for peer discovery in HA clusters. Not configurable using the Management Interfaces. | Yes | No | Yes | No | |
jgroups-mping | 45700 | Multicast. Used to discover initial membership in a HA cluster. | Yes | No | Yes | No | |
jgroups-tcp | 7600 | Unicast peer discovery in HA clusters using TCP. | Yes | No | Yes | No | |
jgroups-tcp-fd | 57600 | Used for HA failure detection over TCP. | Yes | No | Yes | No | |
jgroups-udp | 55200 | 45688 | Multicast peer discovery in HA clusters using UDP. | Yes | No | Yes | No |
jgroups-udp-fd | 54200 | Used for HA failure detection over UDP. | Yes | No | Yes | No | |
messaging | 5445 | JMS service. | Yes | Yes | No | No | |
messaging-group | Referenced by HornetQ JMS broadcast and discovery groups. | Yes | Yes | No | No | ||
messaging-throughput | 5455 | Used by JMS Remoting. | Yes | Yes | No | No | |
mod_cluster | 23364 | Multicast port for communication between JBoss EAP 6 and the HTTP load balancer. | Yes | No | Yes | No | |
remoting | 4447 | Used for remote EJB invocation. | Yes | Yes | Yes | Yes | |
txn-recovery-environment | 4712 | The JTA transaction recovery manager. | Yes | Yes | Yes | Yes | |
txn-status-manager | 4713 | The JTA / JTS transaction manager. | Yes | Yes | Yes | Yes |
9990- The Web Management Console port9999- The port used by the Management Console and Management API
6.2. Configure Network Firewalls to Work with JBoss EAP 6
Prerequisites
- Determine the ports you need to open.
- An understanding of your firewall software is required. This procedure uses the
system-config-firewallcommand in Red Hat Enterprise Linux 6. Microsoft Windows Server includes a built-in firewall, and several third-party firewall solutions are available for each platform. On Microsoft Windows Server, you can use PowerShell to configure the firewall.
- The operating system is Red Hat Enterprise Linux 6.
- JBoss EAP 6 runs on host
10.1.1.2. Optionally, the server has its own firewall. - The network firewall server runs on host
10.1.1.1on interfaceeth0, and has an external interfaceeth1. - You want traffic on port
5445(a port used by JMS) forwarded to JBoss EAP 6. No other traffic should be allowed through the network firewall.
Procedure 6.1. Manage Network Firewalls and JBoss EAP 6 to work together
Log into the Management Console.
Log into the Management Console. By default, it runs on http://localhost:9990/console/.Determine the socket bindings used by the socket binding group.
- Click the Configuration label at the top of the Management Console.
- Expand the General Configuration menu. Select the Socket Binding.
- The Socket Binding Declarations screen appears. Initially, the
standard-socketsgroup is shown. Choose a different group by selecting it from the combo box on the right-hand side.
Note
If you use a standalone server, it has only one socket binding group.The list of socket names and ports is shown, eight values per page. You can go through the pages by using the arrow navigation below the table.Determine the ports you need to open.
Depending on the function of the particular port and the requirements of your environment, some ports may need to be opened on your firewall.Configure your firewall to forward traffic to JBoss EAP 6.
Perform these steps to configure your network firewall to allow traffic on the desired port.- Log into your firewall machine and access a command prompt, as the root user.
- Issue the command
system-config-firewallto launch the firewall configuration utility. A GUI or command-line utility launches, depending on the way you are logged into the firewall system. This task makes the assumption that you are logged in via SSH and using the command-line interface. - Use the TAB key on your keyboard to navigate to the button, and press the ENTER key. The Trusted Services screen appears.
- Do not change any values, but use the TAB key to navigate to the button, and press ENTER to advanced to the next screen. The Other Ports screen appears.
- Use the TAB key to navigate to the <Add> button, and press ENTER. The Port and Protocol screen appears.
- Enter
5445in the Port / Port Range field, then use the TAB key to move to the Protocol field, and entertcp. Use the TAB key to navigate to the button, and press ENTER. - Use the TAB key to navigate to the button until you reach the Port Forwarding screen.
- Use the TAB key to navigate to the <Add> button, and press the ENTER key.
- Fill in the following values to set up port forwarding for port
5445.- Source interface:
eth1 - Protocol:
tcp - Port / Port Range:
5445 - Destination IP address:
10.1.1.2 - Port / Port Range:
5445
Use the TAB key to navigate to the button, and press ENTER. - Use the TAB key to navigate to the button, and press ENTER.
- Use the TAB key to navigate to the button, and press ENTER. To apply the changes, read the warning and click .
Configure a firewall on your JBoss EAP 6 host.
Some organizations choose to configure a firewall on the JBoss EAP 6 server itself, and close all ports that are not necessary for its operation. See Section 6.1, “Network Ports Used By JBoss EAP 6” and determine which ports to open, then close the rest. The default configuration of Red Hat Enterprise Linux 6 closes all ports except22(used for Secure Shell (SSH) and5353(used for multicast DNS). While you are configuring ports, ensure you have physical access to your server so that you do not inadvertently lock yourself out.
Procedure 6.2. Configuring Firewall on Microsoft Windows using PowerShell
- Switch off firewall for debug purpose to determine whether the current network behavior is related to the firewall configuration.
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall set allprofiles state off"'
- Allow UDP connections on port 23364. For example:
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall firewall add rule name="UDP Port 23364" dir=in action=allow protocol=UDP localport=23364"' Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall firewall add rule name="UDP Port 23364" dir=out action=allow protocol=UDP localport=23364"'
Procedure 6.3. Configure the Firewall on Red Hat Enterprise Linux 7 to Allow mod_cluster Advertising
- To allow mod_cluster advertising on Red Hat Enterprise Linux 7, you must enable the UDP port in the firewall as follows:
firewall-cmd --permanent --zone=public --add-port=23364/udp
Note
224.0.1.105:23364 is the default address and port for mod_cluster balancer advertising UDP multicast.
6.3. Add the User for the Management Interfaces
Procedure 6.4. Create the Initial Administrative User for the Remote Management Interfaces
Run the
add-user.shoradd-user.batscript.Change to theEAP_HOME/bin/directory. Invoke the appropriate script for your operating system.- Red Hat Enterprise Linux
[user@host bin]$./add-user.sh- Microsoft Windows Server
C:\bin>add-user.bat
Choose to add a Management user.
Press ENTER to select the default optionato add a Management user.This user is added to theManagementRealmand is authorized to perform management operations using the web-based Management Console or command-line based Management CLI. The other choice,b, adds a user to theApplicationRealm, and provides no particular permissions. That realm is provided for use with applications.Enter the desired username and password.
When prompted, enter the username and password. You will be prompted to confirm the password.Enter group information.
Add the group or groups to which the user belongs. If the user belongs to multiple groups, enter a comma-separated list. Leave it blank if you do not want the user to belong to any groups.Review the information and confirm.
You are prompted to confirm the information. If you are satisfied, typeyes.Choose whether the user represents a remote JBoss EAP 6 server instance.
Besides administrators, the other type of user which occasionally needs to be added to JBoss EAP 6 in theManagementRealmis a user representing another instance of JBoss EAP 6, which must be able to authenticate to join a cluster as a member. The next prompt allows you to designate your added user for this purpose. If you selectyes, you will be given a hashedsecretvalue, representing the user's password, which would need to be added to a different configuration file. For the purposes of this task, answernoto this question.Enter additional users.
You can enter additional users if desired, by repeating the procedure. You can also add them at any time on a running system. Instead of choosing the default security realm, you can add users to other realms to fine-tune their authorizations.Create users non-interactively.
You can create users non-interactively, by passing in each parameter at the command line. This approach is not recommended on shared systems, because the passwords will be visible in log and history files. The syntax for the command, using the management realm, is:[user@host bin]$./add-user.sh username passwordTo use the application realm, use the-aparameter.[user@host bin]$./add-user.sh -a username password- You can suppress the normal output of the add-user script by passing the
--silentparameter. This applies only if the minimum parametersusernameandpasswordhave been specified. Error messages will still be shown.
ManagementRealm realm are able to manage JBoss EAP 6 from remote systems.
See Also:
6.4. Default User Security Configuration
- Local interfaces are secured by a SASL contract between local clients and the server they connect to. This security mechanism is based on the client's ability to access the local filesystem. This is because access to the local filesystem would allow the client to add a user or otherwise change the configuration to thwart other security mechanisms. This adheres to the principle that if physical access to the filesystem is achieved, other security mechanisms are superfluous. The mechanism happens in four steps:
Note
HTTP access is considered to be remote, even if you connect to the localhost using HTTP.- The client sends a message to the server which includes a request to authenticate with the local SASL mechanism.
- The server generates a one-time token, writes it to a unique file, and sends a message to the client with the full path of the file.
- The client reads the token from the file and sends it to the server, verifying that it has local access to the filesystem.
- The server verifies the token and then deletes the file.
- Remote clients, including local HTTP clients, use realm-based security. The default realm with the permissions to configure the JBoss EAP 6 instance remotely using the management interfaces is
ManagementRealm. A script is provided which allows you to add users to this realm (or realms you create). For more information on adding users, see the User Management chapter of the JBoss EAP 6 Administration and Configuration Guide. For each user, the username and a hashed password are stored in a file.- Managed domain
EAP_HOME/domain/configuration/mgmt-users.properties- Standalone server
EAP_HOME/standalone/configuration/mgmt-users.properties
Even though the contents of themgmt-users.propertiesare masked, the file must still be treated as a sensitive file. It is recommended that it be set to the file mode of600, which gives no access other than read and write access by the file owner.
6.5. Adjust Memory Settings
JAVA_OPTS settings in the file JPP_HOME/bin/standalone.conf on Linux, or JPP_HOME/bin/standalone.conf.bat on Windows.
-Xms1303m -Xmx1303m -XX:MaxPermSize=256m ....
Chapter 7. Platform-specific Configuration
- 7.1. Configure the Portal Root Password
- 7.2. About JBoss Portal Domain Mode
- 7.3. Provision JCR and IDM Databases
- 7.4. JTA Support Configuration
- 7.5. Email Service Configuration
- 7.6. Email Notifications Configuration
- 7.7. Clustering Configuration
- 7.8. Setting mod_jk for Cluster Configuration
- 7.9. HTTPS Configuration
- 7.10. Enable HTTPS Communication
- 7.11. Specify White-list and Black-list Gadget Proxy Resources
- 7.12. Validator Configuration
- 7.13. Custom Password Policy
- 7.14. Password Encryption
7.1. Configure the Portal Root Password
Procedure 7.1. Setting the Root Password Through the Command-line
- Open a terminal and execute the
portal-setup.shscript.- For Linux,
$JPP_HOME/bin/portal-setup.sh - For Microsoft Windows,
%JPP_HOME%\bin\portal-setup.bat
- Type a value for the root password when prompted and press Enter. Re-type the password and press Enter.The password is encrypted and stored in the
$JPP_HOME/standalone/configuration/gatein/configuration.propertiesfile. - Start JBoss Portal.
- Open the Users Management interface and create the required accounts, including an Administrator account.
Procedure 7.2. Setting the Root Password Through the Web Interface
Important
configuration.properties has no effect.
- Once all configuration in this user guide has been completed, start JBoss Portal.
- Open JBoss Portal in a browser.
- In the Set Root Password page, type a Root password in the Password field, and repeat the same password in the Repeat password field.
- Click Setup to set the Root password.To modify the Root password on subsequent occasions, use the portal administration interface for Users Management.
7.2. About JBoss Portal Domain Mode
7.3. Provision JCR and IDM Databases
JPP_DIST/standalone/configuration/standalone.xml and for clustered configuration in the standalone-ha.xml file.
Procedure 7.3. Configuring the Java Content Repository (JCR)
- Open
JPP_DIST/standalone/configuration/standalone.xmlin edit mode. - Bind the JCR datasource to JNDI under
java:/jdbcjcr_portal.<datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:file:${jboss.server.data.dir}/gatein/portal/jdbcjcr_portal;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource>
- If additional portals are deployed, additional datasources must be configured and bound in JNDI using a separate
java:/jdbcjcr_PORTAL-NAMEdirective.Ensure the user has rights to create tables on jdbcjcr_portal, and to update them as they will automatically be created during the first startup.
Procedure 7.4. Configuring Identity Management (IDM)
- Open
JPP_DIST/standalone/configuration/standalone.xmlin edit mode. - Bind the IDM datasource to JNDI under
java:/jdbcidm_portal.<datasource jndi-name="java:/jdbcidm_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:file:${jboss.server.data.dir}/gatein/portal/jdbcjcr_portal;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource>
- If additional portals are deployed, additional datasources must be configured and bound in JNDI using a separate
java:/jdbcjcr_PORTAL-NAMEdirective.Ensure the user has rights to create tables on jdbcjcr_portal, and to update them as they will automatically be created during the first startup.
See Also:
7.4. JTA Support Configuration
7.4.1. JTA Support
7.4.2. JDBC Driver Download Locations
Table 7.1. JDBC driver download locations
| Vendor | Download Location |
|---|---|
| MySQL | |
| PostgreSQL | |
| Oracle | |
| IBM | |
| Sybase | |
| Microsoft |
7.4.3. Install a JDBC Driver as a Core Module
- Select the correct JDBC driver from the information in the Supported Configurations document at https://access.redhat.com/site/articles/119833 and download the driver package.
- Extract the archive.
Procedure 7.5. Install a JDBC Driver as a Core Module
- Create a file path structure under the
JPP_HOME/modules/system/layers/basedirectory. For example, for a MySQL JDBC driver, createJPP_HOME/modules/system/layers/base/com/mysql/main/. - Copy the JDBC driver JAR into the
main/subdirectory. - In the
main/subdirectory, create amodule.xmlfile. The following is an example of amodule.xmlfile:<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.15.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
- Start the Server.
- Start the Management CLI.
- Run the CLI command to add the JDBC driver module to the server configuration.The command you choose depends on the number of classes listed in the
/META-INF/services/java.sql.Driverfile located in the JDBC driver JAR. For example, the/META-INF/services/java.sql.Driverfile in the MySQL 5.1.20 JDBC JAR lists two classes:When there is more than one entry, you must also specify the name of the driver class. Failure to do so results in an error similar to the following:com.mysql.jdbc.Drivercom.mysql.fabric.jdbc.FabricMySQLDriver
Example 7.1. Driver class error
JBAS014749: Operation handler failed: Service jboss.jdbc-driver.mysql is already registered
Note
The value for DRIVER_NAME depends on the number of classes listed in the/META-INF/services/java.sql.Driverfile located in the JDBC driver JAR. If there is only one class, the value is the name of the JAR. If there are multiple classes, the value is the name of the JAR + driverClassName + "_" + majorVersion +"_" + minorVersion. Failure to do so will result in the following error being logged:JBAS014775: New missing/unsatisfied dependencies
For example, the DRIVER_NAME value required for the MySQL 5.1.31 driver, ismysql-connector-java-5.1.31-bin.jarcom.mysql.jdbc.Driver_5_1.- Run the CLI command for JDBC JARs containing one class entry.
/subsystem=datasources/jdbc-driver=DRIVER_NAME:add(driver-name=DRIVER_NAME,driver-module-name=MODULE_NAME,driver-xa-datasource-class-name=XA_DATASOURCE_CLASS_NAME)
Example 7.2. CLI Command for Standalone Mode for JDBC JARs with one driver class
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource)
Example 7.3. CLI Command for Domain Mode for JDBC JARs with one driver class
/profile=ha/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource)
- Run the CLI command for JDBC JARs containing multiple class entries.
/subsystem=datasources/jdbc-driver=DRIVER_NAME:add(driver-name=DRIVER_NAME,driver-module-name=MODULE_NAME,driver-xa-datasource-class-name=XA_DATASOURCE_CLASS_NAME, driver-class-name=DRIVER_CLASS_NAME)
Example 7.4. CLI Command for Standalone Mode for JDBC JARs with multiple driver class entries
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource, driver-class-name=com.mysql.jdbc.Driver)
Example 7.5. CLI Command for Domain Mode for JDBC JARs with multiple driver class entries
/profile=ha/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource, driver-class-name=com.mysql.jdbc.Driver)
7.4.4. Configure Datasources for JTA Support
Procedure 7.6. Shared Datasource Configuration
- Open
JPP_HOME/standalone/configuration/standalone.xml. - Comment the jdbcjcr_portal <datasource> directive to disable the JCR datasource.
<datasources> <!--<datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:file:${jboss.server.data.dir}/gatein/portal/jdbcjcr_portal;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource>--> </datasources>
- Configure jdbcidm_portal <datasource> directive to use the MySQL database.
<datasources> <!--<datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:file:${jboss.server.data.dir}/gatein/portal/jdbcjcr_portal;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource>--> <datasource jndi-name="java:/jdbcidm_portal" pool-name="IDMPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:mysql://localhost/portal</connection-url> <driver>mysql</driver> <security> <user-name>portal</user-name> <password>portal</password> </security> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> </datasource> </datasources>
- Add the MySQL module into the list of <drivers>.
<datasources> <!--<datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:file:${jboss.server.data.dir}/gatein/portal/jdbcjcr_portal;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource>--> <datasource jndi-name="java:/jdbcidm_portal" pool-name="IDMPortalDS" enabled="true" use-java-context="true"> <connection-url>jdbc:mysql://localhost/portal</connection-url> <driver>mysql</driver> <security> <user-name>portal</user-name> <password>portal</password> </security> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> </datasource> <drivers> <driver name="mysql" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class> </driver> </drivers> </datasources>
- Open
JPP_HOME/standalone/configuration/gatein/configuration.properties, and verify the gatein.jcr.datasource.name property has the value java:/jdbcidm. This value ensures the JCR database uses the IDM database as the datasource.gatein.jcr.datasource.name=java:/jdbcidm gatein.idm.datasource.name=java:/jdbcidm
Procedure 7.7. XA Datasource Configuration
Important
- Open
JPP_HOME/standalone/configuration/standalone.xml. - Configure jdbcidm_portal <xa-datasource> directive to use the MySQL database.
<datasources> <xa-datasource jndi-name="java:/jdbcidm_portal" pool-name="IDMPortalDS" enabled="true" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">portalidm</xa-datasource-property> <driver>mysql</driver> <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>portal</user-name> <password>portal</password> </security> </xa-datasource> </datasources>
- Configure jdbcjcr_portal <xa-datasource> directive to use the MySQL database.
<datasources> <xa-datasource jndi-name="java:/jdbcidm_portal" pool-name="IDMPortalDS" enabled="true" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">portalidm</xa-datasource-property> <driver>mysql</driver> <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>portal</user-name> <password>portal</password> </security> </xa-datasource> <xa-datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">portaljcr</xa-datasource-property> <driver>mysql</driver> <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>portal</user-name> <password>portal</password> </security> </xa-datasource> </datasources>
- Add the MySQL module into the list of <drivers>.
<datasources> <xa-datasource jndi-name="java:/jdbcidm_portal" pool-name="IDMPortalDS" enabled="true" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">portalidm</xa-datasource-property> <driver>mysql</driver> <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>portal</user-name> <password>portal</password> </security> </xa-datasource> <xa-datasource jndi-name="java:/jdbcjcr_portal" pool-name="JCRPortalDS" enabled="true" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">portaljcr</xa-datasource-property> <driver>mysql</driver> <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>portal</user-name> <password>portal</password> </security> </xa-datasource> <drivers> <driver name="mysql" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
- Open
JPP_HOME/standalone/configuration/gatein/configuration.properties, and verify the gatein.jcr.datasource.name property has the value java:/jdbcidm. This value ensures the JCR database uses the IDM database as the datasource.gatein.jcr.datasource.name=java:/jdbcjcr gatein.idm.datasource.name=java:/jdbcidm
7.4.5. Configure Hibernate and Picketlink
Procedure 7.8. Configuring Hibernate and Picketlink for JTA
- Open
JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/organization/idm-configuration.xml - In the hibernate.properties <init-params> group, comment the Non-JTA Setup directives, and uncomment the JTA Setup directives:
<init-params> <properties-param> <name>hibernate.properties</name> <description>Default Hibernate Service</description> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="hibernate.show_sql" value="false"/> <property name="hibernate.connection.datasource" value="${gatein.idm.datasource.name}${container.name.suffix}"/> <property name="hibernate.connection.autocommit" value="false"/> <!-- Non-JTA setup --> <!--<property name="hibernate.current_session_context_class" value="thread"/>--> <!-- JTA setup --> <property name="hibernate.current_session_context_class" value="jta"/> <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory" /> <property name="hibernate.transaction.jta.platform" value="org.exoplatform.services.organization.idm.UserTransactionJtaPlatform" /> <!-- Remaining code removed for readability-->
- In the org.exoplatform.services.organization.idm.Config <init-params> group, change useJTA <field> value to
true.<field name="useJTA"> <boolean>true</boolean> </field>
This setting forces PicketlinkIDMOrganizationServiceImpl to encapsulate each HTTP request within the JTA transaction, instead of the Hibernate transaction API. The bounds of the transaction are startRequest and endRequest.Important
If managed transactions are used in portlet applications (for example, using EJB with Container-Managed transactions), be aware that some changes to transaction behavior may occur in the application.Ensure that portlet applications do not attempt to start or commit JTA transactions from the application. - Open
JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml - In the <stores> directives, change the lazyStartOfHibernateTransaction option to
falseto switch transaction management from PicketLink to JTA.
7.4.6. Last Resource Commit Optimization (LRCO)
7.5. Email Service Configuration
Procedure 7.9. Configuring the SMTP Email Service
- Open
JPP_HOME/standalone/configuration/gatein/configuration.propertiesin edit mode. - Specify the Google Account information as indicated in the file.
# EMail gatein.email.smtp.username=[user@gmail.com] gatein.email.smtp.password=[password|app-specific password] gatein.email.smtp.host=smtp.gmail.com gatein.email.smtp.port=465 gatein.email.smtp.starttls.enable=true gatein.email.smtp.auth=true gatein.email.smtp.socketFactory.port=465 gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
- When provisioning the Email Service for a production environment, it is recommended to specify a corporate SMTP gateway and port for the
smtp.hostandsmtp.portvariables.If using a SMTP gateway over SSL, a certificate trust store containing the SMTP server public certificate is required. Depending on the key sizes, Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy files are required for the Java Runtime Environment (JRE).
7.6. Email Notifications Configuration
Prerequisites:
- Notifications about new users, which are typically useful on portals that have a public registration page.
- Notifications about invalid login attempts, which can help in identifying security attacks.
Procedure 7.10. Enabling Notifications about New User Registration
- Configure an SMTP account.
- Configure the following mandatory configuration items located in the
PostRegistrationServicepart of theJPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/admin/admin-configuration.xmlconfiguration file.- sendMailAfterRegistration
- Boolean value that specifies whether an email notification is sent for new user registrations.The default value is
false. If set totrue, email notifications are sent when users join. - mailTo
- Specifies the email address to which notifications are sent.
- Configure optional parameters to customize the content of the notification emails:
- mailFrom
- Specifies the email address from which the notification email is sent.
- mailSubject
- Specifies the subject of the notification email.
- mailMessage
- Specifies the body of the notification email.The
${user.name},${user.firstName},${user.lastName}and${user.email}macros can be used in the text to dynamically include the respective values in each notification email.
- Test the configuration by restarting the server and registering a new user in the JBoss Portal user interface. An email is sent to the specified email address, notifying the recipient that a user has been registered to the portal.
Procedure 7.11. Enabling Notifications about Invalid Login Attempts
- Configure an SMTP account.
- Configure the following mandatory configuration items located in the
InvalidLoginAttemptsServicepart of theJPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/admin/admin-configuration.xmlconfiguration file.- sendingMailsEnabled
- boolean value determining if e-mail notifications about invalid login attempts are enabled. It is
falseby default and needs to be changed totruefor the e-mail notifications to be sent. - mailTo
- Specifies the email address to which notifications are sent.
- Configure optional parameters to customize the content and policies associated with notification emails:
- mailFrom
- Specifies the email address from which the notification email is sent.
- mailSubject
- Specifies the subject of the notification email.
- mailMessage
- Specifies the body of the notification email.The
${user.name},${user.firstName},${user.lastName}and${user.email}macros can be used in the text to dynamically include the respective values in each notification email. - numberOfFailedAttempts
- Specifies the number of invalid login attempts after which an email notification is sent. The default value is
3. - invalidLoginPolicy
- Specifies the policy used to determine that invalid login attempts are coming from same source. The available values are
SESSION- the default, indicating that invalid login attempts must originate from the same HTTP session.SESSION_AND_USER- indicates that invalid login attempts must originate from the same HTTP session, and contain the same user name.SERVER- indicates that invalid login attempts must come from the same remote server.
- Test the configuration by restarting the server and attempting to login to JBoss Portal with invalid account credentials.Repeat the attempt for the number of times specified in the
numberOfFailedAttemptsparameter (the default is three attempts). - An email is sent to the specified email address, notifying the recipient that an invalid login attempt has been detected.
7.7. Clustering Configuration
- Using a single physical server
- One physical server using two virtual IP addresses.This configuration is used during basic clustering testing in a development environment, and can use the pre-configured Hypersonic (H2) database (which is not supported in production environments).For assistance configuring virtual IP addresses, consult the Operating System documentation for guidance.
- Using more than one physical server
- This method uses two or more servers, each configured to use a JBoss Portal binary. For example, a "node1" directory available on server one and a "node2" directory available on server two.This configuration is recommended for production environments. A supported databased documented in Tested Configurations is required for this configuration.
Configuring a Red Hat JBoss Portal Virtual Cluster for Basic Testing
standalone-ha.xml file. For this example, no modification is required to the file. For production environments, changes to this file are required and are documented in this guide.
- Configure two virtual IP addresses:
- 192.168.210.101, which is used for "node1" in this procedure.
- 192.168.210.102, which is used for "node2" in this procedure.
- Create two cluster nodes from the JBoss Portal binary:
$ cp -r jboss-jpp-6.2/ node1 $ cp -r jboss-jpp-6.2/ node2
- Copy the Hypersonic database JAR into the JRE to act as the data store for the virtual servers.
$ java -cp modules/system/layers/base/com/h2database/h2/main/h2-1.3.168.redhat-4.jar org.h2.tools.Server
- Start the servers from the node1 and node2 directories:From node1 directory.
$ ./bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=node1 -b 192.168.210.101 -u 239.23.42.2 -Djboss.bind.address.management=192.168.210.101
From node2 directory.$ ./bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=node2 -b 192.168.210.102 -u 239.23.42.2 -Djboss.bind.address.management=192.168.210.102
Both nodes start, and can be accessed through their web interfaces:- node1 on http://192.168.210.101:8080/portal
- node2 on http://192.168.210.102:8080/portal
7.8. Setting mod_jk for Cluster Configuration
Procedure 7.12. To setup the loadbalancer server which uses Apache HTTPD+Mod_jk:
Install apache server and mod_jk module
The package that contains Apache HTTP Server is known as httpd. To build and install mod_jk from source code use the package httpd-devel.Setup apache to use mod_jk
Copy the filemod-jk.confto/etc/httpd/conf.dand append the following line to/etc/httpd/conf/httpd.confto load the module.LoadModule jk_module modules/mod_jk.so
Filemod-jk.confis as follows:# Where to find workers.properties JkWorkersFile workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat #JkRequestLogFormat "%w %V %T" JkMountFile uriworkermap.properties # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for load balancing to work properly JkShmFile /var/log/apache2/jk.shm # Add jkstatus for managing runtime data <Location> /jkstatus/> JkMount status </Location>
Setup Workers:
Createworkers.propertiesfile in /etc/httpd/.Note
The Balanced workers must have the same name as the name of jboss.node.name as shown in Section 7.7, “Clustering Configuration”. The example uses the names node1 and node2. The values for balanced workers inworkers.propertiesfile must also have the same name as node1 and node2.The fileworkers.propertiesis as follows:# Define list of workers that will be used for mapping requests worker.list=loadbalancer,status # modify the host as your host IP or DNS name worker.node1.port=8009 worker.node1.host=192.168.210.101 worker.node1.type=ajp13 worker.node1.lbfactor=1 ## modify the host as your host IP or DNS name worker.node2.port=8009 worker.node2.host=192.168.210.102 worker.node2.type=ajp13 worker.node2.lbfactor=1 # Load-balancing behaviour worker.loadbalancer.type=lb worker.loadbalancer.method=Session worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 #worker.list=loadbalancer worker.status.type=status
The fileuriworkermap.propertiesis as follows:/portal=loadbalancer /portal/*=loadbalancer /eXo*=loadbalancer /eXoResources*/*=loadbalancer /exo*=loadbalancer /exo*/*=loadbalancer /web=loadbalancer /web/*=loadbalancer /integration=loadbalancer /integration/*=loadbalancer /dashboard=loadbalancer /dashboard/*=loadbalancer /rest=loadbalancer /rest/*=loadbalancer /jpp_branding_skin|/*=loadbalancer /jpp-branding-skin|/*=loadbalancer /jpp-branding-extension|/*=loadbalancer /status=status /status/*=status
Troubleshooting error "503 Service Temporarily Unavailable"
- Problem Description
- When accessing JBoss Portal using Apache, a "503 Service Temporarily Unavailable" response is received when trying to access JBoss Portal using Apache. The cluster is working and the individual JBoss Portal nodes can be accessed directly. The logs mod_jk.log indicates mod_jk is working, but Tomcat is reported as not running on the specified port.
- Cause
- In Red Hat Enterprise Linux, SELinux prevents httpd from accessing an important resource, such as jk.shm. Check SELinux alerts to verify this fact.
- Solution
- Temporarily disable SELinux to allow Apache to initialize the mod_jk connector properly by executing the following command:
setenforce 0
7.9. HTTPS Configuration
Important
- Generate encryption keys and certificate.
- Export the self-signed certificate.
- Import the certificate to the trust store.
- Define the keystore and truststore details in the HTTPS connector directive file.
7.10. Enable HTTPS Communication
Generate a Keystore using the Java Keytool
Note
native="false" flag on the web subsystem configuration.
Prerequisites
- Read and understand how keypairs and certificates operate in the About SSL Encryption section of the JBoss Enterprise Application Platform 6 Development Guide.
- Understand the command-line parameters of
keytoolas documented in the Oracle Java Tools documentation. - Obtain the JDK keystore password. For new installations, the default JDK password is "
changeme".
- Run the command to generate a simple certificate using the keytool command (if you do not have your own X.509 certificate). The certificate is stored in the
server.keystorefile.keytool -genkey -alias serverkeys -keyalg RSA -keystore server.keystore -storepass 123456 -keypass 123456 -dname "CN=localhost, OU=MYOU, O=MYORG, L=MYCITY, ST=MYSTATE, C=MY"
- Import the key into the Sun JDK keystore:
keytool -importkeystore -srckeystore server.keystore -destkeystore $JAVA_HOME/jre/lib/security/cacerts
Note
On OS X, thecacertsfile is located at$JAVA_HOME/lib/security/cacerts - Change the key password to match the new keystore password (in most instances this is the default JDK trustore password;
changeit.keytool -keypasswd -alias serverkeys --keystore $JAVA_HOME/jre/lib/security/cacerts
Generate a Keystore using OpenSSL
Note
native="false" flag on the web subsystem configuration.
Prerequisites
- Read and understand how keypairs and certificates operate in the "About SSL Encryption" section of the JBoss Enterprise Application Platform 6 Development Guide
- Understand the command-line parameters of
opensslas documented in the command-line help. - Obtain the JDK keystore password. For new installations, the default JDK password is "
changeme".
- Generate a simple key file using the openssl genrsa command:
openssl genrsa -des3 -out server.pem 1024
The above command will store the key inserver.keystore. - Generate a certificate signing request using the openssl
-reqcommand:openssl req -new -key server.pem -out server.csr
- Generate a server certificate from the server.csr key using the openssl
-reqcommand:openssl x509 -req -days 365 -in server.csr -signkey server.pem -out servercert.pem
Configure JBoss Portal to Use The Key
- Edit
JPP_HOME/standalone/configuration/standalone.xmlto add the HTTPS connector to the web subsystem configuration.Changecertificate-key-fileandpasswordto values appropriate for the keystore. This procedure assumes the keystore password is the default:changeit):For Java keytool, as described in Generate a Keystore using the Java Keytool: <subsystem xmlns="urn:jboss:domain:web:1.2" default-virtual-server="default-host" native="false"> ... <connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" secure="true"> <ssl name="https" key-alias="serverkeys" password="changeit" certificate-key-file="${java.home}/jre/lib/security/cacerts"/> </connector> ... </subsystem>
For OpenSSL, as described in Generate a Keystore using OpenSSL:<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true" enabled="true"> <ssl password="mypassword" certificate-key-file="server.pem" protocol="TLSv1" verify-client="true" certificate-file="servercert.pem"/> </connector>
- Save and close the file.
- Restart the portal.
- JBoss Portal can now communicate using a secure connection.
7.11. Specify White-list and Black-list Gadget Proxy Resources
Task: Specify White-list and Black-list Gadget Proxy Resources
Prerequisites
- You have installed the platform, and performed all configuration tasks up to this task.
- Navigate to
JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/common/ - Open
common-configuration.xmlin a text editor. - Append the ProxyFilterService <component> block to the file.
<component> <key>org.exoplatform.web.security.proxy.ProxyFilterService</key> <type>org.exoplatform.web.security.proxy.ProxyFilterService</type> <init-params> <values-param> <!-- The white list --> <name>white-list</name> <value></value> </values-param> <values-param> <name>black-list</name> <value></value> </values-param> </init-params> </component>
- In the <name>white-list</name> block, specify the name of the domains you want to grant access to by adding <value> directives for each domain name.
Important
A required resource must be explicitly defined in the white-list. Failure to do so will result in the resource being treated as black-listed.Wildcard characters can be used to simplify configuration. For example,*.example.comwould allow all domains withexample.comas the suffix. - In the <name>black-list</name> block, specify the name of the domains you want to deny access to by adding <value> directives for each domain name.Wildcard characters can be used to simplify configuration. For example,
*.example.comwould deny all domains withexample.comas the suffix. - Save and close
common-configuration.xml. - You have specified the gadget domains required in your installation. This completes the procedure.
7.12. Validator Configuration
JPP_HOME/standalone/configuration/gatein/configuration.properties file.
Important
- Length must be between 3 and 30 characters.
- Must start with a letter.
- Must end with a letter or number.
- Only lowercase letters, numbers, underscores (_) and period (.) can be used.
- No consecutive underscores (_) or period (.) can be used.
- gatein.validators.[username|groupmembership].length.min
- Minimum length of the validated field.
- gatein.validators.[username|groupmembership].length.max
- Maximum length of the validated field.
- gatein.validators.[username|groupmembership].regexp
- Regular expression to which values of the validated field must conform.
- gatein.validators.[username|groupmembership].format.message
- Information message that displays when the value of the validated field does not conform to the specified regular expression.
[username|groupmembership] refers to the configuration type.
username configuration type sets how user names are validated when created by the user registration portlet, or modified by the user account portlet.
groupmembership configuration type sets how user names are validated when created or modified by the group membership portlet.
email configuration type sets how email fields are validated.
displayname configuration type sets how user's display name fields are validated.
jobtitle configuration type sets how user profile's job title fields are validated.
grouplabel configuration type sets how group membership label is validated.
Example 7.7. Email as the User Name Mask
# validators
gatein.validators.username.regexp=^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-za-z]{2,4}$
gatein.validators.username.format.message=Username must be a valid email address.
Example 7.8. Letter and Number Combination
# validators
gatein.validators.username.length.min=5
gatein.validators.username.length.max=10
gatein.validators.username.regexp=^u\d{4,9}$
gatein.validators.username.format.message=Username must start with ''u'' and be followed by 4 to 9 digits.7.13. Custom Password Policy
passwordpolicy property.
passwordpolicy property is defined in the configuration.properties file.
passwordpolicy property defines the format, length, and valid expression for an acceptable password.
gatein.validators.passwordpolicy.format.message=Minimum of 1 digit, 1 lower case, 1 upper case, minimum of 6 chars, max of 20. gatein.validators.passwordpolicy.regexp=((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,20}) gatein.validators.passwordpolicy.length.max=20 gatein.validators.passwordpolicy.length.min=6
Important
7.14. Password Encryption
7.14.1. About Remember Me Password Encryption
7.14.2. Symmetric Password Encryption
Example 7.9. JCA-based Configuration
configuration.properties file.
gatein.codec.builderclass=org.exoplatform.web.security.codec.JCASymmetricCodecBuilder
gatein.codec.config=${gatein.conf.dir}/codec/jca-symmetric-codec.properties
Note
jca-symmetric-codec.properties file in the default JBoss Portal binary.
org.exoplatform.web.security.codec.JCASymmetricCodecBuilder is used, and that it is configured in the jca-symmetric-codec.properties file.
Example 7.10. Customized Properties File
configuration.properties values can be changed if the default settings require customization. Observe how the values in the file correspond to the keytool command parameters.
# Detailed information on JCA standard names can be found at # # http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyStore # # The file key.txt is generated using the keytool utility in the JDK # # keytool -genseckey -alias "gtnKey" -keypass "gtnKeyPass" -keyalg "AES" -keysize 128 -keystore "key.txt" -storepass "gtnStorePass" -storetype "JCEKS" # # gatein.codec.jca.symmetric.alias=gtnKey gatein.codec.jca.symmetric.keypass=gtnKeyPass gatein.codec.jca.symmetric.keyalg=AES gatein.codec.jca.symmetric.keystore=key.txt gatein.codec.jca.symmetric.storepass=gtnStorePass gatein.codec.jca.symmetric.storetype=JCEKS
7.14.3. Customization using JCASymmmetricCodecBuilder
Example 7.11. Command to generate secret key
$JAVA_HOME/bin/keytool -genseckey -alias "customAlias" -keypass "customKeyPass" -keyalg "customAlgo" -keystore "customStore" -storepass "customStorePass" -storetype "customStoreType"
Note
- The list of available algorithms can be found in Standard Algorithm Name Documentation .
- Some extra params for keytool might be required for some algorithms.
- In JCA, only JCEKS storetype supports symmetric encryption.
keytool command stores the freshly generated secret key in a file named customStore . Copy this file to the gatein/conf/codec directory to be able to reference it in jca-symmetric-codec.properties file.
jca-symmetric-codec.properties file with parameters used in the above keytool invocation:
Example 7.12. Update jca-symmetric-codec.properties file
gatein.codec.jca.symmetric.alias=customAlias gatein.codec.jca.symmetric.keypass=customKeyPass gatein.codec.jca.symmetric.keyalg=customAlgo gatein.codec.jca.symmetric.keystore=customStore gatein.codec.jca.symmetric.storepass=customStorePass gatein.codec.jca.symmetric.storetype=customStoreType