Cubes provides simple but extensible mechanism for authorization through an Authorizer and for authentication through an Authenticator.
Authentication in cubes: determining and confirirming the user’s identity, for example using a user name and password, some secret key or using an external service.
Authorization: providing (or denying) access to cubes based on user’s identity.
The authorization principle in cubes is based on user’s rights to a cube and restriction within a cube. If user has a “right to a cube” he can access the cube, the cube will be visible to him.
Restriction within a cube is cell based: users might have access only to a certain cell within a cube. For example a shop manager might have access only to sales cube and dimension point equal to his own shop.
Authorization is configured at the workspace level. In slicer.ini it is specified as:
[workspace]
authorization: simple
[authorization]
rights_file: access_rights.json
There is only one build-in authorizer called simple.
Simple authorization based on JSON files: rights and roles. The rights file contains a dictionary with keys as user identities (user names, API keys, ...) and values as right descriptions.
The user right is described as:
The roles file has the same structure as the rights file, instead of users it defines inheritable roles. The roles can inherit properties from other roles.
Example of roles file:
{
"retail": {
"allowed_cubes": ["sales"]
}
}
Rights file:
{
"martin": {
"roles": ["retail"],
}
}
The rights file of the simple authorization method might contain a special guest role which will be used when no other identity is found. See the configuration documentation for more information.
Authentication is handled at the server level.
Built-in authentication methods: