user.ini#
The user.ini file configures the Squirro user authentication service, which handles authentication, user management, and OAuth2 client credentials.
The file is located at /etc/squirro/user.ini and contains only the settings you want to override for your deployment. Any key you omit falls back to its built-in default, so a typical file is short.
Squirro ships a packaged user.ini file that lists all supported options, but it is overwritten on every upgrade. Make your changes in /etc/squirro/user.ini instead, where they persist across upgrades.
Example Configuration#
The following example shows the settings that most deployments customize:
[user]
db = mysql+mariadbconnector://user:password@localhost/user?charset=utf8
connection_recycle_interval = 3600
pool_class = queue
pool_size = 10
max_overflow = 3
The reference below documents every key that each section supports, along with its default value. Add only the keys you need to change.
Configuration Reference#
[user]#
Controls the database connection, token lifetimes, and notification settings for the user service.
Key |
Description |
Default |
|---|---|---|
|
SQLAlchemy connection string for the user database. |
|
|
How often SQLAlchemy recycles database connections, in seconds. |
|
|
When set to |
|
|
SQLAlchemy connection pool class. Use |
|
|
Number of connections to maintain in the pool. |
|
|
Number of connections that can be created beyond |
|
|
Salt used for password hashing. Set to a unique, randomly generated value in every production deployment. |
|
|
How long access tokens remain valid, in minutes. |
|
|
How long refresh tokens remain valid, in minutes. The default is approximately one year. |
|
|
How long grant refresh tokens remain valid, in days. The default is approximately ten years. |
|
|
When set to |
|
|
Number of days before a token expires at which to send a warning to the user. |
|
[clients]#
Registers the OAuth2 application credentials that services and applications use to authenticate with Squirro. Each client entry has a unique client_id and client_secret.
A standard Squirro installation includes the following built-in clients:
Client name |
Purpose |
Trusted |
|---|---|---|
|
Squirro web frontend. |
Yes |
|
GenAI service. |
Yes |
|
Machine learning service. |
Yes |
|
Plumber service. |
Yes |
|
Topic proxy service. |
Yes |
|
Dataloader provider. |
Yes |
|
Project import and export functionality. |
Yes |
|
Digest mailer service. |
No |
Notes for administrators
All clients that call the grants endpoint must have
trusted = true. Without it, the server rejects the request with a 403 error.Store
/etc/squirro/user.inisecurely. It contains credentials for all registered OAuth2 clients.
[server]#
Controls the network settings for the user service.
Key |
Description |
Default |
|---|---|---|
|
Port the user service listens on. |
|
[password_policy]#
Controls password requirements enforced when users set or change their password.
Key |
Description |
Default |
|---|---|---|
|
Minimum number of characters required in a password. Set to |
|
|
Whether to allow user personal information (such as name or email address) in passwords. |
|
|
The fraction of a password that may consist of user personal information before the password is rejected. A value of |
|
[jwt]#
Controls JWT token support for integrating with external identity providers.
Key |
Description |
Default |
|---|---|---|
|
When set to |
|
|
Which OAuth2 parameter carries the JWT. Set to |
|
|
URL of the JWT validator plugin endpoint. |
|
|
URL of the JWT validator configuration endpoint. Optional. |
|
|
When set to |
|
|
How long to cache plugin configuration, in seconds. |
|
|
How long to cache JWT validation results in access token mode, in seconds. |
|
|
How long to cache JWT validation results in refresh token mode, in seconds. |
|
|
How long to cache the JWKS from the identity provider, in seconds. |
|
Register a New OAuth2 Client#
Generate a
client_id.python3 -c "import secrets; print(secrets.token_urlsafe(16))"
Generate a
client_secret.python3 -c "import secrets; print(secrets.token_hex(32))"
Add the client to the
[clients]section of/etc/squirro/user.ini. Replacemyappwith a descriptive name for your application.[clients] myapp.client_id = <generated_client_id> myapp.client_secret = <generated_client_secret> myapp.trusted = true
Restart the user service.
sudo systemctl restart squserd
Pass the client_id and client_secret values to the SquirroClient constructor. For usage examples, see the Create a Service Account page.
Apply Changes#
For changes in /etc/squirro/user.ini to take effect, restart the squserd service:
sudo systemctl restart squserd