This is the server part of the Onyxia datalab, it interacts with your container orchestrator (Kubernetes) to deploy users services.
Deployable services are listed and configured inside catalogs.
Default catalogs are from InseeFrlab : Interactive services, Databases, Automation but more catalogs (including your own) can be added.
Onyxia-api is usually run as a component within the Onyxia stack. See Onyxia helm chart and docs.onyxia.sh for installation instruction.
docker run -p 8080:8080 inseefrlab/onyxia-api
git clone https://github.com/InseeFrLab/onyxia-api.git
cd onyxia-api
mvn spring-boot:run
Once Onyxia is started, browse to http://localhost:8080 to get started with the OpenAPI documentation.
Contributions are welcome.
Make sure to conform to Android Open Source Project code style : mvn spotless:apply
can enforce it.
Main configuration file is onyxia-api/src/main/resources/application.properties.
Each variable can be overridden using environment variables.
Key | Default | Description |
---|---|---|
regions |
onyxia-api/src/main/resources/regions.json | List of regions, see Region configuration |
Key | Default | Description |
---|---|---|
authentication.mode |
none |
Supported modes are : none , openidconnect (must be configured) |
You have to specify oidc.issuer-uri
. oidc.jwk-uri
is optional.
Common used configurations :
Provider | oidc.issuer-uri |
oidc.jwk-uri |
---|---|---|
Keycloak | https://keycloak.example.com/auth/realms/REALMNAME |
|
https://accounts.google.com | https://www.googleapis.com/oauth2/v3/certs |
|
Microsoft | https://login.microsoftonline.com/TENANTID/v2.0 |
Configurable properties :
Key | Default | Description |
---|---|---|
oidc.issuer-uri |
Issuer URI, should be the same as the iss field of the tokens |
|
oidc.jwk-uri |
JWK URI, useful when auto discovery is not available or when iss is not consistent across tokens (e.g Google) |
|
oidc.clientID |
Client id to be used by Onyxia web application | |
oidc.audience |
Optional : audience to validate. Must be the same as the token's aud field |
|
oidc.username-claim |
preferred_username |
Claim to be used as user id. Must conform to RFC 1123 |
oidc.groups-claim |
groups |
Claim to be used as list of user groups. |
Key | Default | Description |
---|---|---|
security.cors.allowed_origins |
To indicate which origins are allowed by CORS |
Key | Default | Description |
---|---|---|
catalogs |
see onyxia-api/src/main/resources/catalogs.json | List of catalogs. Each catalog can be of type universe or helm . Mixing is supported. If there is no region of corresponding type then the catalog will be ignored |
catalogs.refresh.ms |
300000 (5 minutes) |
The rate at which the catalogs should be refreshed. <= 0 means no refreshs after initial loading |
Key | Default | Description |
---|---|---|
http.proxyHost |
Proxy hostname (e.g : proxy.example.com) | |
http.proxyPort |
80 for HTTP , 443 for HTTPS |
Proxy port |
http.noProxy |
Hosts that should not use the proxy (e.g : localhost,host.example.com ) |
|
http.proxyUsername |
Username if the proxy requires authentication | |
http.proxyPassword |
Password if the proxy requires authentication |
Key | Default | Description |
---|---|---|
springdoc.swagger-ui.path |
/ |
Open API (swagger) UI path |
springdoc.swagger-ui.oauth.clientId |
`` | clientid used by swagger to authenticate the user, in general the same which is used by onyxia-ui is ok. |
Onyxia-API makes system calls to helm
using the helm-wrapper Java library.
helm
is bundled in the Onyxia API
Docker image, see current version bundled here : Dockerfile.
If running Onyxia API
locally you need to have helm
available in the PATH
.
Onyxia's catalogs are based on the Helm chart format and especially the values.schema.json
(see https://helm.sh/docs/topics/charts/#schema-files) file used to populate the personalization tabs displayed by the UI.
Onyxia is fully interoperable with the Helm chart format which means you can use any helm chart repository as a onyxia catalog. But you probably want to use one that includes values.schema.json
files (those files are optional in helm).
Onyxia extends this format to enhance it and provide more customization tools in the UI.
An example of such extension can be found here, see x-onyxia
.