Skip to content

Commit 9e01ac7

Browse files
jmcarpChris Fei
authored and
Chris Fei
committed
Add extras group for google auth to setup.py. (apache#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 7c2b1c2 commit 9e01ac7

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
@@ -47,71 +47,75 @@ these extra dependencies.
4747

4848
Here's the list of the subpackages and what they enable:
4949

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

116120
Initiating Airflow Database
117121
'''''''''''''''''''''''''''

docs/security.rst

+18
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ and in your DAG, when initializing the HiveOperator, specify:
249249
250250
run_as_owner=True
251251
252+
To use kerberos authentication, you must install Airflow with the `kerberos` extras group:
253+
254+
.. code-block:: base
255+
256+
pip install airflow[kerberos]
257+
252258
OAuth Authentication
253259
--------------------
254260
@@ -276,6 +282,12 @@ to only members of those teams.
276282
.. note:: If you do not specify a team whitelist, anyone with a valid account on
277283
your GHE installation will be able to login to Airflow.
278284
285+
To use GHE authentication, you must install Airflow with the `github_enterprise` extras group:
286+
287+
.. code-block:: base
288+
289+
pip install airflow[github_enterprise]
290+
279291
Setting up GHE Authentication
280292
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281293
@@ -318,6 +330,12 @@ login, separated with a comma, to only members of those domains.
318330
oauth_callback_route = /oauth2callback
319331
domain = "example1.com,example2.com"
320332
333+
To use Google authentication, you must install Airflow with the `google_auth` extras group:
334+
335+
.. code-block:: base
336+
337+
pip install airflow[google_auth]
338+
321339
Setting up Google Authentication
322340
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
323341

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def write_version(filename=os.path.join(*['airflow',
183183
'pandas-gbq'
184184
]
185185
github_enterprise = ['Flask-OAuthlib>=0.9.1']
186+
google_auth = ['Flask-OAuthlib>=0.9.1']
186187
hdfs = ['snakebite>=2.7.8']
187188
hive = [
188189
'hmsclient>=0.1.0',
@@ -351,6 +352,7 @@ def do_setup():
351352
'emr': emr,
352353
'gcp_api': gcp_api,
353354
'github_enterprise': github_enterprise,
355+
'google_auth': google_auth,
354356
'hdfs': hdfs,
355357
'hive': hive,
356358
'jdbc': jdbc,

0 commit comments

Comments
 (0)