anshibanov opened a new issue, #52653:
URL: https://github.com/apache/airflow/issues/52653

   ### Apache Airflow version
   
   2.11.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   I am encountering a problem when user with admin role on clicking the 
variable search/edit button it open everytime a critical Error page "Ooops" and 
the error i can get in webserver logs.
   
   webserverver logs:
   
   
   ```
   airflow-webserver-1    | 172.18.0.3 - - [01/Jul/2025:15:58:07 +0000] "GET 
/variable/edit/321071 HTTP/1.1" 200 26280 
"https://airflow.dev.redacted.work/variable/list/"; "Mozilla/5.0 (Macintosh; 
Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 
Safari/537.36"
   airflow-webserver-1    | [2025-07-01T15:58:20.028+0000] {app.py:1744} ERROR 
- Exception on /variable/edit/321071 [POST]
   airflow-webserver-1    | Traceback (most recent call last):
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 2529, in 
wsgi_app
   airflow-webserver-1    |     response = self.full_dispatch_request()
   airflow-webserver-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1825, in 
full_dispatch_request
   airflow-webserver-1    |     rv = self.handle_user_exception(e)
   airflow-webserver-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1823, in 
full_dispatch_request
   airflow-webserver-1    |     rv = self.dispatch_request()
   airflow-webserver-1    |          ^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1799, in 
dispatch_request
   airflow-webserver-1    |     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   airflow-webserver-1    |            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/www/decorators.py", 
line 159, in wrapper
   airflow-webserver-1    |     return f(*args, **kwargs)
   airflow-webserver-1    |            ^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/www/auth.py", line 
110, in wraps
   airflow-webserver-1    |     if permission_str in self.base_permissions and 
self.appbuilder.sm.has_access(
   airflow-webserver-1    |                                                    
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/www/security_manager.py",
 line 141, in has_access
   airflow-webserver-1    |     return is_authorized_method(action_name, 
resource_pk, user)
   airflow-webserver-1    |            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/www/security_manager.py",
 line 268, in <lambda>
   airflow-webserver-1    |     
details=VariableDetails(key=get_variable_key(resource_pk)),
   airflow-webserver-1    |                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-webserver-1    |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/www/security_manager.py",
 line 230, in get_variable_key
   airflow-webserver-1    |     raise AirflowException("Variable not found")
   airflow-webserver-1    | airflow.exceptions.AirflowException: Variable not 
found
   
   ```
   
   
   I use LDAP auth type
   
   Seems like bug https://github.com/apache/airflow/issues/39581 not fixed
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Try set AUTH_TYPE = AUTH_LDAP create variable and edit from another user
   
   ### Operating System
   
   ubuntu 24.04
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to