frontend.ini#
The frontend.ini config file, located at /etc/squirro/frontend.ini configures the workings of the Squirro frontend user interface
HTTP Session Configuration#
See Reducing Session Lifetime.
Session Secret Key#
To ensure the session cookies are hashed uniquely, you should add a custom secret key to the configuration file.
This must be set to the same value on all servers of a cluster.
Changing this value also has the side-effect that all existing user sessions expire immediately.
Tip
Adding a custom key is recommended when changing other session configuration parameters or when updating the Single Sign-On configuration.
How to Add a Custom Secret Key#
To add a custom key, edit /etc/squirro/frontend.ini and add the following configuration:
[flask_app]
secret_key = ce380f53ca31a529b480dcb217c45889cafeb43d89ef1879320b3128c8e9143a
A new value can be generated in any cryptographically secure way. One approach is to use the following commands:
$ squirro_activate
$ python -c 'import secrets; print(secrets.token_hex())'
From the Flask documentation:
Note
If a secret key is set, cryptographic components can use this to sign cookies and other things. Set this to a complex random value when you want to use the secure cookie for instance. This attribute can also be configured from the config with the SECRET_KEY configuration key. Defaults to None.
Default Landing Page#
Users who open the root address of your Squirro instance, for example https://your-instance.example.com/, land on the Squirro interface at /app. To send them to Squirro Neo at /neo/ instead, edit /etc/squirro/frontend.ini and set neo_default_landing in the existing [frontend] section. Add the [frontend] section header only if the file does not have one yet, because a second [frontend] header prevents the frontend service from starting:
[frontend]
neo_default_landing = true
To turn the setting on, use true, yes, on, or 1. To turn it off, use false, no, off, or 0. The values are not case-sensitive, and the setting defaults to false. Any other value, for example maybe or 100%, also sends users to /app, and the frontend service logs a warning that names the setting.
Only the root address changes. Links to /app pages and to any other address keep working as before.
Important
Turn on this setting only on an instance where Neo is deployed. On an instance without Neo, users who open the root address see a page stating that Neo is unavailable. For more information about deploying Neo, see the Neo setup page.
Setting the Default Landing Page with Ansible#
If you manage your Squirro instance with the squirro-ansible role, set the squirro_neo_default_landing role variable instead of editing the file. On cluster nodes, the role writes neo_default_landing on every run and overwrites a manual change.
The role writes true only if squirro_neo_default_landing is True and the same run deploys Neo, which requires squirro_webclientnode set to True and Squirro 3.15.5 or later. Otherwise, the role writes false, so users keep landing on /app. If squirro_neo_default_landing is True but the run does not deploy Neo, the role also prints a warning. The variable defaults to False.
Applying Changes#
After editing this configuration file, the service sqfrontendd has to be restarted (see Services).