-
Notifications
You must be signed in to change notification settings - Fork 0
Added permission assert check for registry server, offline server, online server functions #25
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
Added permission assert check for registry server, offline server, online server functions #25
Conversation
|
One more general comment: we should find an easy way to document what are the protected resources and actions to be permitted on each endpoint of a secured server. |
|
@dmartinol No, I think we will need a separate security page in the docs, explaining both permission model and mapping of secure endpoints to necessary permissions. I guess you were looking for something more reliable 😄 I doubt it will be too dynamic, just manual updates should suffice. |
@redhatHameed you can add a section in the user guide to expose the permission requirements for every endpoint, but I'm not sure in which section: I see some servers are not properly documented (offline store and registry, IIUC), so I can't suggest the best place for that. Anyway we can add a section somewhere instead of increase the undocumented features. |
dmartinol
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.
lgtm apart some extra variables that are not needed in Get, Delete and Apply methods of the RegistryServer (I let @tokoko to validate against the coding style adopted by the project)
|
@dmartinol Is the action list in assert_permissions applied with an |
🤔 Trying to recap aloud:
Anyway, I think the model is misleading and we should move away QUERY=[QUERY_ONLINE, QUERY_OFFLINE]
WRITE=[WRITE_ONLINE, WRITE_OFFLINE]This avoids any misunderstanding and at validation time we must specify either the actual store type(s) or use the alias. |
|
yeah, I think alias makes more sense. I forgot about the permissions part, using |
Agree, validation should list all the executed actions, aliases are unlikely to be used (I see there's a |
| allow_cache=True, | ||
| hide_dummy_entity=False, | ||
| ) | ||
| for feature_view in all_feature_views: |
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.
I'm not going to do this right now, but we probably need an assert function accepting a list of resources
dmartinol
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.
lgtm
…line server functions Signed-off-by: Abdul Hameed <ahameed@redhat.com>
|
lgtm but IMO we shoud try to minimize the impact of validating code by preparing fuctions leading to more concise code (e.g. accepting lists and returning the same type as the input object) |
@dmartinol @tokoko if you guys are fine we can merge this. There are remaining Task which we need to address in next PRs 1- Handle The permission on These three functions 2- Add a section in the user guide to expose the permission requirements for every endpoint 3- Refactor the permission validation code accepting lists and returning the same type as the input object. |
dmartinol
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.
thanks
What this PR does / why we need it:
Added permission assert check for registry server, offline server, online server functions
Which issue(s) this PR fixes:
Fixes