Jedox doesn’t allow you restrict the amount of times a user logs in to the server, and if the amount of concurrent users you have is small; then you will have the need to limit the amount of connections per user.
Luckily it’s quick and easy to do so, by following these simple steps:
- Create a new element in the User Dimension: it will define the amount of sessions that the user has.
- Change palo.ini: add a new authentication method.
- Add a SVS script: php script that will handle the authentication.
Creating the new element in the User Dimension
We need to add an attribute to the _USER_PROPERTIES
dimension (which is hidden for the normal user) in the System database, which in this case is going to be called “sessions”.
Since there’s no direct access to that dimension, we need to modify it through an ETL job.
Change the session values
Create a Paste View to modify the values for the users. The rule is that that cell for the user is blank, then the user has unlimited logins, otherwise you need to specify a number (starting from 1).
The Paste View should look like this:
Add the SVS script to handle the sessions
Look for the current SVS script that is running, if you don’t have anything running then go to <Jedox Installation>\svs\
and save the following file.
Then the sep.inc.php file in <Jedox Installation>\svs\
, needs to be changed to include the previously download file:
<?php include './sep.inc.session_limit.php'; ?>
If you already have a SVS script running, then you need to change/complement the OnAuthenticate function, with the one provided.
Change palo.ini
Once the SVS script in place, now it’s time to enable SVS (if not already done) and the authorization login in palo.ini
.
For that, we add the following lines (if they didn’t previously exist before) to palo.ini
:
workerlogin authentication worker "<Jedox Installation>\svs\SupervisionServer.exe"
Disadvantages
There’s no information in the login screen that will reflect that the user has reached the number of concurrent sessions. It will say “Incorrect Username/Password”.
However, going to the SVS log file, the information will be stored (in case it’s necessary to identify how many users are trying to create more sessions than allowed).