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

[16]: Implement authorization in Katsu (archived 1st attempt) #193

Draft
wants to merge 9 commits into
base: releases/v15
Choose a base branch
from
2 changes: 1 addition & 1 deletion etc/bento.env
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ BENTOV2_KATSU_DB_CPUS=4

# Katsu
BENTOV2_KATSU_IMAGE=ghcr.io/bento-platform/katsu
BENTOV2_KATSU_VERSION=edge
BENTOV2_KATSU_VERSION=pr-446
BENTOV2_KATSU_VERSION_DEV=${BENTOV2_KATSU_VERSION}-dev
BENTOV2_KATSU_CONTAINER_NAME=${BENTOV2_PREFIX}-katsu
BENTO_KATSU_NETWORK=${BENTOV2_PREFIX}-katsu-net
Expand Down
2 changes: 1 addition & 1 deletion etc/bento_services.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"katsu": {
"service_kind": "metadata",
"url_template": "{BENTO_PORTAL_PUBLIC_URL}/api/{service_kind}",
"url_template": "{BENTO_PUBLIC_URL}/api/{service_kind}",
"repository": "[email protected]:bento-platform/katsu.git"
},
"drs": {
Expand Down
2 changes: 1 addition & 1 deletion lib/aggregation/docker-compose.aggregation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- BENTO_DEBUG=False
- USE_GOHAN=true
- CORS_ORIGINS=${BENTO_CORS_ORIGINS}
- KATSU_URL=${BENTOV2_PORTAL_PUBLIC_URL}/api/metadata/
- KATSU_URL=${BENTOV2_PUBLIC_URL}/api/metadata/
- SERVICE_REGISTRY_URL=${BENTOV2_PUBLIC_URL}/api/service-registry/
- BENTO_AUTHZ_SERVICE_URL
networks:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
location /api/metadata { return 302 https://${BENTOV2_PORTAL_DOMAIN}/api/metadata/; }
location /api/metadata { return 302 https://${BENTOV2_DOMAIN}/api/metadata/; }
location /api/metadata/ {
# Reverse proxy settings
include /gateway/conf/proxy.conf;
include /gateway/conf/proxy_extra.conf;
include /gateway/conf/proxy_private.conf;

# Forward request to Katsu
rewrite ^ $request_uri;
Expand All @@ -13,4 +12,4 @@ location /api/metadata/ {

# Errors
error_log /var/log/bentov2_metadata_errors.log;
}
}
6 changes: 4 additions & 2 deletions lib/katsu/docker-compose.katsu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ services:
environment:
- BENTO_UID
- CHORD_URL=${BENTOV2_PORTAL_PUBLIC_URL}
- CHORD_PERMISSIONS=False # Keep off since we have the proxy handling everything for now
- CHORD_DEBUG=False
- CHORD_METADATA_SUB_PATH
- INTERNAL_PORT=${BENTOV2_KATSU_INTERNAL_PORT}
Expand All @@ -28,7 +27,10 @@ services:
- DJANGO_SETTINGS_MODULE=chord_metadata_service.metadata.settings
- BENTOV2_PORTAL_DOMAIN
# Allow access by container name or localhost for healthchecks:
- KATSU_ALLOWED_HOSTS=${BENTOV2_KATSU_CONTAINER_NAME},localhost
- KATSU_ALLOWED_HOSTS=${BENTOV2_DOMAIN},${BENTOV2_KATSU_CONTAINER_NAME},localhost
# Authz
- BENTO_AUTHZ_ENABLED=True
- BENTO_AUTHZ_SERVICE_URL
# configs:
# - source: chord-metadata-settings
# target: /katsu/metadata/settings.py
Expand Down
2 changes: 1 addition & 1 deletion lib/wes/docker-compose.wes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
# Service URLS
- DRS_URL=${BENTOV2_PUBLIC_URL}/api/drs
- GOHAN_URL=${BENTOV2_PORTAL_PUBLIC_URL}/api/gohan
- KATSU_URL=${BENTOV2_PORTAL_PUBLIC_URL}/api/metadata
- KATSU_URL=${BENTOV2_PUBLIC_URL}/api/metadata
- BENTO_AUTHZ_SERVICE_URL
- SERVICE_REGISTRY_URL=${BENTOV2_PUBLIC_URL}/api/service-registry

Expand Down