Authentication and Authorization


class cubes.server.Authenticator
exception cubes.server.NotAuthenticated


class cubes.Authorizer
authorize(token, cubes)

Returns list of authorized cubes from cubes. If none of the cubes are authorized an empty list is returned.

Default implementation returs the same cubes list as provided.

hierarchy_limits(token, cube)

Returns a list of tuples: (dimension, hierarchy, level).

restricted_cell(token, cube, cell=None)

Restricts the cell for cube according to authorization by token. If no cell is provided or the cell is empty then returns the restriction cell. If there is no restriction, returns the original cell if provided or None.

class cubes.SimpleAuthorizer(rights_file=None, roles_file=None, roles=None, rights=None, identity_dimension=None, order=None, guest=None, **options)

Creates a simple JSON-file based authorizer. Reads data from rights_file and roles_file and merge them with roles and rights dictionaries respectively.

exception cubes.NotAuthorized

Raised when user is not authorized for the request.

Table Of Contents

Previous topic

HTTP WSGI OLAP Server Reference

Next topic

Utility functions

This Page