Skip to content

Authentication configurations

Anika Weinmann edited this page Aug 25, 2023 · 5 revisions

By default actinia uses basic authentication, but you can also disable authentication in the configuration file for the whole actinia API or use OAuth2 e.g. to connect to Keycloak.

Basic authentication

By default actinia uses basic authentication. The version and swagger documentation can be requested without authentication:

curl ${ACTINIA_BASE_URL}/api/v3/version
curl ${ACTINIA_BASE_URL}/api/v3/swagger.json

The other endpoints are secured. An example request for the locations is:

curl -u "user:password" ${ACTINIA_BASE_URL}/api/v3/locations

Disable authentication

To disable the authentication for the whole actinia API in the actinia configuration file the authentication in the section API has to be set to False. By default it is set to True.

[API]
authentication = False

Setting actinia up with disabled authentication the locations can be reqested via:

curl ${ACTINIA_BASE_URL}/api/v3/locations

OAuth2 / Keycloak configuration

Actinia can also verify the Keycloak token. For this a KEYCLOAK section has to be added to the actinia configuration:

[KEYCLOAK]
config_path = /etc/default/keycloak.json
group_prefix = /actinia-user/

where the config_path is the file to the Keycloak OIDC JSON from the actinia client in Keykloak. Setting actinia up with Keycloak authentication the locations can be reqested via:

TOKEN=xxx
curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" ${ACTINIA_BASE_URL}/api/v3/locations | jq

An example DEV setup is explained here.