-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feat: add admin actions audit entries #1234
base: master
Are you sure you want to change the base?
Conversation
47bf71b
to
d51eba6
Compare
Pull Request Test Coverage Report for Build 13874215801Details
💛 - Coveralls |
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
See feedback in this thread
request_url = _clean_authorization_request_url( | ||
request_url | ||
) # TODO - more than this will be needed for POST requests... | ||
flask.current_app.audit_service_client.create_admin_action_log( |
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.
The create_admin_action_log
method doesn't exist: https://github.com/uc-cdis/fence/blob/dccf559/fence/resources/audit/client.py
This code should fail, I'm very surprised that the existing "admin" unit tests passed. How?!
@@ -391,6 +409,7 @@ def add_project_to_groups(projectname): | |||
|
|||
@blueprint.route("/projects/<projectname>/bucket/<bucketname>", methods=["POST"]) | |||
@admin_login_required | |||
@enable_audit_logging | |||
def create_bucket_in_project(projectname, bucketname): | |||
""" | |||
DEPRECATED: This endpoint is deprecated and will be removed in a future release. |
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.
why are we adding audit logging to deprecated endpoints?
flask.current_app.audit_service_client.create_admin_action_log( | ||
status_code=response.status_code, | ||
request_url=request_url, | ||
action="admin_action_" + method, |
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 don't think audit-logging the request method is useful at all. "admin_action_POST" isn't going to tell you what was changed in the system 🤔
Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/VADC-1450
New Features
Dependency updates