Configure the Navin Platform for the first time
This page takes a new installation to a working platform: first administrator, tenants, administrators of each
tenant and single sign on with Keycloak (with LDAP or Active Directory behind it). It is done by the platform
administrator (role platform_admin).
Before you begin
- The installation is verified:
GET /readyzanswersready(Verify). - The installation password of the first administrator:
- OS packages:
sudo grep '^EAI_BOOTSTRAP_ADMIN_PASSWORD=' /etc/navin-platform/platform.env; - Docker Compose and
make:EAI_BOOTSTRAP_ADMIN_PASSWORDofdeploy/compose/.envorlocal.env; - Kubernetes: put
EAI_BOOTSTRAP_ADMIN_USERNAMEandEAI_BOOTSTRAP_ADMIN_PASSWORDin the secret of the Control Plane for the first sign in only.
- OS packages:
Steps
-
Sign in with the installation account. The API creates the account at startup when it does not exist, with the roles
platform_adminandtenant_adminon the tenantEAI_BOOTSTRAP_TENANT(default). Open the portal, tab Login, and sign in.Expected result: the portal asks for a new password (12 characters minimum by default,
EAI_LOCAL_PASSWORD_MIN_LENGTH). The installation password stops working.If it fails:
account_lockedafter 5 wrong passwords (EAI_LOCAL_AUTH_MAX_FAILURES), wait 15 minutes (EAI_LOCAL_AUTH_LOCKOUT_SECONDS).warningIn production the API refuses a weak installation password (
navin, the login, fewer than 12 characters, no letters and digits). RemoveEAI_BOOTSTRAP_ADMIN_PASSWORDfrom the settings once the first administrator has chosen a password: a later start never resets the account. -
Create the tenants. A tenant (organisation) isolates data, policies, budgets and audit trail (row level security in PostgreSQL). Create one per entity of the bank, in the portal or with the API:
TOKEN=$(curl -fsS <control-plane-url>/v1/auth/login -H 'Content-Type: application/json' \-d '{"username": "navin", "password": "<password>"}' | jq -r .token)curl -fsS <control-plane-url>/v1/tenants -H "Authorization: Bearer $TOKEN" \-H 'Content-Type: application/json' \-d '{"slug": "retail", "name": "Retail banking", "data_residency": "eu", "admins": []}'slug: lowercase letters, digits and-, 2 to 63 characters.admins: subjects (OIDCsub) giventenant_admin.Expected result:
201with the tenant;GET /v1/tenantslists it.If it fails:
409when the slug exists;403withoutplatform_admin. -
Connect Keycloak. The API validates the tokens of the realm; the portal redirects to it (authorization code with PKCE, public client
portal, redirect URI<portal URL>/auth/callback). The realmdeploy/keycloak/realm-enterprise-ai.jsondeclares the clientsportal,control-planeandcli, the realm roles and the groupsnavin-platform-adminsandnavin-admins-default.Settings of the API (packages:
platform.env; Kubernetes:controlPlane.config):EAI_OIDC_ISSUER='https://<keycloak-host>/realms/enterprise-ai'EAI_OIDC_AUDIENCE='<audience>'EAI_OIDC_JWKS_URL='https://<keycloak-host>/realms/enterprise-ai/protocol/openid-connect/certs'Settings of the portal:
NEXT_PUBLIC_EAI_OIDC_ISSUER(orNEXT_PUBLIC_OIDC_ISSUER) andNEXT_PUBLIC_EAI_OIDC_CLIENT_ID(orNEXT_PUBLIC_OIDC_CLIENT_ID, defaultportal).<audience>: the audience the tokens of your realm carry; the Helm values usecontrol-plane, the client of the API in the realm.Expected result: the sign in page shows Sign in with SSO and a Keycloak user reaches the portal.
If it fails: a
401with a valid Keycloak session means a wrong audience or issuer; compare with theissandaudclaims of the token. -
Federate the directory. Keycloak reads LDAP or Active Directory read only and imports its groups; the API receives them in the claims
groupsandentra_groupsand applies the mappings at each sign in (EAI_OIDC_GROUP_SYNC). The administrators come from the groups:Group Role given navin-platform-admins(EAI_OIDC_PLATFORM_ADMIN_GROUPS)platform_adminnavin-admins-<tenant slug>(EAI_OIDC_TENANT_ADMIN_GROUP_PREFIX)tenant_adminof that tenantNames are compared without case. To keep the names of your directory, change the two settings.
Expected result: a member of
navin-admins-retailsigns in astenant_adminofretail. -
Turn the local sign in off. Once SSO works for at least two administrators:
EAI_LOCAL_AUTH_ENABLED='false'Expected result:
POST /v1/auth/loginanswers403 local_auth_disabled. -
Activate the licence. The portal screen Licences, or
POST /v1/license/activations; the public keys of the publisher areEAI_LICENSE_PUBLIC_KEYS. See Licensing.
Verify
curl -fsS <control-plane-url>/v1/identity/whoami -H "Authorization: Bearer <token>"
<token>: access token of a Keycloak user. Expected output: the subject, its tenant and its roles.
Next steps
- Administration guide: roles, routine tasks
- Platform integration: OPA, OpenFGA, Keycloak, worker, metrics
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
tenant_suspended at sign in | Tenant status is suspended | PATCH /v1/tenants/{tenant_id} with {"status": "active"} |
| A directory administrator has no role | Group name differs | Rename the group or change EAI_OIDC_*_ADMIN_* |
| Administrator of several tenants lands on none | Token without tenant claim | Set the Keycloak attribute tenant of the user |