Skip to content

Commit 1f3c95b

Browse files
jmcarpashb
authored andcommitted
[AIRFLOW-3086] Add extras group for google auth to setup.py. (#3917)
To clarify installation instructions for the google auth backend, add an install group to `setup.py` that installs dependencies google auth via `pip install apache-airflow[google_auth]`.
1 parent 3d50d94 commit 1f3c95b

File tree

3 files changed

+89
-65
lines changed

3 files changed

+89
-65
lines changed

docs/installation.rst

+69-65
Original file line numberDiff line numberDiff line change
@@ -41,71 +41,75 @@ these extra dependencies.
4141

4242
Here's the list of the subpackages and what they enable:
4343

44-
+---------------+----------------------------------------------+-------------------------------------------------+
45-
| subpackage | install command | enables |
46-
+===============+==============================================+=================================================+
47-
| all | ``pip install apache-airflow[all]`` | All Airflow features known to man |
48-
+---------------+----------------------------------------------+-------------------------------------------------+
49-
| all_dbs | ``pip install apache-airflow[all_dbs]`` | All databases integrations |
50-
+---------------+----------------------------------------------+-------------------------------------------------+
51-
| async | ``pip install apache-airflow[async]`` | Async worker classes for Gunicorn |
52-
+---------------+----------------------------------------------+-------------------------------------------------+
53-
| celery | ``pip install apache-airflow[celery]`` | CeleryExecutor |
54-
+---------------+----------------------------------------------+-------------------------------------------------+
55-
| cloudant | ``pip install apache-airflow[cloudant]`` | Cloudant hook |
56-
+---------------+----------------------------------------------+-------------------------------------------------+
57-
| crypto | ``pip install apache-airflow[crypto]`` | Encrypt connection passwords in metadata db |
58-
+---------------+----------------------------------------------+-------------------------------------------------+
59-
| devel | ``pip install apache-airflow[devel]`` | Minimum dev tools requirements |
60-
+---------------+----------------------------------------------+-------------------------------------------------+
61-
| devel_hadoop | ``pip install apache-airflow[devel_hadoop]`` | Airflow + dependencies on the Hadoop stack |
62-
+---------------+----------------------------------------------+-------------------------------------------------+
63-
| druid | ``pip install apache-airflow[druid]`` | Druid related operators & hooks |
64-
+---------------+----------------------------------------------+-------------------------------------------------+
65-
| gcp_api | ``pip install apache-airflow[gcp_api]`` | Google Cloud Platform hooks and operators |
66-
| | | (using ``google-api-python-client``) |
67-
+---------------+----------------------------------------------+-------------------------------------------------+
68-
| hdfs | ``pip install apache-airflow[hdfs]`` | HDFS hooks and operators |
69-
+---------------+----------------------------------------------+-------------------------------------------------+
70-
| hive | ``pip install apache-airflow[hive]`` | All Hive related operators |
71-
+---------------+----------------------------------------------+-------------------------------------------------+
72-
| jdbc | ``pip install apache-airflow[jdbc]`` | JDBC hooks and operators |
73-
+---------------+----------------------------------------------+-------------------------------------------------+
74-
| kerberos | ``pip install apache-airflow[kerberos]`` | Kerberos integration for Kerberized Hadoop |
75-
+---------------+----------------------------------------------+-------------------------------------------------+
76-
| ldap | ``pip install apache-airflow[ldap]`` | LDAP authentication for users |
77-
+---------------+----------------------------------------------+-------------------------------------------------+
78-
| mssql | ``pip install apache-airflow[mssql]`` | Microsoft SQL Server operators and hook, |
79-
| | | support as an Airflow backend |
80-
+---------------+----------------------------------------------+-------------------------------------------------+
81-
| mysql | ``pip install apache-airflow[mysql]`` | MySQL operators and hook, support as an Airflow |
82-
| | | backend. The version of MySQL server has to be |
83-
| | | 5.6.4+. The exact version upper bound depends |
84-
| | | on version of ``mysqlclient`` package. For |
85-
| | | example, ``mysqlclient`` 1.3.12 can only be |
86-
| | | used with MySQL server 5.6.4 through 5.7. |
87-
+---------------+----------------------------------------------+-------------------------------------------------+
88-
| password | ``pip install apache-airflow[password]`` | Password authentication for users |
89-
+---------------+----------------------------------------------+-------------------------------------------------+
90-
| postgres | ``pip install apache-airflow[postgres]`` | PostgreSQL operators and hook, support as an |
91-
| | | Airflow backend |
92-
+---------------+----------------------------------------------+-------------------------------------------------+
93-
| qds | ``pip install apache-airflow[qds]`` | Enable QDS (Qubole Data Service) support |
94-
+---------------+----------------------------------------------+-------------------------------------------------+
95-
| rabbitmq | ``pip install apache-airflow[rabbitmq]`` | RabbitMQ support as a Celery backend |
96-
+---------------+----------------------------------------------+-------------------------------------------------+
97-
| redis | ``pip install apache-airflow[redis]`` | Redis hooks and sensors |
98-
+---------------+----------------------------------------------+-------------------------------------------------+
99-
| s3 | ``pip install apache-airflow[s3]`` | ``S3KeySensor``, ``S3PrefixSensor`` |
100-
+---------------+----------------------------------------------+-------------------------------------------------+
101-
| samba | ``pip install apache-airflow[samba]`` | ``Hive2SambaOperator`` |
102-
+---------------+----------------------------------------------+-------------------------------------------------+
103-
| slack | ``pip install apache-airflow[slack]`` | ``SlackAPIPostOperator`` |
104-
+---------------+----------------------------------------------+-------------------------------------------------+
105-
| ssh | ``pip install apache-airflow[ssh]`` | SSH hooks and Operator |
106-
+---------------+----------------------------------------------+-------------------------------------------------+
107-
| vertica | ``pip install apache-airflow[vertica]`` | Vertica hook support as an Airflow backend |
108-
+---------------+----------------------------------------------+-------------------------------------------------+
44+
+---------------------+---------------------------------------------------+-------------------------------------------------+
45+
| subpackage | install command | enables |
46+
+=====================+===================================================+=================================================+
47+
| all | ``pip install apache-airflow[all]`` | All Airflow features known to man |
48+
+---------------------+---------------------------------------------------+-------------------------------------------------+
49+
| all_dbs | ``pip install apache-airflow[all_dbs]`` | All databases integrations |
50+
+---------------------+---------------------------------------------------+-------------------------------------------------+
51+
| async | ``pip install apache-airflow[async]`` | Async worker classes for Gunicorn |
52+
+---------------------+---------------------------------------------------+-------------------------------------------------+
53+
| celery | ``pip install apache-airflow[celery]`` | CeleryExecutor |
54+
+---------------------+---------------------------------------------------+-------------------------------------------------+
55+
| cloudant | ``pip install apache-airflow[cloudant]`` | Cloudant hook |
56+
+---------------------+---------------------------------------------------+-------------------------------------------------+
57+
| crypto | ``pip install apache-airflow[crypto]`` | Encrypt connection passwords in metadata db |
58+
+---------------------+---------------------------------------------------+-------------------------------------------------+
59+
| devel | ``pip install apache-airflow[devel]`` | Minimum dev tools requirements |
60+
+---------------------+---------------------------------------------------+-------------------------------------------------+
61+
| devel_hadoop | ``pip install apache-airflow[devel_hadoop]`` | Airflow + dependencies on the Hadoop stack |
62+
+---------------------+---------------------------------------------------+-------------------------------------------------+
63+
| druid | ``pip install apache-airflow[druid]`` | Druid related operators & hooks |
64+
+---------------------+---------------------------------------------------+-------------------------------------------------+
65+
| gcp_api | ``pip install apache-airflow[gcp_api]`` | Google Cloud Platform hooks and operators |
66+
| | | (using ``google-api-python-client``) |
67+
+---------------------+---------------------------------------------------+-------------------------------------------------+
68+
| github_enterprise | ``pip install apache-airflow[github_enterprise]`` | Github Enterprise auth backend |
69+
+---------------------+---------------------------------------------------+-------------------------------------------------+
70+
| google_auth | ``pip install apache-airflow[google_auth]`` | Google auth backend |
71+
+---------------------+---------------------------------------------------+-------------------------------------------------+
72+
| hdfs | ``pip install apache-airflow[hdfs]`` | HDFS hooks and operators |
73+
+---------------------+---------------------------------------------------+-------------------------------------------------+
74+
| hive | ``pip install apache-airflow[hive]`` | All Hive related operators |
75+
+---------------------+---------------------------------------------------+-------------------------------------------------+
76+
| jdbc | ``pip install apache-airflow[jdbc]`` | JDBC hooks and operators |
77+
+---------------------+---------------------------------------------------+-------------------------------------------------+
78+
| kerberos | ``pip install apache-airflow[kerberos]`` | Kerberos integration for Kerberized Hadoop |
79+
+---------------------+---------------------------------------------------+-------------------------------------------------+
80+
| ldap | ``pip install apache-airflow[ldap]`` | LDAP authentication for users |
81+
+---------------------+---------------------------------------------------+-------------------------------------------------+
82+
| mssql | ``pip install apache-airflow[mssql]`` | Microsoft SQL Server operators and hook, |
83+
| | | support as an Airflow backend |
84+
+---------------------+---------------------------------------------------+-------------------------------------------------+
85+
| mysql | ``pip install apache-airflow[mysql]`` | MySQL operators and hook, support as an Airflow |
86+
| | | backend. The version of MySQL server has to be |
87+
| | | 5.6.4+. The exact version upper bound depends |
88+
| | | on version of ``mysqlclient`` package. For |
89+
| | | example, ``mysqlclient`` 1.3.12 can only be |
90+
| | | used with MySQL server 5.6.4 through 5.7. |
91+
+---------------------+---------------------------------------------------+-------------------------------------------------+
92+
| password | ``pip install apache-airflow[password]`` | Password authentication for users |
93+
+---------------------+---------------------------------------------------+-------------------------------------------------+
94+
| postgres | ``pip install apache-airflow[postgres]`` | PostgreSQL operators and hook, support as an |
95+
| | | Airflow backend |
96+
+---------------------+---------------------------------------------------+-------------------------------------------------+
97+
| qds | ``pip install apache-airflow[qds]`` | Enable QDS (Qubole Data Service) support |
98+
+---------------------+---------------------------------------------------+-------------------------------------------------+
99+
| rabbitmq | ``pip install apache-airflow[rabbitmq]`` | RabbitMQ support as a Celery backend |
100+
+---------------------+---------------------------------------------------+-------------------------------------------------+
101+
| redis | ``pip install apache-airflow[redis]`` | Redis hooks and sensors |
102+
+---------------------+---------------------------------------------------+-------------------------------------------------+
103+
| s3 | ``pip install apache-airflow[s3]`` | ``S3KeySensor``, ``S3PrefixSensor`` |
104+
+---------------------+---------------------------------------------------+-------------------------------------------------+
105+
| samba | ``pip install apache-airflow[samba]`` | ``Hive2SambaOperator`` |
106+
+---------------------+---------------------------------------------------+-------------------------------------------------+
107+
| slack | ``pip install apache-airflow[slack]`` | ``SlackAPIPostOperator`` |
108+
+---------------------+---------------------------------------------------+-------------------------------------------------+
109+
| ssh | ``pip install apache-airflow[ssh]`` | SSH hooks and Operator |
110+
+---------------------+---------------------------------------------------+-------------------------------------------------+
111+
| vertica | ``pip install apache-airflow[vertica]`` | Vertica hook support as an Airflow backend |
112+
+---------------------+---------------------------------------------------+-------------------------------------------------+
109113

110114
Initiating Airflow Database
111115
'''''''''''''''''''''''''''

docs/security.rst

+18
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ and in your DAG, when initializing the HiveOperator, specify:
237237
238238
run_as_owner=True
239239
240+
To use kerberos authentication, you must install Airflow with the `kerberos` extras group:
241+
242+
.. code-block:: base
243+
244+
pip install airflow[kerberos]
245+
240246
OAuth Authentication
241247
--------------------
242248
@@ -264,6 +270,12 @@ to only members of those teams.
264270
.. note:: If you do not specify a team whitelist, anyone with a valid account on
265271
your GHE installation will be able to login to Airflow.
266272
273+
To use GHE authentication, you must install Airflow with the `github_enterprise` extras group:
274+
275+
.. code-block:: base
276+
277+
pip install airflow[github_enterprise]
278+
267279
Setting up GHE Authentication
268280
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
269281
@@ -306,6 +318,12 @@ login, separated with a comma, to only members of those domains.
306318
oauth_callback_route = /oauth2callback
307319
domain = "example1.com,example2.com"
308320
321+
To use Google authentication, you must install Airflow with the `google_auth` extras group:
322+
323+
.. code-block:: base
324+
325+
pip install airflow[google_auth]
326+
309327
Setting up Google Authentication
310328
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311329

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def write_version(filename=os.path.join(*['airflow',
192192
'pandas-gbq'
193193
]
194194
github_enterprise = ['Flask-OAuthlib>=0.9.1']
195+
google_auth = ['Flask-OAuthlib>=0.9.1']
195196
hdfs = ['snakebite>=2.7.8']
196197
hive = [
197198
'hmsclient>=0.1.0',
@@ -358,6 +359,7 @@ def do_setup():
358359
'emr': emr,
359360
'gcp_api': gcp_api,
360361
'github_enterprise': github_enterprise,
362+
'google_auth': google_auth,
361363
'hdfs': hdfs,
362364
'hive': hive,
363365
'jdbc': jdbc,

0 commit comments

Comments
 (0)