0
0
Apache Airflowdevops~10 mins

Connection encryption in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the encryption type in an Airflow connection URI.

Apache Airflow
conn = 'postgresql+psycopg2://user:password@host:5432/dbname?sslmode=[1]'
Drag options to blanks, or click blank then click option'
Adisable
Brequire
Cnone
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disable' or 'none' disables encryption, which is insecure.
Using 'off' is not a valid sslmode value.
2fill in blank
medium

Complete the Airflow connection URI to enable TLS encryption with verification.

Apache Airflow
conn = 'mysql+pymysql://user:password@host/db?ssl_ca=[1]'
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
C/path/to/ca.pem
D/path/to/key.pem
Attempts:
3 left
💡 Hint
Common Mistakes
Using boolean values like 'true' or 'false' instead of a file path.
Providing the client key file path instead of the CA certificate.
3fill in blank
hard

Fix the error in the Airflow connection URI to correctly enable SSL encryption for a PostgreSQL connection.

Apache Airflow
conn = 'postgresql://user:password@host:5432/dbname?sslmode=[1]'
Drag options to blanks, or click blank then click option'
Averify-full
Bdisable
Cno-verify
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disable' or 'false' disables encryption.
Using 'no-verify' is not a valid sslmode value.
4fill in blank
hard

Fill both blanks to create an Airflow connection URI for MySQL with encrypted connection and client certificate authentication.

Apache Airflow
conn = 'mysql+pymysql://user:password@host/db?ssl_ca=[1]&ssl_cert=[2]'
Drag options to blanks, or click blank then click option'
A/etc/ssl/certs/ca.pem
B/etc/ssl/private/client-key.pem
C/etc/ssl/certs/client-cert.pem
D/etc/ssl/private/ca-key.pem
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing client key and client cert paths.
Using private key paths for CA or cert parameters.
5fill in blank
hard

Fill all three blanks to define an Airflow connection URI for PostgreSQL with SSL encryption, client certificate, and client key.

Apache Airflow
conn = 'postgresql+psycopg2://user:password@host:5432/dbname?sslmode=[1]&sslcert=[2]&sslkey=[3]'
Drag options to blanks, or click blank then click option'
Arequire
Bverify-ca
C/home/user/.postgresql/postgresql.key
D/home/user/.postgresql/postgresql.crt
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'require' without verification for sslmode.
Swapping client cert and key file paths.