/cas-grouper-oauth

A proof of concept application to show how CAS and Grouper can work together with OAuth to provide authorization services

Primary LanguageShell

CAS Grouper OAuth

Mac OS X 10.9

Installation and Initial Testing

Note: If you check out the git repository, run ./gradlew downloadGrouper from the repository root and skip to step 5. You will also have to change some paths to match the directory you cloned into.

  1. Install JDK 7 from Oracle. Follow the instructions at that site to download and install Java SE Development Kit 7u45.

  2. Download the tarball from Google Drive.

  3. Choose a location to install the package. For this demo, ~/Applications will be used.

  4. Unpack the tarball

    mkdir ~/Applications
    cd ~/Applications
    tar xvfj ~/Downloads/cas-grouper.tar.bz2

Note: If the directory ~/Applications already exists, you might get an error

  1. set APP_HOME and JAVA_HOME

    cd ~/Applications/cas-grouper
    export APP_HOME=`pwd`
    export JAVA_HOME=`/usr/libexec/java_home`
  2. Install Grouper

    cd $APP_HOME/grouper
    java -jar grouperInstaller.jar

    Accept the defaults, when available.

    Notes:

    • You will get exceptions if you choose to run dos2unix and it's not installed; You can ignore these.
    • When asked, "Do you want to init the database (delete all existing grouper tables, add new ones)," choose t.
    • When prompted, "Enter the GrouperSystem password," use letmein7.
  3. Check to make sure everything installed properly by visiting the (Grouper Site)[http://localhost:8080/grouper]. You should be able to log in with username GrouperSystem and password letmein7.

  4. Build the application

    cd $APP_HOME
    ./gradlew clean build
  5. Load permissions sample data into Grouper.

    cd $APP_HOME/grouper
    export GROUPER_HOME=$APP_HOME/grouper/grouper.apiBinary-2.1.5
    $GROUPER_HOME/bin/gsh sample.gsh
  6. Open 2 terminals to run the CAS server and the sample application

    • For CAS:

       cd $APP_HOME/cas-grouper
       ./gradlew :cas:run
    • For sample resource:

       cd $APP_HOME/cas-grouper
       ./gradlew :resource:run
  7. Test initial configuration of App by going to (resource)[http://localhost:5050/resources/bill]. Click the link to get key. Log in with username jj and password jj. Click allow. You should be redirected back to the application with a message saying the now logged in user doesn't have permission.

  8. Open a new terminal and add permissions to the resource to the user

    cd ~/Applications/cas-grouper/grouper
    export GROUPER_HOME=~/Applications/cas-grouper/grouper/grouper.apiBinary-2.1.5
    $GROUPER_HOME/bin/gsh sample-read.gsh
  9. Test read permission of App by going to (resource)[http://localhost:5050/resources/bill]. Click the link to get key. Log in with username jj and password jj. Click allow. You should be redirected back to the application with a message saying the now logged in user has the read permission.

Stopping and starting

Database

Start:

$GROUPER_HOME/db.sh start

Stop:

$GROUPER_HOME/db.sh stop

Grouper Web Application

Start:

$GROUPER_HOME/apache-tomcat-6.0.35/bin/catalina.sh start

Stop:

$GROUPER_HOME/apache-tomcat-6.0.35/bin/catalina.sh stop

CAS Server

This should be run in its own terminal

Start:

cd $APP_HOME
./gradlew -q :cas:run

Stop: ctrl-c in the terminal

Resource

This should be run in its own termial

Start:

cd $APP_HOME
./gradlew -q :resource:run

Stop: ctrl-c in the terminal

Windows

To be written

Linux

To be written