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

hotfix: hardcode "federation" as the listen path for the federation service #816

Merged
merged 6 commits into from
Oct 18, 2024
Merged
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
2 changes: 1 addition & 1 deletion docs/production-candig.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Example values from UHN which is located in Ontario:
```bash
CANDIG_SITE_LOCATION=UHN # or your site's location
...
FEDERATION_SELF_SERVER="{'id': 'UHN', 'url': '${FEDERATION_SERVICE_URL}/${TYK_FEDERATION_API_LISTEN_PATH}','location': {'name': '${CANDIG_SITE_LOCATION}','province': 'ON','province-code': 'ca-on'}}"
FEDERATION_SELF_SERVER="{'id': 'UHN', 'url': '${FEDERATION_SERVICE_URL}','location': {'name': '${CANDIG_SITE_LOCATION}','province': 'ON','province-code': 'ca-on'}}"
```

## Setting Site Logo
Expand Down
7 changes: 2 additions & 5 deletions etc/env/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,10 @@ FEDERATION_VERSION=v2.1.1
FEDERATION_IP=0.0.0.0
FEDERATION_PORT=4232
FEDERATION_SERVICE_URL=http://${CANDIG_INTERNAL_DOMAIN}:${FEDERATION_PORT}
FEDERATION_PUBLIC_URL=${TYK_LOGIN_TARGET_URL}/${TYK_FEDERATION_API_LISTEN_PATH}
FEDERATION_PUBLIC_URL=${TYK_LOGIN_TARGET_URL}/federation
FEDERATION_PRIVATE_URL=http://federation:${FEDERATION_PORT}
FEDERATION_SERVICES=katsu htsget query
# NOTE: the "define"/"endef" structure is for Make's .env system; python-dotenv does not like it.
# Use the get_env_value method of settings.py if you need to use python-dotenv.
FEDERATION_SELF_SERVER="{'id': 'internal-1', 'url': '${FEDERATION_SERVICE_URL}/${TYK_FEDERATION_API_LISTEN_PATH}','location': {'name': '${CANDIG_SITE_LOCATION}','province': 'ON','province-code': 'ca-on'}}"
FEDERATION_SELF_SERVER="{'id': 'internal-1', 'url': '${TYK_LOGIN_TARGET_URL}','location': {'name': '${CANDIG_SITE_LOCATION}','province': 'ON','province-code': 'ca-on'}}"


# katsu metadata service
Expand Down Expand Up @@ -256,7 +254,6 @@ TYK_VAULT_API_LISTEN_PATH=vault
TYK_FEDERATION_API_ID=91
TYK_FEDERATION_API_SLUG=federation
TYK_FEDERATION_API_TARGET=${FEDERATION_PRIVATE_URL}
TYK_FEDERATION_API_LISTEN_PATH=federation

## api - ingest
TYK_INGEST_API_ID=101
Expand Down
2 changes: 1 addition & 1 deletion etc/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_tyk():
endpoints = [
f"{ENV['CANDIG_ENV']['TYK_HTSGET_API_LISTEN_PATH']}/ga4gh/drs/v1/service-info",
f"{ENV['CANDIG_ENV']['TYK_KATSU_API_LISTEN_PATH']}/v3/service-info",
f"{ENV['CANDIG_ENV']['TYK_FEDERATION_API_LISTEN_PATH']}/v1/service-info",
f"federation/v1/service-info",
f"{ENV['CANDIG_ENV']['TYK_OPA_API_LISTEN_PATH']}/v1/data/service/service-info",
f"{ENV['CANDIG_ENV']['TYK_QUERY_API_LISTEN_PATH']}/service-info",
]
Expand Down
2 changes: 1 addition & 1 deletion lib/tyk/configuration_templates/api_federation.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"target_url": "${TYK_FEDERATION_API_TARGET}",
"strip_listen_path": false,
"disable_strip_slash": false,
"listen_path": "/${TYK_FEDERATION_API_LISTEN_PATH}",
"listen_path": "/federation",
"transport": {
"ssl_insecure_skip_verify": false,
"ssl_ciphers": [],
Expand Down