-
Notifications
You must be signed in to change notification settings - Fork 16.3k
AIP 84 - Add auth for asset alias #47241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…AIP-84/auth/asset_alias
…AIP-84/auth/asset_alias
…AIP-84/auth/asset_alias
|
@vincbeck , Since we are now exposing AssetAlias, both AWS auth manager and FAB need to implement |
You have to, otherwise mypy will not be happy |
vincbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good. Could you please add unit tests?
|
failed tests do not seem to be related to the changes in this PR. @vincbeck , can you please retrigger just the failed boto test? |
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
Show resolved
Hide resolved
I agree with Get Alias(es) do not need to check asset perm. However, we probably should check alias perms in Get Asset(s) since it shows a list of aliases an asset is associated to. The list should only contain aliases the user has access to. (This brings up the question if the alias responses should also include a list of associated assets, but that’s a question for another day, and perm check should be added to it if that’s implemented.) |
Agree. I think the idea is to ensure that users only access the objects they have permissions for. For the asset endpoint, if we return its alias, we should check the alias permission and vice versa. |
|
If I understand correctly that is good from an asset_alias endpoints point of views (TP + Wei) as well as from the AuthManager permissions (vincent). The only thing missing is to add AssetAlias permission check on Asset endpoints ? (I think we can do that in a followup PR, this one focus on asset aliases and it seems to be completed ?) |
Lee-W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this PR only get asset alias itself without resolving it into assets.
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
Show resolved
Hide resolved
* init auth for asset alias * update requires_access_asset_alias * add assetalias related code to fab and AAM * add RESOURCE_ASSET_ALIAS * add RESOURCE_ASSET_ALIAS * add tests * fix fab tests * add tests base and simple am
related to #42360