airflow-rest-api-plugin icon indicating copy to clipboard operation
airflow-rest-api-plugin copied to clipboard

RBAC Enabled, but endpoints aren't exposed at /rest_api/api

Open seanmuth opened this issue 4 years ago • 3 comments

Airflow Version: 1.10.10 Rest API Plugin Version: 1.0.0

Flask-Login: 0.4.1 Flask-JWT-Extended: 3.25.1 Flask: 1.1.4 Flask-Admin: 1.5.4 Flask-AppBuilder: 2.3.4

airflow.cfg: rbac = True (I also displayed {{rbac_authentication_enabled}} on the index.html just to confirm that the plugin is correctly picking up the rbac setting)

I thought maybe the exposed enpoint logic https://github.com/eBay/airflow-rest-api-plugin/blob/master/plugins/rest_api_plugin.py#L320 may have been needed to be changed to: @app_builder_expose('/rest_api/api', methods=["GET", "POST"]) # for Flask AppBuilder

But this doesn't seem to have any effect: image And login is still at /api/ not /rest_api/api/: image

Thoughts?

seanmuth avatar Oct 08 '21 17:10 seanmuth

After some more messing about, it's only the login endpoint that doesn't get moved to /rest_api/api, the actual REST endpoint methods are located at /rest_api/api

Maybe just a matter of updating README documentation

seanmuth avatar Oct 08 '21 18:10 seanmuth

Thank you @seanmuth for reporting this. We'll fix the doc.

clasnake avatar Oct 24 '21 03:10 clasnake

image @seanmuth Hello, thank you for reporting this. The login api is the offcial api of airflow, /rest_api/api only working on the customized api in plugins.

huazaizai0322 avatar Dec 02 '21 09:12 huazaizai0322