Access Control
Axoniq Insights provides multiple layers of access control to secure the web UI, REST APIs, the AI chat interface, and the PostgreSQL wire protocol endpoint.
Enabling authorization
Authorization is controlled by a single property:
insights.authorization.enabled=true
When enabled (the default), all protected endpoints require authentication. When disabled, all endpoints are accessible without authentication. This is useful for local development but should never be used in production.
Authentication methods
Insights supports several authentication methods that can be used independently or combined.
Local users (username and password)
Insights maintains its own user database backed by SQLite. Passwords are stored using BCrypt encryption.
On first startup, a default admin user is created. The initial password is configured with:
insights.authorization.default-password=admin
Change this password immediately after first login in production environments.
Users can authenticate through:
-
HTTP Basic Authentication : Include credentials in the request header. Useful for API clients and scripts.
-
Form login : A login page served at
/loginfor browser-based access.
OAuth2 / OIDC
For single sign-on with an external identity provider, Insights supports OAuth2 and OpenID Connect. See OAuth2 / OIDC Configuration for detailed setup instructions.
When OAuth2 is configured, users authenticate through the external provider (Google, Keycloak, Okta, Azure AD, etc.) and are mapped to Insights users via configurable username mappings.
User management
PostgreSQL wire protocol authentication
The built-in PostgreSQL wire protocol server (PgWire) has its own authentication layer, independent of the web authentication. This allows SQL clients such as DBeaver, pgAdmin, DataGrip, Grafana, or any PostgreSQL JDBC driver to authenticate.
When a client connects:
-
The server optionally upgrades the connection to TLS (if
insights.jdbc.ssl-enabled=true). -
The server requests a cleartext password from the client.
-
The password is validated against the Insights user database (BCrypt).
-
On success, the client receives an
AuthenticationOkresponse and can execute queries.
PgWire authentication is controlled by:
insights.jdbc.require-authentication=true
When set to false, connections are accepted without password verification. The database name in the connection URL maps to the Axon Server context name. For example, to query the bikes context:
jdbc:postgresql://localhost:5432/bikes
See JDBC Driver Configuration for the full list of PgWire configuration options including SSL/TLS setup.
Security recommendations
For production deployments:
-
Enable authorization (
insights.authorization.enabled=true). -
Change the default admin password before or at first startup.
-
Configure OAuth2 / OIDC for centralized user management.
-
Enable SSL/TLS on the PgWire endpoint if it is exposed outside the local network (
insights.jdbc.ssl-enabled=true). -
Use environment variables for sensitive values like tokens and passwords to keep them out of configuration files.
-
Require authentication on the PgWire endpoint (
insights.jdbc.require-authentication=true, the default).