Developers Getting Started With i2b2
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

Configure Security in PHP Proxy

Included in the code distribution is index.php which can act as a simply proxy for use in a PHP-enabled Apache web server. This proxy file requires PHP to be compiled with XML support (default setting in most Linux distributions). Within the PHP file are 2 arrays that are used to restrict all requests from connected web clients to only the IP addresses that the cells are located at.


Array

Description

$WHITELIST  

List of acceptable URL prefixes.  

$BLACKLIST

List of*invalid* URL prefixes.



Examples:

index.php

$WHITELIST = array(
	"http://",
	"http://127.0.0.1:9090/axis2/rest/",
	"http://localhost:9090/axis2/rest/",
	"http://127.0.0.1:7070/i2b2/rest/",
	"http://localhost:7070/i2b2/rest/",
	"http://services.i2b2.org",
	"https://services.i2b2.org"
);


$BLACKLIST = array(
	"http://127.0.0.1:9090/test",
	"http://localhost:9090/test",
	"http://127.0.0.1:7070/test",
	"http://localhost:7070/test"
);


Steps to update the index.php file


WARNING

Make sure you are editing the files in your web server directory and not the ones that reside in YOUR_I2B2_WC_DIR.



1. Go to the web client folder in your web server directory.
Linux Example:   /var/www/html
Windows Example:   C:\inetpub\wwwroot


2. Open the index.php file to edit the existing arrays with information that is relevant to your security policies .
3. Save the changes and close the file.