vandonr-amz opened a new pull request, #33901:
URL: https://github.com/apache/airflow/pull/33901

   There is currently a weird situation with the security managers, where the 
`AirflowSecurityManager`, which is supposed to be the more generic construct, 
inherits from `FabAirflowSecurityManagerOverride`, supposed to be the more 
specific one. Because of this, `FabAirflowSecurityManagerOverride` doesn't bear 
well its name, because it cannot override anything from 
`AirflowSecurityManager` since it sits lower on the inheritance tree.
   
   This was done initially to be able to _extend_ functionalities of the 
Security Manager, while retaining an existing feature which was that users 
could plug their own security manager inheriting from `AirflowSecurityManager` 
(so we couldn't squeeze the FAB one in between because that'd be a breaking 
change).
   
   The solution I used here is to have an empty shell stay where the 
`AirflowSecurityManager` was, just to maintain back-compatibility. That one 
inherits from FAB Security Manager, which can now sit below the actual 
`AirflowSecurityManager`.
   
   This means that users can only override the FAB security manager and not 
other auth provider's SM but that's ok because this feature is pretty much 
rendered obsolete by AIP-56. See 
https://github.com/apache/airflow/pull/33690#issuecomment-1696444150
   
   Joining some class diagrams to help understanding.
   Arrows read as "is inherited/implemented by".
   
   current situation:
   <img width="880" alt="image" 
src="https://github.com/apache/airflow/assets/114772123/86011ed5-2b24-49b7-8309-ac17ab923c51";>
   
   after:
   <img width="1035" alt="image" 
src="https://github.com/apache/airflow/assets/114772123/7664887b-6c32-4059-95a9-cce92895a248";>
   
   I had to make the `ApplessAirflowSecurityManager` inherit from the "db" one 
instead of the generic airflow SM because it had some dependencies there. It's 
not ideal, and not what we want in a final state, but for now I tried to do the 
minimal change that'd land back on its feet in a working state, so that's that.
   We'll sort that dependency later on.


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to