Skip to content

Commit

Permalink
add rapid connect for AAF
Browse files Browse the repository at this point in the history
  • Loading branch information
dean-taylor committed Nov 7, 2017
1 parent 44774e0 commit 95d4de0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/env.*
*.swp
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ services:
django:
build: .
ports:
- "8000:8000"
- '8000:8000'
environment:
- DJANGO_DEBUG=True
- DJANGO_ALLOWED_HOSTS=['localhost','sci-nix-029']
- DJANGO_EMAIL_SUBJECT_PREFIX="[MyTardisUWA] "
- DJANGO_EMAIL_SUBJECT_PREFIX="[MyTardisUWA]"
- DJANGO_DATETIME_FORMAT='jS F Y H:i'
- DJANGO_DATE_FORMAT='jS F Y'
- GUNICORN_WORKER_CLASS=gevent
- MYTARDIS_SITE_TITLE=MyTardisUWA
- MYTARDIS_RAPID_CONNECT_ENABLED=True
env_file:
- env.DJANGO_EMAIL
- env.MYTARDIS_LDAP
- env.RAPID_CONNECT_CONFIG
- MYTARDIS_VERSION
links:
- db
Expand Down
13 changes: 13 additions & 0 deletions env_template.RAPID_CONNECT_CONFIG
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Registration URL: https://rapid.aaf.edu.au/registration
# Registration URL (Testing): https://rapid.test.aaf.edu.au/registration
# Organisation: The University of Western Australia
# Name: MyTardisUWA
# URL: https://mytardis.science.uwa.edu.au/rc
# Callback URL: https://mytardis.science.uwa.edu.au/rc/auth/jwt
# Secret: LC_CTYPE=C tr -dc '[[:alnum:][:punct:]]' < /dev/urandom | head -c32 ;echo

RAPID_CONNECT_SECRET='*** Generate with bash code above ***'
RAPID_CONNECT_AUTHNREQUEST_URL='*** Provided by AAF after registration (approx. eta: 2 days) ***'
RAPID_CONNECT_ISS='https://rapid.test.aaf.edu.au'
# RAPID_CONNECT_ISS='https://rapid.aaf.edu.au'
RAPID_CONNECT_AUD='http://************/rc'
6 changes: 6 additions & 0 deletions settings.d/rapid_connect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RAPID_CONNECT_ENABLED = False
RAPID_CONNECT_CONFIG = {}
RAPID_CONNECT_CONFIG['secret'] = os.getenv(RAPID_CONNECT_SECRET,'***Secret***')
RAPID_CONNECT_CONFIG['authnrequest_url'] = os.getenv(RAPID_CONNECT_AUTHNREQUEST_URL,'***UniqueURL***')
RAPID_CONNECT_CONFIG['iss'] = os.getenv(RAPID_CONNECT_ISS,'https://rapid.test.aaf.edu.au')
RAPID_CONNECT_CONFIG['aud'] = os.getenv(RAPID_CONNECT_AUD,'http://************/rc')

0 comments on commit 95d4de0

Please sign in to comment.