cubes
cubes copied to clipboard
Flatten configuration
Flatten the slicer.ini
configuration and allow environment variable based configuration as $SECTION_$OPTION
. Change slicer_ini to use just one main section for configuration with flattened options. One should be able to use Cubes without the slicer.ini
.
More notes: configuration should support sources:
- an object
- a dictionary
- environment variables
Also configuration should have a way to specify common prefix for all options, by default CUBES_
or SLICER_
.
Configuration can be considered an user interface for system administrators. With this in mind, I see the section authentication should be configured entirely in the authorization section, not as it currently is partly in server section and partly in authorization.
The sysadmin should not need to understand how code is organized in order to configure project, but instead get sensible configuration section separation. The code should pull appropriate settings from appropriate sections.
Same goes for authorization.
Configuration can be considered an user interface for system administrators
@zejn 100% agreed.
As for authorization/authentication, the problem is tied to how extensions are configured right now. They have their own separate option namespace.
Moreover, authentication and authorization are completely separate functionalities: Cubes without server does not have any authentication at all, as it is not it's job to do that. The library just has to know who is using it and provide appropriate authorization to for data access. If there is another web interface to Cubes (such as Django), the other framework might provide it's own way of authentication.
The authentication is part of slicer server and is provided just as convenience.
On the other hand, I see your point. It might be worth reconsidering how those two functionalities might be exposed in some common way.