Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: update stack with latest rest-source authorizer components #223

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dcompose-stack/radar-cp-hadoop-stack/etc/env.template
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ ENABLE_OPTIONAL_SERVICES=false
FITBIT_API_CLIENT_ID=fitbit-client
FITBIT_API_CLIENT_SECRET=fitbit-secret
NGINX_PROXIES=
RADAR_SCHEMAS_VERSION=0.5.1
RADAR_SCHEMAS_VERSION=0.5.8
REST_AUTHORIZER_BACKEND_SECRET=secret
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ THINC-IT;res_ManagementPortal,res_gateway;;MEASUREMENT.CREATE,SUBJECT.UPDATE,SUB
radar_restapi;res_ManagementPortal;secret;SUBJECT.READ,PROJECT.READ,SOURCE.READ,SOURCETYPE.READ,SOURCEDATA.READ;client_credentials;;;43200;259200;{};
radar_redcap_integrator;res_ManagementPortal;secret;PROJECT.READ,SUBJECT.CREATE,SUBJECT.READ,SUBJECT.UPDATE;client_credentials;;;43200;259200;{};
radar_dashboard;res_ManagementPortal,res_RestApi;;SUBJECT.READ,PROJECT.READ,SOURCE.READ,SOURCETYPE.READ,MEASUREMENT.READ;refresh_token,authorization_code;;;43200;259200;{};
radar_rest_sources_auth_backend;res_ManagementPortal;REST_AUTHORIZER_BACKEND_SECRET;SUBJECT.READ,PROJECT.READ;client_credentials;;;43200;259200;{};
radar_rest_sources_authorizer;res_ManagementPortal;;SOURCE.READ,SOURCE.UPDATE,SUBJECT.UPDATE,PROJECT.READ,SUBJECT.READ;authorization_code;https://server-url/rest-sources/authorizer/login;3600;78000;;
17 changes: 15 additions & 2 deletions dcompose-stack/radar-cp-hadoop-stack/optional-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ services:
retries: 3

radar-rest-sources-backend:
image: radarbase/radar-rest-source-auth-backend:1.0.0
image: radarbase/radar-rest-source-auth-backend:1.3.0
depends_on:
- radarbase-postgresql
networks:
Expand All @@ -86,6 +86,10 @@ services:
- SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
- SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
- REST_SOURCE_AUTHORIZER_SOURCE_CLIENTS_FILE_PATH=app-includes/rest_source_clients_configs.yml
- REST_SOURCE_AUTHORIZER_VALIDATOR=managementportal
- REST_SOURCE_AUTHORIZER_MANAGEMENT_PORTAL_BASE_URL=http://managementportal-app:8080/managementportal/
- REST_SOURCE_AUTHORIZER_MANAGEMENT_PORTAL_OAUTH_CLIENT_ID=radar_rest_sources_auth_backend
- REST_SOURCE_AUTHORIZER_MANAGEMENT_PORTAL_OAUTH_CLIENT_SECRET=${REST_AUTHORIZER_BACKEND_SECRET}
- APP_SLEEP=10 # gives time for the database to boot before the application
volumes:
- ./etc/rest-source-authorizer/:/app-includes/
Expand All @@ -96,12 +100,21 @@ services:
retries: 3

radar-rest-sources-authorizer:
image: radarbase/radar-rest-source-authorizer:1.0.0
image: radarbase/radar-rest-source-authorizer:1.3.0
networks:
- api
depends_on:
- radar-rest-sources-backend
- radarbase-postgresql
environment:
BASE_HREF: "/rest-sources/authorizer/"
BACKEND_BASE_URL: https://${SERVER_NAME}/rest-sources/backend
VALIDATE: "true"
AUTH_GRANT_TYPE: "authorization_code"
AUTH_CLIENT_ID: "radar_rest_sources_authorizer"
AUTH_CLIENT_SECRET: ""
AUTH_CALLBACK_URL: https://${SERVER_NAME}/rest-sources/authorizer/login
AUTH_URI: https://${SERVER_NAME}/managementportal/oauth
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:80"]
interval: 1m30s
Expand Down