Skip to content
Snippets Groups Projects
Commit 6b0bbac7 authored by Martin Weise's avatar Martin Weise
Browse files

Dev

parent 893c3ab1
No related branches found
No related tags found
3 merge requests!288Master,!286Master,!285Dev
#!/bin/bash
declare -A services
#services[1080]=upload
services[4000]=search
services[5000]=analyse
services[9093]=data
services[9099]=metadata
services[3305]=sidecar
rm -f ./tmp.yaml
mkdir -p ./site/swagger
touch ./tmp.yaml
# -> build paths: map
for key in "${!services[@]}"; do
cat .docs/.swagger/api-${services[$key]}.yaml | yq .paths >> ./tmp.yaml
done
# -> merge with api.base.yaml into final api.yaml
yq ".paths *= load(\"tmp.yaml\")" .docs/.swagger/api.base.yaml > .docs/.swagger/api.yaml
...@@ -11,10 +11,9 @@ author: Martin Weise ...@@ -11,10 +11,9 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/data-db-sidecar:__APPVERSION__`](https://hub.docker.com/r/dbrepo/data-db-sidecar) Image: [`dbrepo/data-db-sidecar:1.4.4`](https://hub.docker.com/r/dbrepo/data-db-sidecar)
* Ports: 3305/tcp * Ports: 8080/tcp
* Swagger UI: `http://<hostname>:1080/swagger-ui/` <a href="../swagger/sidecar" target="_blank">:fontawesome-solid-square-up-right: view online</a>
## Overview ## Overview
......
...@@ -5,7 +5,7 @@ author: Martin Weise ...@@ -5,7 +5,7 @@ author: Martin Weise
# Overview # Overview
We developed a Python Library for communicating with DBRepo from e.g. Jupyter Notebooks. See We developed a Python Library for communicating with DBRepo from e.g. Jupyter Notebooks. See
the [Python Library](./usage-python) page for more details. the [Python Library](./open-api) page for more details.
We give usage examples of the most important use-cases we identified. We give usage examples of the most important use-cases we identified.
...@@ -34,7 +34,7 @@ A user wants to create an account in DBRepo. ...@@ -34,7 +34,7 @@ A user wants to create an account in DBRepo.
that your administrator has assigned. that your administrator has assigned.
<figure markdown> <figure markdown>
![Create user account](images/screenshots/create-account-step-1.png){ .img-border } ![Create user account](../images/screenshots/create-account-step-1.png){ .img-border }
<figcaption>Figure 1: Create user account.</figcaption> <figcaption>Figure 1: Create user account.</figcaption>
</figure> </figure>
...@@ -44,7 +44,7 @@ A user wants to create an account in DBRepo. ...@@ -44,7 +44,7 @@ A user wants to create an account in DBRepo.
authenticated with DBRepo in Figure 2. authenticated with DBRepo in Figure 2.
<figure markdown> <figure markdown>
![Create user account](images/screenshots/create-account-step-2.png){ .img-border } ![Create user account](../images/screenshots/create-account-step-2.png){ .img-border }
<figcaption>Figure 2: Login to the user account.</figcaption> <figcaption>Figure 2: Login to the user account.</figcaption>
</figure> </figure>
...@@ -54,7 +54,7 @@ A user wants to create an account in DBRepo. ...@@ -54,7 +54,7 @@ A user wants to create an account in DBRepo.
identically in field :material-numeric-4-circle-outline:. identically in field :material-numeric-4-circle-outline:.
<figure markdown> <figure markdown>
![Change user account password](images/screenshots/create-account-step-3.png){ .img-border } ![Change user account password](../images/screenshots/create-account-step-3.png){ .img-border }
<figcaption>Figure 3: Change user account password.</figcaption> <figcaption>Figure 3: Change user account password.</figcaption>
</figure> </figure>
...@@ -134,7 +134,7 @@ A user wants to create a database in DBRepo. ...@@ -134,7 +134,7 @@ A user wants to create a database in DBRepo.
Login and press the ":material-plus: DATABASE" button on the top right :material-numeric-1-circle-outline: as seen in Figure 4. Login and press the ":material-plus: DATABASE" button on the top right :material-numeric-1-circle-outline: as seen in Figure 4.
<figure markdown> <figure markdown>
![Open the create database dialog](images/screenshots/create-database-step-1.png){ .img-border } ![Open the create database dialog](../images/screenshots/create-database-step-1.png){ .img-border }
<figcaption>Figure 4: Open the create database dialog.</figcaption> <figcaption>Figure 4: Open the create database dialog.</figcaption>
</figure> </figure>
...@@ -143,14 +143,14 @@ A user wants to create a database in DBRepo. ...@@ -143,14 +143,14 @@ A user wants to create a database in DBRepo.
finally create the database, press "Create" :material-numeric-3-circle-outline: as seen in Figure 5. finally create the database, press "Create" :material-numeric-3-circle-outline: as seen in Figure 5.
<figure markdown> <figure markdown>
![Create database form](images/screenshots/create-database-step-2.png){ .img-border } ![Create database form](../images/screenshots/create-database-step-2.png){ .img-border }
<figcaption>Figure 5: Create database form.</figcaption> <figcaption>Figure 5: Create database form.</figcaption>
</figure> </figure>
After a few seconds, you can see the created database in the "Recent Databases" list, as seen in Figure 6. After a few seconds, you can see the created database in the "Recent Databases" list, as seen in Figure 6.
<figure markdown> <figure markdown>
![View the created database](images/screenshots/create-database-step-3.png){ .img-border } ![View the created database](../images/screenshots/create-database-step-3.png){ .img-border }
<figcaption>Figure 6: View the created database.</figcaption> <figcaption>Figure 6: View the created database.</figcaption>
</figure> </figure>
...@@ -213,7 +213,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -213,7 +213,7 @@ access to. This is the default for self-created databases like above in [Create
Figure 7. Figure 7.
<figure markdown> <figure markdown>
![Open the import CSV form](images/screenshots/import-dataset-step-1.png){ .img-border } ![Open the import CSV form](../images/screenshots/import-dataset-step-1.png){ .img-border }
<figcaption>Figure 7: Open the import CSV form.</figcaption> <figcaption>Figure 7: Open the import CSV form.</figcaption>
</figure> </figure>
...@@ -221,7 +221,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -221,7 +221,7 @@ access to. This is the default for self-created databases like above in [Create
as seen in Figure 8. as seen in Figure 8.
<figure markdown> <figure markdown>
![Basic table information](images/screenshots/import-dataset-step-2.png){ .img-border } ![Basic table information](../images/screenshots/import-dataset-step-2.png){ .img-border }
<figcaption>Figure 8: Basic table information.</figcaption> <figcaption>Figure 8: Basic table information.</figcaption>
</figure> </figure>
...@@ -238,7 +238,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -238,7 +238,7 @@ access to. This is the default for self-created databases like above in [Create
provide this information in :material-numeric-6-circle-outline:. provide this information in :material-numeric-6-circle-outline:.
<figure markdown> <figure markdown>
![Dataset metadata necessary for import](images/screenshots/import-dataset-step-3.png){ .img-border } ![Dataset metadata necessary for import](../images/screenshots/import-dataset-step-3.png){ .img-border }
<figcaption>Figure 9: Dataset metadata necessary for import.</figcaption> <figcaption>Figure 9: Dataset metadata necessary for import.</figcaption>
</figure> </figure>
...@@ -246,7 +246,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -246,7 +246,7 @@ access to. This is the default for self-created databases like above in [Create
dataset file onto the field in Figure 10. dataset file onto the field in Figure 10.
<figure markdown> <figure markdown>
![Dataset import file](images/screenshots/import-dataset-step-4.png){ .img-border } ![Dataset import file](../images/screenshots/import-dataset-step-4.png){ .img-border }
<figcaption>Figure 10: Dataset import file.</figcaption> <figcaption>Figure 10: Dataset import file.</figcaption>
</figure> </figure>
...@@ -261,7 +261,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -261,7 +261,7 @@ access to. This is the default for self-created databases like above in [Create
definitions by clicking the "ADD COLUMN" button in Figure 11. definitions by clicking the "ADD COLUMN" button in Figure 11.
<figure markdown> <figure markdown>
![Confirm the table schema and provide missing information](images/screenshots/import-dataset-step-5.png){ .img-border } ![Confirm the table schema and provide missing information](../images/screenshots/import-dataset-step-5.png){ .img-border }
<figcaption>Figure 11: Confirm the table schema and provide missing information.</figcaption> <figcaption>Figure 11: Confirm the table schema and provide missing information.</figcaption>
</figure> </figure>
...@@ -270,7 +270,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -270,7 +270,7 @@ access to. This is the default for self-created databases like above in [Create
dataset as seen in Figure 12. dataset as seen in Figure 12.
<figure markdown> <figure markdown>
![Confirm the table schema and provide missing information](images/screenshots/import-dataset-step-6.png){ .img-border } ![Confirm the table schema and provide missing information](../images/screenshots/import-dataset-step-6.png){ .img-border }
<figcaption>Figure 12: Confirm the table schema and provide missing information.</figcaption> <figcaption>Figure 12: Confirm the table schema and provide missing information.</figcaption>
</figure> </figure>
...@@ -284,7 +284,7 @@ access to. This is the default for self-created databases like above in [Create ...@@ -284,7 +284,7 @@ access to. This is the default for self-created databases like above in [Create
13. 13.
<figure markdown> <figure markdown>
![Table data](images/screenshots/import-dataset-step-7.png){ .img-border } ![Table data](../images/screenshots/import-dataset-step-7.png){ .img-border }
<figcaption>Figure 13: Table data.</figcaption> <figcaption>Figure 13: Table data.</figcaption>
</figure> </figure>
...@@ -432,7 +432,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D ...@@ -432,7 +432,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D
clicking the "OK" button :material-numeric-4-circle-outline:. clicking the "OK" button :material-numeric-4-circle-outline:.
<figure markdown> <figure markdown>
![Setup New Connection in MySQL Workbench](images/screenshots/import-database-dump-step-1.png) ![Setup New Connection in MySQL Workbench](../images/screenshots/import-database-dump-step-1.png)
<figcaption>Figure 14: Setup New Connection in MySQL Workbench.</figcaption> <figcaption>Figure 14: Setup New Connection in MySQL Workbench.</figcaption>
</figure> </figure>
...@@ -440,7 +440,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D ...@@ -440,7 +440,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D
:material-numeric-1-circle-outline: and basic connection and version information :material-numeric-2-circle-outline:. :material-numeric-1-circle-outline: and basic connection and version information :material-numeric-2-circle-outline:.
<figure markdown> <figure markdown>
![Server status of the Data Database in MySQL Workbench](images/screenshots/import-database-dump-step-2.png) ![Server status of the Data Database in MySQL Workbench](../images/screenshots/import-database-dump-step-2.png)
<figcaption>Figure 15: Server status of the Data Database in MySQL Workbench.</figcaption> <figcaption>Figure 15: Server status of the Data Database in MySQL Workbench.</figcaption>
</figure> </figure>
...@@ -451,7 +451,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D ...@@ -451,7 +451,7 @@ A user wants to import a database dump in `.sql` (or in `.sql.gz`) format into D
The import starts after clicking "Start Import" :material-numeric-5-circle-outline:. The import starts after clicking "Start Import" :material-numeric-5-circle-outline:.
<figure markdown> <figure markdown>
![Data Import/Restore in MySQL Workbench](images/screenshots/import-database-dump-step-3.png) ![Data Import/Restore in MySQL Workbench](../images/screenshots/import-database-dump-step-3.png)
<figcaption>Figure 16: Data Import/Restore in MySQL Workbench.</figcaption> <figcaption>Figure 16: Data Import/Restore in MySQL Workbench.</figcaption>
</figure> </figure>
...@@ -510,7 +510,7 @@ A user wants to import live data from e.g. sensor measurements fast and without ...@@ -510,7 +510,7 @@ A user wants to import live data from e.g. sensor measurements fast and without
database via JDBC, you can obtain the connection string in the UI under the database info (c.f. Figure 14). database via JDBC, you can obtain the connection string in the UI under the database info (c.f. Figure 14).
<figure markdown> <figure markdown>
![JDBC connection information](images/screenshots/database-jdbc.png){ .img-border } ![JDBC connection information](../images/screenshots/database-jdbc.png){ .img-border }
<figcaption>Figure 14: JDBC connection information.</figcaption> <figcaption>Figure 14: JDBC connection information.</figcaption>
</figure> </figure>
...@@ -526,7 +526,7 @@ A user wants to import live data from e.g. sensor measurements fast and without ...@@ -526,7 +526,7 @@ A user wants to import live data from e.g. sensor measurements fast and without
database via AMQP, you can obtain the connection string in the UI under the table info (c.f. Figure 14). database via AMQP, you can obtain the connection string in the UI under the table info (c.f. Figure 14).
<figure markdown> <figure markdown>
![AMQP connection information](images/screenshots/table-amqp.png){ .img-border } ![AMQP connection information](../images/screenshots/table-amqp.png){ .img-border }
<figcaption>Figure 14: AMQP connection information.</figcaption> <figcaption>Figure 14: AMQP connection information.</figcaption>
</figure> </figure>
...@@ -550,7 +550,7 @@ A user wants to create a subset and export it as csv file. ...@@ -550,7 +550,7 @@ A user wants to create a subset and export it as csv file.
Figure 17. Figure 17.
<figure markdown> <figure markdown>
![Open the create subset form](images/screenshots/export-subset-step-1.png){ .img-border } ![Open the create subset form](../images/screenshots/export-subset-step-1.png){ .img-border }
<figcaption>Figure 17: Open the create subset form.</figcaption> <figcaption>Figure 17: Open the create subset form.</figcaption>
</figure> </figure>
...@@ -562,7 +562,7 @@ A user wants to create a subset and export it as csv file. ...@@ -562,7 +562,7 @@ A user wants to create a subset and export it as csv file.
Once you are confident the query covers the desired result, click ":material-run: Create". Once you are confident the query covers the desired result, click ":material-run: Create".
<figure markdown> <figure markdown>
![Subset query building](images/screenshots/export-subset-step-2.png){ .img-border } ![Subset query building](../images/screenshots/export-subset-step-2.png){ .img-border }
<figcaption>Figure 18: Subset query building.</figcaption> <figcaption>Figure 18: Subset query building.</figcaption>
</figure> </figure>
...@@ -571,7 +571,7 @@ A user wants to create a subset and export it as csv file. ...@@ -571,7 +571,7 @@ A user wants to create a subset and export it as csv file.
View" on the top (c.f. Figure 19). View" on the top (c.f. Figure 19).
<figure markdown> <figure markdown>
![Subset result set](images/screenshots/export-subset-step-3.png){ .img-border } ![Subset result set](../images/screenshots/export-subset-step-3.png){ .img-border }
<figcaption>Figure 19: Subset result set.</figcaption> <figcaption>Figure 19: Subset result set.</figcaption>
</figure> </figure>
...@@ -584,7 +584,7 @@ A user wants to create a subset and export it as csv file. ...@@ -584,7 +584,7 @@ A user wants to create a subset and export it as csv file.
a csv file by clicking the ":material-download: DATA .CSV" button :material-numeric-2-circle-outline:. a csv file by clicking the ":material-download: DATA .CSV" button :material-numeric-2-circle-outline:.
<figure markdown> <figure markdown>
![Subset information](images/screenshots/export-subset-step-4.png){ .img-border } ![Subset information](../images/screenshots/export-subset-step-4.png){ .img-border }
<figcaption>Figure 20: Subset information.</figcaption> <figcaption>Figure 20: Subset information.</figcaption>
</figure> </figure>
...@@ -648,7 +648,7 @@ A user wants to create a subset and export it as csv file. ...@@ -648,7 +648,7 @@ A user wants to create a subset and export it as csv file.
under the database info (c.f. Figure 20). under the database info (c.f. Figure 20).
<figure markdown> <figure markdown>
![JDBC connection information](images/screenshots/database-jdbc.png){ .img-border } ![JDBC connection information](../images/screenshots/database-jdbc.png){ .img-border }
<figcaption>Figure 20: JDBC connection information.</figcaption> <figcaption>Figure 20: JDBC connection information.</figcaption>
</figure> </figure>
...@@ -728,7 +728,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -728,7 +728,7 @@ A user wants to assign a persistent identifier to a database owned by them.
the ":material-identifier: GET PID" button :material-numeric-1-circle-outline: as seen in Figure 21. the ":material-identifier: GET PID" button :material-numeric-1-circle-outline: as seen in Figure 21.
<figure markdown> <figure markdown>
![Open the get persisent identifier form](images/screenshots/assign-database-pid-step-1.png){ .img-border } ![Open the get persisent identifier form](../images/screenshots/assign-database-pid-step-1.png){ .img-border }
<figcaption>Figure 21: Open the get persisent identifier form.</figcaption> <figcaption>Figure 21: Open the get persisent identifier form.</figcaption>
</figure> </figure>
...@@ -743,7 +743,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -743,7 +743,7 @@ A user wants to assign a persistent identifier to a database owned by them.
:material-numeric-8-circle-outline:. :material-numeric-8-circle-outline:.
<figure markdown> <figure markdown>
![Identifier creator fields](images/screenshots/assign-database-pid-step-2.png){ .img-border } ![Identifier creator fields](../images/screenshots/assign-database-pid-step-2.png){ .img-border }
<figcaption>Figure 22: Identifier creator fields.</figcaption> <figcaption>Figure 22: Identifier creator fields.</figcaption>
</figure> </figure>
...@@ -753,7 +753,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -753,7 +753,7 @@ A user wants to assign a persistent identifier to a database owned by them.
again :material-numeric-4-circle-outline: if they are not needed in Figure 23. again :material-numeric-4-circle-outline: if they are not needed in Figure 23.
<figure markdown> <figure markdown>
![JDBC connection information](images/screenshots/assign-database-pid-step-3.png){ .img-border } ![JDBC connection information](../images/screenshots/assign-database-pid-step-3.png){ .img-border }
<figcaption>Figure 23: Identifier title fields.</figcaption> <figcaption>Figure 23: Identifier title fields.</figcaption>
</figure> </figure>
...@@ -764,7 +764,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -764,7 +764,7 @@ A user wants to assign a persistent identifier to a database owned by them.
publication month and publication day in Figure 24. publication month and publication day in Figure 24.
<figure markdown> <figure markdown>
![Identifier description fields and publishing information](images/screenshots/assign-database-pid-step-4.png){ .img-border } ![Identifier description fields and publishing information](../images/screenshots/assign-database-pid-step-4.png){ .img-border }
<figcaption>Figure 24: Identifier description fields and publishing information.</figcaption> <figcaption>Figure 24: Identifier description fields and publishing information.</figcaption>
</figure> </figure>
...@@ -775,7 +775,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -775,7 +775,7 @@ A user wants to assign a persistent identifier to a database owned by them.
your data. your data.
<figure markdown> <figure markdown>
![Related identifiers, license and language of the identifier](images/screenshots/assign-database-pid-step-5.png){ .img-border } ![Related identifiers, license and language of the identifier](../images/screenshots/assign-database-pid-step-5.png){ .img-border }
<figcaption>Figure 25: Related identifiers, license and language of the identifier.</figcaption> <figcaption>Figure 25: Related identifiers, license and language of the identifier.</figcaption>
</figure> </figure>
...@@ -787,7 +787,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -787,7 +787,7 @@ A user wants to assign a persistent identifier to a database owned by them.
language on the identifier summary page (c.f. Figure 26). language on the identifier summary page (c.f. Figure 26).
<figure markdown> <figure markdown>
![Identifier funder information](images/screenshots/assign-database-pid-step-6.png){ .img-border } ![Identifier funder information](../images/screenshots/assign-database-pid-step-6.png){ .img-border }
<figcaption>Figure 26: Identifier funder information.</figcaption> <figcaption>Figure 26: Identifier funder information.</figcaption>
</figure> </figure>
...@@ -795,7 +795,7 @@ A user wants to assign a persistent identifier to a database owned by them. ...@@ -795,7 +795,7 @@ A user wants to assign a persistent identifier to a database owned by them.
result is displayed in Figure 27. result is displayed in Figure 27.
<figure markdown> <figure markdown>
![Identifier summary page](images/screenshots/assign-database-pid-step-7.png){ .img-border } ![Identifier summary page](../images/screenshots/assign-database-pid-step-7.png){ .img-border }
<figcaption>Figure 27: Identifier summary page.</figcaption> <figcaption>Figure 27: Identifier summary page.</figcaption>
</figure> </figure>
...@@ -884,7 +884,7 @@ A user wants a public database to be private and only give specific users access ...@@ -884,7 +884,7 @@ A user wants a public database to be private and only give specific users access
the dialog (c.f. Figure 28). the dialog (c.f. Figure 28).
<figure markdown> <figure markdown>
![Database settings for visibility and access](images/screenshots/private-database-access-step-1.png){ .img-border } ![Database settings for visibility and access](../images/screenshots/private-database-access-step-1.png){ .img-border }
<figcaption>Figure 28: Database settings for visibility and access.</figcaption> <figcaption>Figure 28: Database settings for visibility and access.</figcaption>
</figure> </figure>
...@@ -893,7 +893,7 @@ A user wants a public database to be private and only give specific users access ...@@ -893,7 +893,7 @@ A user wants a public database to be private and only give specific users access
allowing users to view the private data (c.f. Figure 29). allowing users to view the private data (c.f. Figure 29).
<figure markdown> <figure markdown>
![Database acccess dialog](images/screenshots/private-database-access-step-2.png){ .img-border } ![Database acccess dialog](../images/screenshots/private-database-access-step-2.png){ .img-border }
<figcaption>Figure 29: Database acccess dialog.</figcaption> <figcaption>Figure 29: Database acccess dialog.</figcaption>
</figure> </figure>
......
...@@ -2,4 +2,32 @@ ...@@ -2,4 +2,32 @@
author: Martin Weise author: Martin Weise
--- ---
TBD !!! debug "Debug Information"
\ No newline at end of file
Image: [`bitnami/mariadb-galera:11.2.2-debian-11-r0`](https://hub.docker.com/r/bitnami/mariadb-galera)
* Ports: 3306/tcp
* JDBC: `jdbc://mariadb:<hostname>:3306`
## Overview
The metadata database is the single, central source of truth within DBRepo and holds all metadata information for
interaction between the services and displaying information in the UI.
On the first start, the schema is generated by the file `/docker-entrypoint-initdb.d/setup-schema.sql` within the
container. You can add custom files that should be executed on the first start by placing them into the
`/docker-entrypoint-initdb.d/` folder as well. For example:
```yaml
services:
dbrepo-metadata-db:
...
volumes:
- /path/to/setup-some-data.sql:/docker-entrypoint-initdb.d/setup-some-data.sql
...
```
!!! warning "Alphabetic Filename Sorting"
Beware that the init script provided by Bitnami executes files in alphabetic order! For example: the file
`setup-schema.sql` is executed **after** the file `setup-data.sql`!
\ No newline at end of file
...@@ -6,7 +6,7 @@ author: Martin Weise ...@@ -6,7 +6,7 @@ author: Martin Weise
## tl;dr ## tl;dr
[:simple-swagger: &nbsp;View Swagger-UI](../../swagger/){ .md-button .md-button--primary tabindex=-1 } [:simple-swagger: &nbsp;View Swagger-UI](../../rest/){ .md-button .md-button--primary tabindex=-1 }
## Overview ## Overview
......
...@@ -6,7 +6,7 @@ author: Martin Weise ...@@ -6,7 +6,7 @@ author: Martin Weise
## tl;dr ## tl;dr
[:fontawesome-solid-cube: &nbsp;View Docs](../sphinx){ .md-button .md-button--primary } [:fontawesome-solid-cube: &nbsp;View Docs](../../python){ .md-button .md-button--primary }
## Installing ## Installing
......
...@@ -52,7 +52,7 @@ User Interface on development. ...@@ -52,7 +52,7 @@ User Interface on development.
### Example ### Example
See the [Usage Overview](../usage-overview/) page for detailed examples. See the [API Overview](..) page for detailed examples.
## Limitations ## Limitations
......
...@@ -2,14 +2,32 @@ ...@@ -2,14 +2,32 @@
author: Martin Weise author: Martin Weise
--- ---
This is a short conceptional overview on the authentication mechanisms provided by Keycloak. We use Keycloak as the
single source of truth for authorization and user management.
## Basic Authentication
DBRepo supports `Basic` authentication (that is with username and password) in the REST API. When requesting a resource
from e.g. the [Metadata Service](../../api/metadata-service), the service internally retrieves a
[Bearer Token](#bearer-authentication) from the [Auth Service](../../api/auth-service) and checks if a certain role
is present to perform the desired action. This entails a small overhead on each request, since the service does not
store anything.
## Bearer Authentication ## Bearer Authentication
TBD DBRepo supports `Bearer` authentication by accepting JWT tokens in the
[`Authorization`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) header of HTTP requests to
any service. There are two (major) types of tokens:
## Basic Authentication * Access tokens who are short lived (e.g. 15 minutes) to access resources, and
* Refresh token who are long lived (e.g. 30 days) to request new access tokens without having to provide username and
password again.
TBD The [User Interface](../../api/ui) for example refreshes the token on-the-fly by intercepting each request and, in case
of an expired access token, requests a new one without having to terminate the request. This happens only once after the
access token has expired (after e.g. 15 minutes).
## OpenID Connect (OIDC) ## OpenID Connect (OIDC)
TBD We use the widely accepted authentication protocol OIDC for client authentication. Other protocols are e.g. SAML2 which
\ No newline at end of file are not used by DBRepo.
\ No newline at end of file
...@@ -4,15 +4,22 @@ author: Martin Weise ...@@ -4,15 +4,22 @@ author: Martin Weise
## Relational Database ## Relational Database
TBD DBRepo manages relational databases that store information relations in tables.
## Query ## Query
TBD A query is the method to interact with a relational database and is used to read/write data or to create/change/delete
schema information e.g. tables. DBRepo uses a query store to store certain (important) queries that generate subsets
to restore the exact same subset at a later point.
## System Versioning ## System Versioning
TBD DBRepo uses a mechanism offered by SQL:2013 to version tables with the system (=server) time. When inserting a tuple
into a system-versioned table, the database engine maintains invisible `ROW_START` and `ROW_END` timestamp columns to
denote a tuple validity. When deleting a tuple, the database engine actually just marks the tuple as `ROW_END = NOW()`
and does not delete the tuple.
At a later point in time, the (historic) tuple can still be queried using system versioning.
## Data Ingest ## Data Ingest
......
...@@ -2,14 +2,23 @@ ...@@ -2,14 +2,23 @@
author: Martin Weise author: Martin Weise
--- ---
## Tuple We use the message broker RabbitMQ and a single exchange with distributed (`quorum`) queue. Both are named `dbrepo`.
TBD <figure markdown>
<img src="../../images/exchange-binding.png" />
<caption>Figure 1: Exchange binding in DBRepo.</caption>
</figure>
## AMQP ## Tuple
TBD A tuple is the atomic granularity of information when transmitting data through message-queue systems. Represented as
JSON, a tuple looks like this in RabbitMQ:
## MQTT ```JSON
{"firstname": "foo", "lastname": "bar"}
```
## AMQP
TBD DBRepo uses AMQP to route messages which allows for both Basic/Bearer authentication. For more information please
\ No newline at end of file consult the [RabbitMQ AMQP](https://www.rabbitmq.com/tutorials/amqp-concepts) documentation.
\ No newline at end of file
...@@ -29,7 +29,7 @@ Installing DBRepo is very easy or ...@@ -29,7 +29,7 @@ Installing DBRepo is very easy or
## Who is using DBRepo? ## Who is using DBRepo?
![Logos of DBRepo adopters](../images/logos.png) ![Logos of DBRepo adopters](images/logos.png)
## How can I try DBRepo ## How can I try DBRepo
......
...@@ -20,8 +20,8 @@ hide: ...@@ -20,8 +20,8 @@ hide:
DBRepo logo in various formats: DBRepo logo in various formats:
* PNG: [bigger](./images/logo/logo.png) ([smaller](./images/logo/favicon.png)) * PNG: [bigger](../images/logos/logo.png) ([smaller](../images/logos/favicon.png))
* SVG: [bigger](./images/logo/logo.svg) ([smaller](./images/logo/favicon.svg)) * SVG: [bigger](../images/logos/logo.svg) ([smaller](../images/logos/favicon.svg))
## Refereed ## Refereed
......
...@@ -619,10 +619,10 @@ release-docs: ...@@ -619,10 +619,10 @@ release-docs:
- "mkdir -p ./final/${APP_VERSION}/swagger" - "mkdir -p ./final/${APP_VERSION}/swagger"
script: script:
- "make gen-lib-doc gen-docs-doc" - "make gen-lib-doc gen-docs-doc"
- "cp -r ./lib/python/docs/build/html ./final/${APP_VERSION}/sphinx" # sphinx - "cp -r ./lib/python/docs/build/html ./final/${APP_VERSION}/python" # sphinx
- "cp .docs/.swagger/api.yaml ./final/${APP_VERSION}/swagger/api.yaml" # swagger - "cp .docs/.swagger/api.yaml ./final/${APP_VERSION}/rest/api.yaml" # swagger
- "cp .docs/.swagger/swagger-ui.html ./final/${APP_VERSION}/swagger/index.html" # swagger - "cp .docs/.swagger/swagger-ui.html ./final/${APP_VERSION}/rest/index.html" # swagger
- "cp .docs/.swagger/custom.css ./final/${APP_VERSION}/swagger/custom.css" # swagger - "cp .docs/.swagger/custom.css ./final/${APP_VERSION}/rest/custom.css" # swagger
- "cp -r ./site/* ./final/${APP_VERSION}" # mkdocs - "cp -r ./site/* ./final/${APP_VERSION}" # mkdocs
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- "mkdir -p /root/.ssh" - "mkdir -p /root/.ssh"
......
##@ Generate ##@ Generate
.PHONY: gen-swagger-doc
gen-swagger-doc: ## Generate Swagger documentation.
bash .docs/.swagger/swagger-site.sh
.PHONY: gen-swagger-doc-fe .PHONY: gen-swagger-doc-fe
gen-swagger-doc-fe: build-images ## Generate Swagger documentation and fetch. gen-swagger-doc: build-images ## Generate Swagger documentation and fetch.
docker compose up -d docker compose up -d
bash .docs/.swagger/swagger-generate.sh bash .docs/.swagger/swagger-generate.sh
bash .docs/.swagger/swagger-site.sh
docker compose down docker compose down
openapi-merge-cli --config .docs/.swagger/openapi-merge.json openapi-merge-cli --config .docs/.swagger/openapi-merge.json
......
site_name: Database Repository site_name: Database Repository
site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/ site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4.4/
repo_url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services repo_url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
repo_name: fda-services repo_name: fda-services
site_author: Research Unit Data Science, Technische Universit&auml;t Wien site_author: Research Unit Data Science, Technische Universit&auml;t Wien
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment