Skip to content

Commit

Permalink
hotfix: hardcode "federation" as the listen path for the federation s…
Browse files Browse the repository at this point in the history
…ervice (#816)

* append listen path later

* Update federation

* update docs

* hardcode federation

* Update federation

* FIxup federation URL

---------

Co-authored-by: fnguyen <[email protected]>
  • Loading branch information
daisieh and OrdiNeu authored Oct 18, 2024
1 parent 3e94aed commit 5da2afa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
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

0 comments on commit 5da2afa

Please sign in to comment.