Problem:
Airflow login failed with an “Invalid login” prompt for the user “admin” in production. The environment details are as follows: Helm version 1.9.0 and Airflow Image version 2.6.3. The expected outcome was a successful login.
Solution:
-
Identify the Issue:
The problem was related to login issues with the Airflow UI using the “admin” user.
-
User and Permissions Adjustments:
It was discovered that the Airflow instance was originally installed with root permissions. To address this:
- User ID Adjustments: The user ID (UID) for the Airflow user was modified from 0 (root) to 50000.
- File System Group Adjustments: The file system group (FS group) was also adjusted to ensure proper access permissions.
-
Root Access:
Initially, the Airflow user was given root access, which facilitated the ability to log in. However, this posed security risks and caused issues with executing Airflow commands.
-
Permission Issues:
There were issues related to accessing paths and running jobs due to the initial configuration with root permissions.
-
Resolution:
By changing the UID to 50000 and adjusting FS group permissions, the login issue with the Airflow UI was resolved. This adjustment likely restored proper access to Airflow functionalities without compromising security.
-
Verification and Monitoring:
After making these changes, it’s important to monitor the Airflow instance to ensure that the login issue does not reoccur and that all functionalities are operational as expected.
Conclusion:
In summary, the resolution involved adjusting user permissions and IDs to ensure that the Airflow UI login issue was resolved while maintaining appropriate security measures. This approach aligns with best practices for configuring Airflow in a production environment to avoid permissions-related problems.
The Airflow login issue with the “admin” user was resolved by adjusting user permissions and IDs. Initially configured with root permissions, the user ID was changed from 0 (root) to 50000, and the file system group permissions were adjusted. This resolution restored proper access to Airflow functionalities, resolved the login issue, and maintained security. Monitoring is recommended to ensure continued functionality and prevent recurrence.