On 9/14/18 10:45 PM, Ian Davison wrote:
> My team has been working on adding more plugin views for Airflow’s GUI. With
> the release of 1.10 we’ve been looking into the new Flask AppBuilder GUI for
> RBAC. I see now that the RBAC GUI doesn’t support user defined views via the
> plugin in manager as described in this ticket.
> https://issues.apache.org/jira/browse/AIRFLOW-2744 Is there a security
> concern for not adding in this feature? For us we really would like to have
> plugin support in the new RBAC GUI and could possibly start work on a fix.
We experienced the same problem when we switched to RBAC.
Fortunately we only use blueprints without authNZ (additional status and
monitoring endpoints) which were compatible so I only had to patch
app.yml to register them, see diff below.
However for menus and views the integration is different and I guess
the plugin code needs to be changed. Also AuthNZ works completely
different, permissions and role assignments need to be configured by the
plugin.
There is also a potential conflict with routes because RBAC no longer
uses the /admin prefix.
In any case I think it deserves a section in updating.md.
I would appreciate to have plugin support for the RBAC UI.
Kind Regards,
Stefan
diff --git a/airflow/www_rbac/app.py b/airflow/www_rbac/app.py
index 85125c6..471d3d8 100644
--- a/airflow/www_rbac/app.py
+++ b/airflow/www_rbac/app.py
@@ -131,6 +131,14 @@ def create_app(config=None, testing=False,
app_name="Airflow"):
from airflow.www_rbac.security import init_roles
init_roles(appbuilder)
+ def integrate_plugins():
+ """Integrate plugins to the context"""
+ from airflow.plugins_manager import flask_blueprints
+ for bp in flask_blueprints:
+ app.register_blueprint(bp)
+
+ integrate_plugins()
+
from airflow.www_rbac.api.experimental import endpoints as e
# required for testing purposes otherwise the module retains
# a link to the default_auth