Simple web app framework demonstrating how to build a data portal using the Globus platform.
This repository contains two separate server applications. The first, the "Portal," is an example "research portal"
that demonstrates how to authenticate users with Globus Auth, how to make requests against the Globus Transfer API, and how to interact with an HTTPS-enabled Globus Endpoint. All of the Portal code can be found in the portal/ directory.
The second application, the "Service," is an example "resource server" that demonstrates how a research portal can offload tasks to a separate service that has the capability to perform tasks on behalf of users. All of the Service code can be found in the service/ directory.
The Globus Sample Data Portal requires Python 3.6 or newer.
- Visit the Globus Developer Pages to register an App.
- If this is your first time visiting the Developer Pages you'll be asked to create a Project. A Project is a way to group Apps together.
- When registering the App you'll be asked for some information, including the redirect URL and any scopes you will be requesting.
- Redirect URL:
https://localhost:5000/authcallback(note: if using EC2localhostshould be replaced with the IP address of your instance). - Scopes:
urn:globus:auth:scope:transfer.api.globus.org:all,openid,profile,email
- Redirect URL:
- After creating your App the client id and secret can be copied into this project in the following two places:
portal/portal.confin thePORTAL_CLIENT_IDandPORTAL_CLIENT_SECRETproperties.service/service.confwhere thePORTAL_CLIENT_IDis used to validate the access token that the Portal sends to the Service.
- Install python3
git clone https://github.com/globus/globus-sample-data-portalcd globus-sample-data-portalvirtualenv venvsource venv/bin/activatepip install -r requirements.txt
./run_portal.py- point your browser to
https://localhost:5000
./run_service.py- API is located at
https://localhost:5100/api
sudo apt-get updatesudo apt-get install python3-pipsudo pip install virtualenvsudo apt-get install gitgit clone https://github.com/globus/globus-sample-data-portalcd globus-sample-data-portalvirtualenv venvsource venv/bin/activatepip install -r requirements.txt
./run_portal.py- point your browser to
https://localhost:5000
./run_service.py- API is located at
https://localhost:5100/api
- Install Python3 (https://www.python.org/downloads/windows/)
pip install virtualenv- Install git (https://git-scm.com/downloads)
git clone https://github.com/globus/globus-sample-data-portalcd globus-sample-data-portalvirtualenv venvvenv\Scripts\activatepip install -r requirements.txt
python run_portal.py- point your browser to
https://localhost:5000
python run_service.py- API is located at
https://localhost:5100/api
git clone https://github.com/globus/globus-sample-data-portalcd globus-sample-data-portalvirtualenv venvsource venv/bin/activatepip install -r requirements.txtsed -i 's/localhost/0.0.0.0/' run_portal.pysed -i '4,//s/localhost/YOUR_IP/' portal/portal.confecho "SESSION_COOKIE_DOMAIN = 'YOUR_IP'" >> portal/portal.conf
./run_portal.py- point your web browser to
https://YOUR_IP:5000/
./run_service.py- API is located at
https://localhost:5100/api