The constants used for configuring default policy rules were initialized
before configuration file was parsed. As the result the configuration
options in 'roles_middleware' group didn't have effect on registered
policy rules. The behavior can be reproduced in devstack plugin where
monasca-log-agent using 'monasca-agent' role is not authorized to send
logs to the API.
The change postpones the initilization of these constants. Additionally
obsolete 'roles' filter was removed from the paste pipelines.
Added policies and used policy enforcement engine
- Updated role_middleware to remove authorization into the routes.
- Updated unit tests and implemented some new tests.
- Added a new entry point for generating sample policy file by tox.
Signed-off-by: Amir Mofakhar <email@example.com>