{"id":823,"library":"apache-airflow-providers-fab","title":"Apache Airflow FAB Provider","description":"The Apache Airflow FAB (Flask AppBuilder) Provider package integrates Flask-AppBuilder functionalities into Apache Airflow, primarily enhancing its User Interface (UI) and Role-Based Access Control (RBAC) capabilities. It is an actively maintained provider, with the current version being 3.6.0. New versions are released independently of core Airflow, following a strict SemVer policy, and can introduce database migrations.","status":"active","version":"3.6.0","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/fab","tags":["apache-airflow","provider","flask-appbuilder","rbac","ui","authentication"],"install":[{"cmd":"pip install apache-airflow-providers-fab","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core Airflow dependency; provider >= 2.0 requires Airflow >= 3.0.2.","package":"apache-airflow","optional":false},{"reason":"Core dependency for UI and RBAC functionalities. Specific version required by the provider.","package":"flask-appbuilder","optional":false},{"reason":"Cross-provider compatibility features.","package":"apache-airflow-providers-common-compat","optional":true}],"imports":[{"note":"Commonly imported for customizing Airflow's security manager using Flask AppBuilder.","symbol":"FabAirflowSecurityManagerOverride","correct":"from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride"}],"quickstart":{"code":"# This provider enhances Airflow's UI/RBAC; direct code interaction is mostly via Airflow CLI or configuration.\n# Ensure Airflow is running with this provider installed.\n# Example: Creating a user via Airflow CLI (which uses the FAB backend):\n# Make sure to run this command in your Airflow environment where `apache-airflow-providers-fab` is installed.\n# Replace sensitive details with environment variables in a production setup.\n\nimport os\n\n# Example of setting up environment variables for a new user\n# In a real scenario, you'd execute this via command line or a script,\n# not directly in a Python quickstart meant for direct execution.\n# For demonstration, assume these are set or replaced by actual values.\nadmin_username = os.environ.get('AIRFLOW_ADMIN_USERNAME', 'admin')\nadmin_firstname = os.environ.get('AIRFLOW_ADMIN_FIRSTNAME', 'Airflow')\nadmin_lastname = os.environ.get('AIRFLOW_ADMIN_LASTNAME', 'User')\nadmin_role = os.environ.get('AIRFLOW_ADMIN_ROLE', 'Admin')\nadmin_email = os.environ.get('AIRFLOW_ADMIN_EMAIL', 'admin@example.com')\nadmin_password = os.environ.get('AIRFLOW_ADMIN_PASSWORD', 'supersecretpassword')\n\n# This command would typically be run in your shell:\n# airflow users create \\\n#     -u \"${AIRFLOW_ADMIN_USERNAME}\" \\\n#     -f \"${AIRFLOW_ADMIN_FIRSTNAME}\" \\\n#     -l \"${AIRFLOW_ADMIN_LASTNAME}\" \\\n#     -r \"${AIRFLOW_ADMIN_ROLE}\" \\\n#     -e \"${AIRFLOW_ADMIN_EMAIL}\" \\\n#     -p \"${AIRFLOW_ADMIN_PASSWORD}\"\n\nprint(f\"To create an Airflow user via CLI (using FAB provider's backend), run:\\n\")\nprint(f\"airflow users create -u {admin_username} -f {admin_firstname} -l {admin_lastname} -r {admin_role} -e {admin_email} -p {admin_password}\")\nprint(f\"\\nFor advanced authentication (e.g., OAuth), configure `webserver_config.py` as described in Airflow documentation.\")\n","lang":"python","description":"This provider primarily extends Airflow's UI and RBAC. A common interaction is through Airflow's CLI for user management, which leverages the Flask AppBuilder backend provided by this package. For advanced authentication methods like OAuth/SSO, customization of `webserver_config.py` is required."},"warnings":[{"fix":"For Airflow 2.x, downgrade to `apache-airflow-providers-fab==1.*`. For Airflow 3.x, ensure you use `apache-airflow-providers-fab >= 2.0`.","message":"Version incompatibility: `apache-airflow-providers-fab >= 2.0` is only compatible with Apache Airflow 3.x. If you are using Airflow 2.x, you must use `apache-airflow-providers-fab 1.x`.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Update custom security manager implementations to use the new method/property names: `is_authorized_asset` and `oauth_allow_list`. Avoid using `AUTH_OID`.","message":"Removed methods and properties: `is_authorized_dataset` was removed from `FabAuthManager`; use `is_authorized_asset` instead. `oauth_whitelists` property was removed; use `oauth_allow_list` instead. The authentication type `AUTH_OID` was also removed.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Always run `airflow fab-db migrate` after upgrading the `apache-airflow-providers-fab` package. If `FABDBManager` is configured in `[core] external_db_managers`, migrations might run automatically with `airflow db migrate`.","message":"Database migrations: Newer versions of the FAB provider can contain database schema changes. After upgrading the provider, you must run `airflow fab-db migrate` to apply these changes.","severity":"gotcha","affected_versions":">=1.3.0"},{"fix":"Review the changelog for specific removals and update your Airflow configurations (`airflow.cfg`) and custom code to use supported alternatives.","message":"Deprecated configurations and Kerberos authentication removed. Various deprecated classes, parameters, and features have been removed from the provider package.","severity":"deprecated","affected_versions":">=2.0"},{"fix":"Upgrade to `apache-airflow-providers-fab >= 1.5.2` to resolve this vulnerability. (Note: Current version 3.6.0 is not affected).","message":"Insufficient Session Expiration vulnerability in older versions: When a user password was changed via the admin CLI, existing sessions for that user were not cleared, leading to prolonged access.","severity":"gotcha","affected_versions":"<1.5.2"},{"fix":"Prioritize `airflow.cfg` for standard authentication configurations. Use `webserver_config.py` only when advanced customization or SSO integrations are necessary.","message":"Configuration for authentication: For most supported authentication options, the new `auth_manager` framework configured in `airflow.cfg` is preferred. `webserver_config.py` is still used for more advanced options like Single Sign-On (SSO) with OAuth.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure all Airflow and provider dependencies are correctly installed. These warnings often occur when 'connexion' is installed without its 'flask' extra explicitly, but may still function. If issues arise, try explicitly installing `connexion[flask]` if required by your setup, or consult `connexion` documentation.","message":"The 'connexion' package may issue warnings about missing 'flask' extras. These are typically informational and do not indicate a breaking issue with `apache-airflow-providers-fab` itself. Ensure all required dependencies are installed correctly.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'3.6.0':46 'access':31 'activ':38 'airflow':2,7,20,54,67 'apach':1,6,19,66 'apache-airflow':65 'appbuild':10,16,71 'authent':74 'base':30 'capabl':34 'control':32 'core':53 'current':43 'databas':63 'enhanc':22 'fab':3,8 'flask':9,15,70 'flask-appbuild':14,69 'follow':55 'function':17 'independ':51 'integr':13 'interfac':25 'introduc':62 'maintain':39 'migrat':64 'new':47 'packag':12 'polici':59 'primarili':21 'provid':4,11,40,68 'rbac':33,72 'releas':50 'role':29 'role-bas':28 'semver':58 'strict':57 'ui':26,73 'user':24 'version':44,48","created_at":"2026-03-29T06:03:30.130587+00:00","updated_at":"2026-04-15T20:30:59.181094+00:00","problems":[{"fix":"Downgrade 'werkzeug' to a compatible version by running 'pip install werkzeug==2.0.3'.","cause":"This error occurs due to an incompatibility between the 'apache-airflow-providers-fab' package and the 'werkzeug' library, where the '_plain_int' function has been removed in newer versions of 'werkzeug'.","error":"ImportError: cannot import name '_plain_int' from 'werkzeug._internal'"},{"fix":"Install the package using 'pip install apache-airflow-providers-fab'.","cause":"This error occurs when the 'apache-airflow-providers-fab' package is not installed or is missing from the Python environment.","error":"ModuleNotFoundError: No module named 'apache-airflow-providers-fab'"},{"fix":"Ensure that 'flask_appbuilder' is updated to a version that includes the 'get_oauth_user_info' method by running 'pip install flask-appbuilder==4.1.0'.","cause":"This error occurs when attempting to use the 'get_oauth_user_info' method, which may not be available in the installed version of 'flask_appbuilder'.","error":"AttributeError: module 'flask_appbuilder.security' has no attribute 'get_oauth_user_info'"},{"fix":"Ensure that both 'apache-airflow' and 'apache-airflow-providers-fab' are updated to compatible versions by running 'pip install apache-airflow==2.9.0 apache-airflow-providers-fab==1.2.2'.","cause":"This error occurs when the 'FabAirflowSecurityManagerOverride' class is not available in the specified module, possibly due to version mismatches or missing updates.","error":"ImportError: cannot import name 'FabAirflowSecurityManagerOverride' from 'airflow.auth.managers.fab.security_manager.override'"},{"fix":"Check the 'apache-airflow-providers-fab' documentation for updates or changes regarding the 'get_db_manager' function, and update your code accordingly.","cause":"This error occurs when the 'get_db_manager' function is not available in the 'airflow.providers.fab.auth_manager' module, possibly due to recent changes or deprecations.","error":"ImportError: cannot import name 'get_db_manager' from 'airflow.providers.fab.auth_manager'"}],"ecosystem":"pypi","meta_description":null,"install_score":85,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.6.5","cli_name":"","cli_version":null,"type":"library","homepage":"https://airflow.apache.org","github":"https://github.com/apache/airflow","docs":"https://airflow.apache.org/docs/apache-airflow-providers-fab/3.6.3","changelog":"https://airflow.apache.org/docs/apache-airflow-providers-fab/3.6.3/changelog.html","pypi":"https://pypi.org/project/apache-airflow-providers-fab/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","web-framework","auth-security","database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":"verified"}}