{"id":23266,"library":"apache-airflow-providers-keycloak","title":"Apache Airflow Provider for Keycloak","description":"An Apache Airflow provider package that integrates with Keycloak, enabling communication with Keycloak authentication servers. The current version is 0.7.1, supporting Airflow 2.7+ and Python >=3.10. Released on an as-needed basis.","status":"active","version":"0.7.1","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow","tags":["airflow","keycloak","provider","authentication"],"install":[{"cmd":"pip install apache-airflow-providers-keycloak","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core Airflow dependency","package":"apache-airflow","optional":false}],"imports":[{"note":"Old import path used before provider package split","wrong":"from airflow.hooks.keycloak import KeycloakHook","symbol":"KeycloakHook","correct":"from airflow.providers.keycloak.hooks.keycloak import KeycloakHook"},{"note":"Operator for creating Keycloak logins","symbol":"KeycloakLogin","correct":"from airflow.providers.keycloak.operators.keycloak import KeycloakLogin"}],"quickstart":{"code":"from airflow import DAG\nfrom airflow.providers.keycloak.hooks.keycloak import KeycloakHook\nfrom datetime import datetime\n\ndefault_args = {\n    'owner': 'airflow',\n    'start_date': datetime(2023, 1, 1),\n}\n\nwith DAG('keycloak_test', default_args=default_args, schedule_interval=None) as dag:\n    pass  # Use hook in tasks\n\nhook = KeycloakHook()\n# Hook is configured via Airflow connection 'keycloak_default'\nprint(hook.get_conn())","lang":"python","description":"Shows how to import and instantiate the KeycloakHook after setting up a connection."},"warnings":[{"fix":"Create a connection in Airflow UI or via environment variable AIRFLOW_CONN_KEYCLOAK_DEFAULT with JSON config.","message":"The hook requires a pre-configured Airflow connection with conn_type='keycloak'. Without it, you'll get a 'Connection not found' error.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your Airflow and Python versions are compatible.","message":"The provider only supports Airflow 2.7+ and Python 3.10+.","severity":"deprecated","affected_versions":"0.7.1"},{"fix":"Use the new import path: from airflow.providers.keycloak.hooks.keycloak import KeycloakHook","message":"In older versions (pre-provider split), imports used 'airflow.hooks.keycloak'. This no longer works.","severity":"breaking","affected_versions":">=0.7.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install apache-airflow-providers-keycloak","cause":"Provider package not installed.","error":"ModuleNotFoundError: No module named 'airflow.providers.keycloak'"},{"fix":"Create a connection with conn_id='keycloak_default' and conn_type='keycloak'.","cause":"No Airflow connection configured for Keycloak.","error":"AirflowException: The conn_id `keycloak_default` isn't defined"},{"fix":"Use: from airflow.providers.keycloak.hooks.keycloak import KeycloakHook","cause":"Incorrect import path (missing .hooks).","error":"AttributeError: module 'airflow.providers.keycloak.hooks' has no attribute 'keycloak'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}