Skip to main content

Built-in User Store

The built-in user store keeps user credentials — password hashes, salts, and per-user attributes such as failed-login counters — in a dedicated credentials database, separate from the main ICP database that holds projects, environments, and integration metadata.

By default both databases use the embedded H2 engine, writing to <ICP_HOME>/bin/database/. For production, switch the credentials database to PostgreSQL, MySQL, or MSSQL.


Default Setup (H2)

No configuration is needed. ICP creates the H2 credentials database automatically on first start, initializes the schema, and seeds an admin user with password admin.

warning

H2 is for evaluation and development only. For production deployments, use PostgreSQL, MySQL, or MSSQL.

warning

The default admin / admin credentials are publicly known. Change the password immediately after first login via Profile > Change Password.


Connecting an External Database

Step 1 — Create the database and user

Create a dedicated database and user on the database server. The user needs CREATE, INSERT, UPDATE, DELETE, and SELECT privileges on the credentials database.

Step 2 — Initialize the schema

Run the appropriate init script to create the user_credentials and user_attributes tables and seed the default admin user. The scripts are included in the ICP distribution:

DatabaseInit script
PostgreSQLdb-scripts/credentials_postgresql_init.sql
MySQLdb-scripts/credentials_mysql_init.sql
MSSQLdb-scripts/credentials_mssql_init.sql

Example for PostgreSQL:

psql -h <host> -U <admin_user> -d <credentials_db> \
-f db-scripts/credentials_postgresql_init.sql

The init script seeds the admin user with a bcrypt hash of the default password admin.

warning

The default admin / admin credentials are publicly known. Change the password immediately after first login via Profile > Change Password.

Step 3 — Configure deployment.toml

Add the credentialsDb* keys as top-level entries in <ICP_HOME>/conf/deployment.toml, before any [section] header:

credentialsDbType     = "postgresql"
credentialsDbHost = "db.example.com"
credentialsDbPort = 5432
credentialsDbName = "credentials_db"
credentialsDbUser = "icp_user"
credentialsDbPassword = "changeme"
note

These keys must be top-level entries, not inside the [icp_server.storage] section. The [icp_server.storage] section controls the main ICP database (projects, environments, etc.), which is configured independently.

KeyDefaultDescription
credentialsDbTypeh2Database engine: h2, postgresql, mysql, or mssql
credentialsDbHostlocalhostDatabase server hostname (not used for H2)
credentialsDbPort5432Database port (not used for H2)
credentialsDbNamecredentials_dbName of the credentials database
credentialsDbUsericp_userDatabase user
credentialsDbPasswordicp_passwordDatabase password — must be changed in production

Default ports: PostgreSQL 5432, MySQL 3306, MSSQL 1433.

Database-specific examples

MySQL

credentialsDbType     = "mysql"
credentialsDbHost = "db.example.com"
credentialsDbPort = 3306
credentialsDbName = "credentials_db"
credentialsDbUser = "icp_user"
credentialsDbPassword = "changeme"

Microsoft SQL Server

credentialsDbType     = "mssql"
credentialsDbHost = "db.example.com"
credentialsDbPort = 1433
credentialsDbName = "credentials_db"
credentialsDbUser = "icp_user"
credentialsDbPassword = "changeme"