What is Role-based Access Control (RBAC) in Airflow?
RBAC in Airflow is a way to manage user permissions by assigning roles. Each role has specific access rights to Airflow features, making it easier to control who can do what.
Click to reveal answer
beginner
Name two default roles provided by Airflow's RBAC system.
Two default roles are 'Admin' which has full access, and 'User' which has limited access to view and trigger DAGs but cannot change system settings.
Click to reveal answer
beginner
How do you assign a role to a user in Airflow's RBAC?
You assign a role to a user via the Airflow UI under 'Security' > 'Users'. Select the user and choose the role(s) to grant the appropriate permissions.
Click to reveal answer
beginner
Why is RBAC important in Airflow?
RBAC helps keep Airflow secure by limiting access based on roles. It prevents unauthorized users from making changes or viewing sensitive data.
Click to reveal answer
intermediate
What command enables RBAC in Airflow's configuration?
Set `rbac = True` in the `[webserver]` section of the airflow.cfg file to enable RBAC.
Click to reveal answer
What does RBAC stand for in Airflow?
ARead-Block Access Control
BRole-based Access Control
CRandom Backup Access Control
DResource-based Access Control
✗ Incorrect
RBAC stands for Role-based Access Control, a method to assign permissions based on user roles.
Which Airflow role typically has full access to all features?
AOperator
BViewer
CUser
DAdmin
✗ Incorrect
The Admin role has full access to all Airflow features including configuration and user management.
How do you enable RBAC in Airflow?
ASet `rbac = True` in airflow.cfg under [webserver]
BRun `airflow enable rbac` command
CRBAC is enabled by default
DAdd users to the admin group
✗ Incorrect
You enable RBAC by setting `rbac = True` in the airflow.cfg file under the [webserver] section.
Where do you assign roles to users in Airflow?
AIn airflow.cfg file
BUsing the command line only
CIn the Airflow UI under Security > Users
DRoles are assigned automatically
✗ Incorrect
Roles are assigned to users via the Airflow UI under the Security > Users section.
What is a key benefit of using RBAC in Airflow?
AImproves security by limiting access
BSimplifies user interface
CFaster DAG execution
DAutomatically fixes DAG errors
✗ Incorrect
RBAC improves security by limiting user access based on roles, preventing unauthorized actions.
Explain how RBAC works in Airflow and why it is useful.
Think about how roles help control what users can do.
You got /4 concepts.
Describe the steps to enable and configure RBAC in Airflow.
Focus on configuration and user role assignment.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of Role-Based Access Control (RBAC) in Apache Airflow?
easy
A. To assign users specific roles that define their permissions
B. To schedule DAG runs automatically
C. To monitor system resource usage
D. To create new DAGs from templates
Solution
Step 1: Understand RBAC concept
RBAC is about controlling who can do what by assigning roles with permissions.
Step 2: Identify RBAC purpose in Airflow
In Airflow, RBAC assigns roles to users to control access to features and data.
Final Answer:
To assign users specific roles that define their permissions -> Option A
Quick Check:
RBAC = Assign roles with permissions [OK]
Hint: RBAC means roles control user permissions [OK]
Common Mistakes:
Confusing RBAC with scheduling tasks
Thinking RBAC monitors system resources
Believing RBAC creates DAGs
2. Which Airflow CLI command correctly creates a user with the role 'Admin'?
easy
A. airflow users create --username alice --role Admin --email alice@example.com
B. airflow create user --name alice --role Admin
C. airflow user add --username alice --role Admin
D. airflow users add --user alice --role Admin
Solution
Step 1: Recall correct CLI syntax for user creation
The correct command uses 'airflow users create' with flags for username, role, and email.
Step 2: Match options to syntax
airflow users create --username alice --role Admin --email alice@example.com matches the correct syntax exactly; others have wrong commands or flags.
Final Answer:
airflow users create --username alice --role Admin --email alice@example.com -> Option A