Author: Terry Fleury (tfleury@ncsa.uiuc.edu) Last Update: October 3, 2006
yum -y install ntp chkconfig initscripts
/sbin/chkconfig ntpd on /sbin/service ntpd start
yum -y install mysql-devel openssl-devel pam-devel
yum -y install gcc-c++
cd /tmp wget http://www-unix.globus.org/ftppub/gt4/4.0/4.0.3/installers/src/gt4.0.3-all-source-installer.tar.bz2 tar xvjf gt4.0.3-all-source-installer.tar.bz2
mkdir -p /usr/local/globus-4.0.3 export GLOBUS_LOCATION=/usr/local/globus-4.0.3
export GLOBUS_LOCATION=/usr/local/globus-4.0.3 export PATH=$PATH:$GLOBUS_LOCATION/bin
cd /tmp/gt4.0.3-all-source-installer ./configure --prefix=$GLOBUS_LOCATION make gsi-myproxy make install
$GLOBUS_LOCATION/sbin/gpt-query globus_gssapi_gsi 2 packages were found in /usr/local/globus-4.0.3 that matched your query: packages found that matched your query globus_gssapi_gsi-gcc32dbg-dev pkg version: 4.9.0 globus_gssapi_gsi-gcc32dbg-rtl pkg version: 4.9.0
$GLOBUS_LOCATION/sbin/gpt-uninstall myproxy
cd /tmp wget ftp://ftp.ncsa.uiuc.edu/aces/myproxy/myproxy-3.7.tar.gz $GLOBUS_LOCATION/sbin/gpt-build -force -verbose myproxy-3.7.tar.gz gcc32dbg
$GLOBUS_LOCATION/setup/globus/setup-simple-ca WARNING: GPT_LOCATION not set, assuming: GPT_LOCATION=/usr/local/globus-4.0.3 C e r t i f i c a t e A u t h o r i t y S e t u p This script will setup a Certificate Authority for signing Globus users certificates. It will also generate a simple CA package that can be distributed to the users of the CA. The CA information about the certificates it distributes will be kept in: /root/.globus/simpleCA/ The unique subject name for this CA is: cn=Globus Simple CA, ou=simpleCA-yourserver.com, ou=GlobusTest, o=Grid Do you want to keep this as the CA subject (y/n) [y]:n Enter a unique subject name for this CA:CN=MAEviz Simple CA, C=US, O=myproxyserver, OU=MAEviz Enter the email of the CA (this is the email where certificate requests will be sent to be signed by the CA):maeviz@ncsa.uiuc.edu The CA certificate has an expiration date. Keep in mind that once the CA certificate has expired, all the certificates signed by that CA become invalid. A CA should regenerate the CA certificate and start re-issuing ca-setup packages before the actual CA certificate expires. This can be done by re-running this setup script. Enter the number of DAYS the CA certificate should last before it expires. [default: 5 years (1825 days)]:(hit <ENTER> to accept default) Enter PEM pass phrase:(enter password, not echoed) Verifying - Enter PEM pass phrase:(enter password, not echoed) creating CA config package...done. A self-signed certificate has been generated for the Certificate Authority with the subject: /C=US/O=myproxyserver/OU=MAEviz/CN=MAEviz Simple CA If this is invalid, rerun this script /usr/local/globus-4.0.3/setup/globus/setup-simple-ca and enter the appropriate fields. ------------------------------------------------------------------- The private key of the CA is stored in /root/.globus/simpleCA//private/cakey.pem The public CA certificate is stored in /root/.globus/simpleCA//cacert.pem The distribution package built for this CA is stored in /root/.globus/simpleCA//globus_simple_ca_84c59fba_setup-0.19.tar.gz This file must be distributed to any host wishing to request certificates from this CA. CA setup complete. The following commands will now be run to setup the security configuration files for this CA: $GLOBUS_LOCATION/sbin/gpt-build /root/.globus/simpleCA//globus_simple_ca_84c59fba_setup-0.19.tar.gz $GLOBUS_LOCATION/sbin/gpt-postinstall ------------------------------------------------------------------- setup-ssl-utils: Configuring ssl-utils package Running setup-ssl-utils-sh-scripts... *************************************************************************** Note: To complete setup of the GSI software you need to run the following script as root to configure your security configuration directory: /usr/local/globus-4.0.3/setup/globus_simple_ca_84c59fba_setup/setup-gsi For further information on using the setup-gsi script, use the -help option. The -default option sets this security configuration to be the default, and -nonroot can be used on systems where root access is not available. *************************************************************************** setup-ssl-utils: Complete
$GLOBUS_LOCATION/setup/globus_simple_ca_84c59fba_setup/setup-gsi -default
grid-cert-request -host 'hostname'
cd /etc/grid-security grid-ca-sign -in hostcert_request.pem -out hostcert.pem
cd /tmp wget http://security.ncsa.uiuc.edu/research/wssec/gsihttps/pam_mysql_sakai.tar.gz tar xvzf pam_mysql_sakai.tar.gz cd pam_mysql_sakai ./configure --with-openssl make cp .libs/pam_mysql.so /lib/security/pam_mysql_sakai.so
#%PAM-1.0 auth required pam_mysql_sakai.so \ user=dbuser passwd=dbpasswd host=sakai.server.host.com db=sakaidb \ table=SAKAI_USER usercolumn=USER_ID passwdcolumn=PW statcolumn=0 \ crypt=b64md5 account required pam_mysql_sakai.so \ user=dbuser passwd=dbpasswd host=sakai.server.host.com db=sakaidb \ table=SAKAI_USER usercolumn=USER_ID passwdcolumn=PW statcolumn=0 \ crypt=b64md5
mysql --user=root --password=mysqlrootpassword mysql> GRANT SELECT ON sakaidb.* TO 'dbuser'@'myproxy.server.host.com' IDENTIFIED BY 'dbpasswd'; Query OK, 0 rows affected (0.16 sec) mysql> \q
cp $GLOBUS_LOCATION/share/myproxy/myproxy-server.config /etc/ chmod 600 /etc/myproxy-server.config
accepted_credentials "*" authorized_retrievers "*" default_retrievers "*" authorized_renewers "*" default_renewers "none" authorized_key_retrievers "*" default_key_retrievers "none" trusted_retrievers "*" default_trusted_retrievers "none" pam "sufficient" certificate_issuer_cert /root/.globus/simpleCA/cacert.pem certificate_issuer_key /root/.globus/simpleCA/private/cakey.pem certificate_issuer_key_passphrase "simpleCApasswd" certificate_serialfile /root/.globus/simpleCA/serial certificate_mapapp /etc/grid-security/mapper.sh accepted_credentials_mapapp /etc/grid-security/accepter.sh check_multiple_credentials true
#!/bin/sh username=$1 if [ X"$username" = X ]; then # no username given exit 1 fi echo "/C=US/O=myproxyserver/OU=MAEviz/CN=${username}" exit 0
#!/bin/sh if [ $# -ne 2 ]; then # need 2 command line arguments exit 1 fi subjectdn=$1 username=$2 if [ "${subjectdn}" != "/C=US/O=myproxyserver/OU=MAEviz/CN=${username}" ]; then # invalid mapping of subjectDN and username exit 1 fi exit 0
chmod 755 /etc/grid-security/mapper.sh /etc/grid-security/accepter.sh
cp $GLOBUS_LOCATION/share/myproxy/etc.init.d.myproxy /etc/init.d/myproxy chmod 755 /etc/init.d/myproxy chkconfig --add myproxy
GLOBUS_LOCATION="/usr/local/globus-4.0.3"
service myproxy start
/etc/grid-security/certificates/84c59fba.0 /etc/grid-security/certificates/84c59fba.signing_policy
mkdir -p ~/.globus/certificates cp 84c59fba.* ~/.globus/certificates/
mkdir %HOMEPATH%\.globus\certificates copy 84c59fba.* %HOMEPATH%\.globus\certificates\
mkdir -p /etc/grid-security/certificates cp 84c59fba.* /etc/grid-security/certificates/
myproxy-logon -s myproxy.server.host.com -l sakaiusername -o cred1 Enter MyProxy pass phrase: (enter sakaipassword, not echoed) A credential has been received for user sakaiusername in cred1. myproxy-init -s myproxy.server.host.com -l sakaiusername -C cred1 -y cred1 -c 0 -a -k cred1 Your identity: /C=US/O=myproxyserver/OU=MAEviz/CN=sakaiusername Creating proxy ......................................................... Done Proxy Verify OK Your proxy is valid until: Sat Sep 30 01:54:23 2006 Enter MyProxy pass phrase:(enter (NEW)SessionPassword, not echoed) Verifying - Enter MyProxy pass phrase:(re-enter SessionPassword, not echoed) A proxy valid for 11 hours (0.5 days) for user sakaiusername now exists on myproxy.server.host.com. myproxy-logon -s myproxy.server.host.com -l sakaiusername -o cred2 Enter MyProxy pass phrase: (enter SessionPassword, not echoed) A credential has been received for user sakaiusername in cred2.
openssl x509 -noout -text -in cred1
cd /tmp wget http://security.ncsa.uiuc.edu/research/wssec/gsihttps/SSOUtils.java wget http://www-unix.globus.org/ftppub/gt4/4.0/4.0.3/ws-core/bin/ws-core-4.0.3-bin.tar.gz wget http://apache.oregonstate.edu/jakarta/commons/lang/binaries/commons-lang-2.1.tar.gz tar xvzf ws-core-4.0.3-bin.tar.gz tar xvzf commons-lang-2.1.tar.gz mkdir -p edu/uiuc/ncsa/myproxy mv SSOUtils.java edu/uiuc/ncsa/myproxy/ export CLASSPATH=.:\ /tmp/ws-core-4.0.3/lib/cog-jglobus.jar:\ /tmp/ws-core-4.0.3/lib/log4j-1.2.8.jar:\ /tmp/ws-core-4.0.3/lib/cryptix32.jar:\ /tmp/ws-core-4.0.3/lib/cryptix-asn1.jar:\ /tmp/ws-core-4.0.3/lib/puretls.jar:\ /tmp/ws-core-4.0.3/lib/jce-jdk13-125.jar:\ /tmp/commons-lang-2.1/commons-lang-2.1.jar javac edu/uiuc/ncsa/myproxy/SSOUtils.java
java edu.uiuc.ncsa.myproxy.SSOUtils sakaiusername sakaipassword myproxy.server.host.com