Skip to content

Commit 5c0f82c

Browse files
authored
Add allowlist at container runtime (#149)
1 parent dce9c97 commit 5c0f82c

4 files changed

Lines changed: 8 additions & 1239 deletions

File tree

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ LABEL org.opencontainers.image.source="https://github.com/wbstack/queryservice"
55
COPY ./entrypoint.sh /entrypoint.sh
66
RUN chmod +x /entrypoint.sh
77

8-
# TODO this should probably just be added at runtime as configuration....
9-
COPY ./allowlist.txt /wdqs/allowlist.txt
10-
118
CMD /wdqs/runBlazegraph.sh

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# queryservice
1+
# Query Service
22
> ℹ️ Issues for this repository are tracked on [Phabricator](https://phabricator.wikimedia.org/project/board/5563/) - ([Click here to open a new one](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?tags=wikibase_cloud
33
))
44

55
## Allowlist
6-
The allowlist determines to which queryservices federated queries can be made.
7-
This list should contain at least the services that are allowed on the wikidata
8-
queryservice and any Wikibase Cloud hosted Wikibases
96

10-
To update the list to include new Wikibase Cloud wikis one can run the following:
11-
```lang=bash
12-
kubectl exec -it deployment/api-app-backend -- php artisan tinker --execute '\App\Wiki::all()->pluck("domain")->each(function ($i, $k) { echo "https://".$i."/query/sparql".PHP_EOL; })' > allowlist.txt
13-
cat allowlist-static.txt >> allowlist.txt
7+
The allowlist determines which query services can be used for federated queries. This list is provided at runtime by mounting a newline-delimited text file of endpoints to `/wdqs/allowlist.txt`. It should include all instances hosted by Wikibase Cloud.
8+
9+
Example for `allowlist.txt`:
10+
```
11+
https://query.wikidata.org/bigdata/namespace/dcatap/sparql
12+
https://query.wikidata.org/bigdata/namespace/wdq/sparql
13+
https://query.wikidata.org/sparql
1414
```

allowlist-static.txt

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)