Skip to main content

Configuring Izanami

Mandatory parameters

Secret

This parameter is mandatory for production purpose. This secret is used to encrypt various stuff such as token, cookies, or passwords.

Your application secret must have at least 256 bits.

You can either set the IZANAMI_SECRET env variable or use the app.secret parameter.

⚠️ If a custom secret is not set, a default will be used. This default is not secured since it's visible in Izanami public github repository.

Database

You can either provide a connection URI, or indicate database name, user, host, port and so on separately.

Environnement variableProgram argumentDefault
UriIZANAMI_PG_URIapp.pg.uri
PortIZANAMI_PG_PORTapp.pg.port5432
HostIZANAMI_PG_HOSTapp.pg.host
Database nameIZANAMI_PG_DATABASEapp.pg.database
UserIZANAMI_PG_USERapp.pg.user
PasswordIZANAMI_PG_PASSWORDapp.pg.password
Pool sizeIZANAMI_PG_POOL_SIZEapp.pg.pool-size20
Connect timeout(ms)IZANAMI_PG_CONNECT_TIMEOUTapp.pg.connect-timeout60000
Connection max lifetimeIZANAMI_PG_MAX_LIFETIMEapp.pg.max-lifetime0 (no maximum)
IDLE timeout(s)IZANAMI_PG_IDLE_TIMEOUTapp.pg.idle-timeout0 (no timeout)
Log activityIZANAMI_PG_LOG_ACTIVITYapp.pg.log-activityfalse
Pipelining limitIZANAMI_PG_PIPELINING_LIMITapp.pg.pipelining-limit256

HTTP server

Since Izanami uses play framework under the hood, http server configuration rely heavily on play configuration keys.

Table above list essentials parameters, check Play documentation for more.

Environnement variableProgram argumentDefault
PortPLAY_HTTP_PORTplay.server.http.port9000

Admin account

When creating on an empty database, Izanami will create a user for you.

You'll have to use this user for your first login.

Environnement variableProgram argumentDefault
UsernameIZANAMI_ADMIN_DEFAULT_USERNAMEapp.admin.usernameRESERVED_ADMIN_USER
PasswordIZANAMI_ADMIN_DEFAULT_PASSWORDapp.admin.passwordgenerated (and printed in stdout)

Exposition url

Izanami needs to know on which URL it is exposed, this use for generating invitation link or query builder links.

Environnement variableProgram argumentDefault
Exposition URLIZANAMI_EXPOSITION_URLapp.exposition.urlhttp://localhost:${http.port}

Optional parameters

OpenId

Izanami allows to set up an external openid provider.

Environnement variableProgram argumentDefault
Client IDIZANAMI_OPENID_CLIENT_IDapp.openid.client-id
Client secretIZANAMI_OPENID_CLIENT_SECRETapp.openid.client-secret
Authorize URLIZANAMI_OPENID_AUTHORIZE_URLapp.openid.authorize-url
Token URLIZANAMI_OPENID_TOKEN_URLapp.openid.token-url
Redirect URLIZANAMI_OPENID_REDIRECT_URLapp.openid.redirect-url${app.exposition.url}/login
ScopesIZANAMI_OPENID_SCOPESapp.openid.scopesopenid email profile
Email fieldIZANAMI_OPENID_EMAIL_FIELDapp.openid.email-fieldemail
Username fieldIZANAMI_OPENID_USERNAME_FIELDapp.openid.username-fieldname
  • Scopes indicates which scopes should be requested when calling authorization url.
  • Email field indicates which field of id token should be used as user email
  • Username field indicates which field of id token should be used as username

Wasmo

If you chose to set up a WASMO instance alongside Izanami, you'll need to provide additional properties.

Environnement variableProgram argumentDefault
Wasmo urlIZANAMI_WASMO_URLapp.wasmo.url
Wasmo client idIZANAMI_WASMO_CLIENT_IDapp.wasmo.client-id
Wasmo client secretIZANAMI_WASMO_CLIENT_SECRETapp.wasmo.client-secret
Wasm cache TTL (ms)IZANAMI_WASM_CACHE_TTLapp.wasm.cache.ttl60000

Various time to live

Environnement variableProgram argumentDefault
Invitation time to live (s)IZANAMI_INVITATIONS_TTLapp.invitations.ttl86400 (24h)
Session time to live (s)IZANAMI_SESSIONS_TTLapp.sessions.ttl3700
Password reset request time to live (s)IZANAMI_PASSWORD_RESET_REQUEST_TTLapp.password-reset-requests.ttl900 (15min)

Cors

Izanami uses Play CORS filter to handle CORS.

Therefore, CORS is configurable using play.filters.cors configuration keys.

Alternatively, Izanami re-exposes these configuration keys with below env variables :

Play configuration keyEnvironnement variable
play.filters.cors.pathPrefixesIZANAMI_CORS_PATH_PREFIXES
play.filters.cors.allowedOriginsIZANAMI_CORS_ALLOWED_ORIGINS
play.filters.cors.allowedHttpMethodsIZANAMI_CORS_ALLOWED_HTTP_METHODS
play.filters.cors.allowedHttpHeadersIZANAMI_CORS_ALLOWED_HTTP_HEADERS
play.filters.cors.exposedHeadersIZANAMI_CORS_EXPOSED_HEADERS
play.filters.cors.supportsCredentialsIZANAMI_CORS_SUPPORTS_CREDENTIALS
play.filters.cors.preflightMaxAgeIZANAMI_CORS_PREFLIGHT_MAX_AGE
play.filters.cors.serveForbiddenOriginsIZANAMI_CORS_SERVE_FORBIDDEN_ORIGINS

Webhooks

Webhooks use exponential backoff algorithm to space out retries in case of failures. If retry exceed max allowed retry count, it stops trying and webhook won't be called.

Duration is computed as :

retryDelay = Math.min(initialDelay * Math.pow(multiplier, currentCount), maxDelay)

With configurable values

Play configuration keyEnvironnement variable
max retry countapp.webhooks.retry.countIZANAMI_WEBHOOK_RETRY_COUNT
initial delay (in seconds)app.webhooks.retry.intial-delayIZANAMI_WEBHOOK_RETRY_INITIAL_DELAY
max delay (in seconds)app.webhooks.retry.max-delayIZANAMI_WEBHOOK_RETRY_MAX_DELAY
multiplierapp.webhooks.retry.multiplierIZANAMI_WEBHOOK_RETRY_MULTIPLIER

SearchBar Parameter: similarity_threshold

The similartiy_threshold parameter in Izanami is a key setting that influences the behavior of similarity-based search queries.

Purpose

This parameter determines how closely two strings need to match for the similarity function to recognize them as "similar".

Range

The similarity_threshold is a floating-point value ranging from 0.0 to 1.0:

  • 0.0: All strings are considered similar, allowing for maximum inclusivity in search results.
  • 1.0: Requires an exact match, providing the highest precision.

Usage

By adjusting the threshold, you can control the sensitivity of your similarity searches:

  • Lower values (0.2-0.4): Broader matching criteria, capturing more results that might be loosely related.
  • Higher values (0.8-1.0): Stricter matching criteria, focusing on results that closely resemble the query.
Environnement variableProgram argumentDefault
Similartiy_threshold parameterIZANAMI_SIMILARITY_THRESHOLD_PARAMETERapp.search.similarity_threshold0.2