| 1 | # Token Based Authentication Service |
| 2 | |
| 3 | The token based authentication service extension is used to secure connector APIs. These APIs are not protected by the `AuthenticationService` by default. To find out how a specific API is protected please consult its documentation. |
| 4 | |
| 5 | APIs, protected by this extension, require a client to authenticate by adding a authentication key to the request header. |
| 6 | |
| 7 | Authentication Header Example: |
| 8 | ``` |
| 9 | curl <url> --header "X-API-Key: <key>" |
| 10 | ``` |
| 11 | |
| 12 | ## Configuration |
| 13 | |
| 14 | | Key | Description | Required | |
| 15 | |:-----------------------|:-------------------------------------------------------------|:---------| |
| 16 | | edc.api.auth.key | API Key Header Value | false | |
| 17 | | edc.api.auth.key.alias | Secret name of the API Key Header Value, stored in the vault | false | |
| 18 | |
| 19 | - If the API key is stored in the Vault _and_ in the configuration, the extension will take the key from the vault. |
| 20 | |
| 21 | - If no API key is defined, a random value is generated and printed out into the logs. |