0
0
Apache Airflowdevops~20 mins

Authentication backends (LDAP, OAuth) in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Authentication Mastery in Airflow
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding LDAP Authentication in Airflow

Which statement best describes how Airflow uses LDAP for authentication?

AAirflow directly queries the LDAP server to verify user credentials during login.
BAirflow stores LDAP passwords locally and compares them during login.
CAirflow uses OAuth tokens to authenticate users against LDAP.
DAirflow requires users to manually enter LDAP credentials in the configuration file.
Attempts:
2 left
💡 Hint

Think about how LDAP servers usually handle authentication requests.

💻 Command Output
intermediate
1:30remaining
OAuth Authentication Result in Airflow

What will be the output in Airflow logs when a user successfully authenticates via OAuth?

Apache Airflow
INFO - User 'alice@example.com' authenticated successfully via OAuth provider.
AINFO - User 'alice@example.com' authenticated successfully via OAuth provider.
BDEBUG - User 'alice@example.com' password verified locally.
CWARNING - OAuth provider unreachable, fallback to LDAP.
DERROR - OAuth token expired for user 'alice@example.com'.
Attempts:
2 left
💡 Hint

Look for a successful authentication message mentioning OAuth.

Configuration
advanced
2:00remaining
Configuring LDAP Authentication in Airflow

Which configuration snippet correctly enables LDAP authentication in Airflow's airflow.cfg?

A
[ldap]
uri = ldap://ldap.example.com
user_filter = (objectClass=person)
auth_backend = airflow.contrib.auth.backends.oauth_auth
B
[ldap]
uri = ldap://ldap.example.com
user_filter = (objectClass=person)
auth_backend = airflow.contrib.auth.backends.password_auth
C
[ldap]
uri = ldap://ldap.example.com
user_filter = (objectClass=person)
auth_backend = airflow.contrib.auth.backends.ldap_auth
D
[ldap]
uri = ldap://ldap.example.com
user_filter = (objectClass=person)
auth_backend = airflow.contrib.auth.backends.no_auth
Attempts:
2 left
💡 Hint

Check which backend is specifically for LDAP authentication.

Troubleshoot
advanced
2:00remaining
OAuth Authentication Failure in Airflow

After configuring OAuth in Airflow, users report login failures. Which log message indicates the root cause?

AINFO - User 'bob@example.com' authenticated successfully via OAuth provider.
BDEBUG - Password authentication succeeded for user 'bob@example.com'.
CWARNING - LDAP server not reachable, fallback failed.
DERROR - OAuth client secret missing in configuration.
Attempts:
2 left
💡 Hint

Look for errors related to OAuth configuration.

🔀 Workflow
expert
2:30remaining
Order of Authentication Backends in Airflow

Given Airflow configured with both LDAP and OAuth authentication backends, what is the correct order of authentication attempts during user login?

A1,2,4,3
B1,4,2,3
C1,2,3,4
D2,1,3,4
Attempts:
2 left
💡 Hint

Think about short-circuiting authentication once a method succeeds.