View Source

{include:Whydah development environment installation}


h3. SecurityTokenService - A Quick glance

# Download SecurityTokenService.jar [Download|http://mvnrepo.cantara.no/content/repositories/releases/net/whydah/token/SecurityTokenService/]
# Download propertyfile [here|https://raw.githubusercontent.com/cantara/Whydah-SecurityTokenService/master/securitytokenservice.DEV.properties] to same location
# Run *java -DIAM_MODE=DEV -DIAM_CONFIG=securitytokenservice.DEV.properties -jar SSOLoginService.jar*
# Point you browser at [http://localhost:9998/tokenservice/]
# Test the operations in the [GUI|https://wiki.altrancloud.com/download/attachments/37388812/STS-testweb.png] (test API driver)
## NOTE: in this mode, you can create and adjust test-data/users/usertokens by creating files in the same directory with naming convention _<my_test_username>.token_ ( See [Example|https://raw.githubusercontent.com/altran/Whydah-SecurityTokenService/master/t_test@hotmail.com.token])



-----

h3. Set up test environment in a cloud

_Tested on Ubuntu 13.04 on a virual machine in Azure and on Ubuntu 13.10 on a virtual machine in Amazon cloud services_

{note}
This installs all Whydah components on the same machine.
Preferably you should run the services on different machines in a production environment.
See this documentation (link to be inserted) to understand why.
{note}

Get yourself a linux server.
Connect to the server, for windows users the [Putty|http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html] client is a suggestion.

*Installation of 3rd party software*
{code}
sudo apt-get install openjdk-7-jdk
sudo apt-get install openjdk-7-jre
sudo apt-get install apache2
{code}

*Configure Apache HTTP Proxy*

Put the following code in a file called 'whydah.conf' at /etc/apache2/sites-available/
{code}
<VirtualHost *:80>
ServerName "your uri".cloudapp.net
ServerAlias "your uri"
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPa<Virtualss /sso http://localhost:9997/sso
ProxyPass /uib http://localhost:9995/uib
ProxyPass /tokenservice http://localhost:9998/tokenservice
ProxyPass /useradmin http://localhost:9996/useradmin
ProxyPass /test http://localhost:9990/test/
</VirtualHost>
{code}


+Install required mods:+
{code}
sudo a2enmod proxy
sudo a2enmod proxy_http
{code}

+Disable default site:+
{code}
sudo a2dissite 000-default
{code}

+Enable your configuration:+
{code}
sudo a2ensite whydah
sudo service apache2 restart
{code}

*Create users for the different services*
{code}
sudo adduser SSOLoginService
sudo adduser SecurityTokenService
sudo adduser UserIdentityBackend
sudo adduser UserAdministration
{code}


*Install UserIdentityBackend* [https://github.com/Altran/Whydah-UserIdentityBackend] (For scripts)
{code}
# As the correct user
sudo su - UserIdentityBackend

# Download and update configuration file
wget https://raw.github.com/altran/Whydah-UserIdentityBackend/master/src/main/resources/useridentitybackend.PROD.properties
nano useridentitybackend.PROD.properties

# Download startup-script for the service
wget https://raw.github.com/altran/Whydah-UserIdentityBackend/master/start-service.sh
chmod 550 start_service.sh

# Start the service
./start_service.sh

# verify the log
more nohup.out
{code}

*Install SecurityTokenService* [https://github.com/Altran/Whydah-SecurityTokenService] (For scripts)
{code}
# As the correct user
sudo su - SecurityTokenService

# Download and update configuration file
wget https://raw.github.com/altran/Whydah-SecurityTokenService/master/src/main/resources/securitytokenservice.PROD.properties
nano securitytokenservice.PROD.properties

# Download startup-script for the service
wget https://raw.github.com/altran/Whydah-SecurityTokenService/master/start-service.sh
chmod 550 start_service.sh

# Start the service
./start_service.sh

# verify the log
more nohup.out
{code}


*Install SSOLoginService* [https://github.com/Altran/Whydah-SSOLoginService] (For scripts)
{code}
# As the correct user
sudo su - SSOLoginService

# Download and update configuration file
wget https://raw.github.com/altran/Whydah-SSOLoginService/master/src/main/resources/ssologinservice.PROD.properties
nano ssologinservice.PROD.properties

# Download startup-script for the service
wget https://raw.github.com/altran/Whydah-SSOLoginService/master/start-service.sh
chmod 550 start_service.sh

# Start the service
./start_service.sh

# verify the log
more nohup.out
{code}

*Install UserAdministration* [https://github.com/Altran/Whydah-UserAdministration] (For scripts)
{code}
# As the correct user
sudo su - UserAdministration

# Download and update configuration file
wget https://raw.github.com/altran/Whydah-UserAdministration/master/src/main/resources/useradministration.PROD.properties
nano useradministration.PROD.properties

# Download startup-script for the service
wget https://raw.github.com/altran/Whydah-UserAdministration/master/start-service.sh
chmod 550 start_service.sh

# Start the service
./start_service.sh

# verify the log
more nohup.out
{code}

-----

*Test webapp*
There is a project named Whydah-TestWebApp that shows an implementation of a website secured by Whydah.
The project can be downloaded at: http://mvnrepo.cantara.no/service/local/artifact/maven/redirect?r=altran-snapshots&g=net.whydah.sso.web&a=Whydah-TestWebApp&v=LATEST&p=jar

{code}
wget -O TestWebApp.jar "http://mvnrepo.cantara.no/service/local/artifact/maven/redirect?r=altran-snapshots&g=net.whydah.sso.web&a=Whydah-TestWebApp&v=LATEST&p=jar"
{code}