InstallationThis section describes how to install the OpenDS software package. This package serve as the Security Service for the PDS 2010 system. The following topics can be found in this section: System RequirementsThe software that makes up this project consists of an open source package that is available for download and installation. The package and its release version is as follows:
The above software package requires the following software to be installed in the target environment:
Software Installation1. Install Directory ServerWe are choosing to install a directory server (OpenDS), within the application server so that it is accessible from other applications that require a standard LDAP interface.
Configure the LDAP server with SSL using a self-signed certificate
2. Install Application ServerAlthough other application servers are supported (e.g., GlassFish), Apache Tomcat is the preferred application server.
ConfigurationThis section details the Directory Sever, the Tomcat Server, and the Tomcat Application configuration. Directory Server ConfigurationWith the software configuration complete, it is time to add groups and users to the directory server. Execute the commands as follows: % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pdspers_schema.ldif % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pds_groups.ldif % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pdsops_pers.ldif Tomcat Server ConfigurationType following command to generate a self-signed server certificate: % $JAVA_HOME/bin/keytool -genkey -alias virtualhostname -keyalg RSA \ -keystore /usr/local/tomcat7/.keystore The password you enter in the first password prompt will be the password for the keystore where your server certificate is stored. For the operational system, you may need to purchase a Certificate from a well-known Certificate Authority(CA) such as VeriSign or Thawte. After generating the server certificate, edit the Tomcat's server configuration file ($CATALINA_HOME/conf/server.xml) to have Tomcat server listening on the port 8080. The redirectPort option is the port that will be used when redirecting from http to https. <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> To make Tomcat listen on the port 8443, with an SSL transport, the following needs to be configured in the server.xml file. <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/usr/local/tomcat7/.keystore" keystorePass="password"/> Add an OpenDS realm to the Tomcat Server to authenticate the users with the Directory Server. <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionName="cn=Directory Manager" connectionPassword="password" connectionURL="ldap://pdsdev.jpl.nasa.gov:389" userPattern="uid={0},ou=people,dc=pdsdev,dc=jpl,dc=nasa,dc=gov" roleBase="ou=groups,dc=pdsdev,dc=jpl,dc=nasa,dc=gov" roleName="cn" roleSearch="(uniqueMember={0})"/> To enable Single Sign On feature of the Tomcat server, make sure following element is not commented out. <Valve class="org.apache.catalina.authenticator.SingleSignOn"/> Tomcat Application ConfigurationAdd the security-constraint, role, and login-config elements to your application's web.xml file as shown below. <security-constraint> <web-resource-collection> <web-resource-name>registry-service</web-resource-name> <url-pattern>/*</url-pattern> <http-method>DELETE</http-method> <http-method>POST</http-method> <http-method>PUT</http-method> </web-resource-collection> <auth-constraint> <role-name>PDS_Affiliate</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>OpenDS</realm-name> </login-config> Add the following in the your application's web.xml ($CATALINA_HOME/webapps/yourapplication/WEB-INF/web.xml) in the <security-constraint> tag: <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> This forces a switch from http to https, using the secure protocol. With this configuration, you can create a Tomcat application that will automatically be secured if accessing it at: http://localhost:8080/registry-service/registry/extrinsics You will be automatically redirected to: https://localhost:8443/registry-service/registry/extrinsics
|