vincbeck commented on code in PR #35928:
URL: https://github.com/apache/airflow/pull/35928#discussion_r1409501281
##########
airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:
##########
@@ -91,7 +91,13 @@ def is_authorized_configuration(
details: ConfigurationDetails | None = None,
user: BaseUser | None = None,
) -> bool:
- return self.is_logged_in()
+ config_section = details.section if details else None
Review Comment:
It is checking if the user is authorized for all config. This is a really
good question and this has been bugging me for a while. Does
`auth_manager.is_authorized_variable("GET")` means:
- Does the user has permission to read all variable
- Does the user has permission to read any variable
I decided to go with the former because this is actually how Amazon Verified
Permissions work. You cannot ask AVP to check whether the user is authorized to
access ANY variable (or any type of resource type).
But this has some implications. Example: As a user I am allowed to access
only variables starting with "tmp_" (thus not all variables), thus I wont be
allowed to see the list of variables (or even the menu). The reason why the
user would not be able to see the menu "Variables" or the list of variables is
because to display those, we check whether the user has permissions to read all
variables. So this is not perfect either (and we might change it) but I guess
we can leave that interrogation for later/another PR
--
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]