Authentication & Authorization

Authentication & Authorization

Authentication & Authorization for Sprint 2

This section reflects a revision of the original problem and it's investigation, captured below for historical purposes.

Goal:

Provide authentication and authorization for users of the Platform, who may come in (1) through the GWT web UI or (2) from the R command line.

Approach:

Use two services, an 'authentication' service that verifies user credentials, and a repository service that provides access to Platform resources.  Both systems have the same user-ids, but only the authentication service knows about passwords.

Authentication for the Platform

  1. Set-up Crowd running HTTPS.

  2. Add users to a directory linked to Crowd, or to the Crowd database itself.

  3. Add an authentication service, accessed via HTTPS.  This service ‘talks’ to Crowd via its REST API over HTTP.  The methods are described here:

http://sagebionetworks.jira.com/wiki/display/PLFM/Authentication+and+Authorization+API

  1.  Add a filter that applies to all Repository Services calls, which validates the token, passed in the header of the request

Sequence of events:

Authorization for the Platform

High Level Architecture

The service for creating and updating users will both talk to Crowd (via HTTPS) and to the persistence layer via its DAO interface.

Crowd on Amazon Elastic Compute Cloud

AWS notes:
- created an 'm1.small'

- created an EBS volume in the same zone as the server, 'us-east-1c'

Followed instructions to attach volume:http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?using-ebs.html

My server is in

made new volume, in the right 'zone', vol-e47e198c

In 'attach volume' dialog, specified '/dev/sdh'.  Nicole's advice is:

 in the AWS console choose a mount point of /dev/sdh
 log onto the box and run
 sudo  mount /dev/xvdh /mnt/myNewExternalDrive

 (The dialog says "Linux Devices: /dev/sdf through /dev/sdp")

In PuTTY (following http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?using-ebs.html)

yes | sudo /sbin/mkfs -t ext3 /dev/sdh
sudo mkdir /mnt/ebs
sudo mount /dev/sdh /mnt/ebs

downloaded
 atlassian-crowd-2.1.1.tar.gz
i.e. the Unix distribution and then uploaded it to
/home/ec2-user/
It takes many minutes to upload.
(I first tried uploading directly to /mnt/ebs but it didn't work.)

sudo cp'd the file to /mnt/ebs

Nicole's advice:
sudo chown -R ec2-user:ec2-user ebs/

gzip -d atlassian-crowd-2.1.1.tar.gz
tar -xvf atlassian-crowd-2.1.1.tar

so the file structure is now:
/mnt/ebs/atlassian-crowd-2.1.1

set crowd.home in the crowd-init.properties file to
/mnt/ebs/crowd-home

** will use the evaluation database for now **

cd'd to
/mnt/ebs/atlassian-crowd-2.1.1
and typed
./start_crowd.sh

it seems to have started up

Also note: I haven't enabled HTTPS yet!
Need to go through these instructions:
http://confluence.atlassian.com/display/CROWD/Configuring+Crowd+to+Work+with+SSL

Now go to
http://ec2-50-17-14-80.compute-1.amazonaws.com:8095

It works!

I then went back to the EC2 console and STOPPED the server
i-c31579af

Note: I did not run the Crowd shut down script first!