-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add status filter to registry API, improve Swagger docs #610
Conversation
} | ||
if existingStatus == Approved { | ||
log.Errorf("User '%s' is trying to modify approved namespace registration with id=%d", user, id) | ||
ctx.JSON(http.StatusForbidden, gin.H{"error": "You don't have permission to modify an approved registration. Please contact your federation administrator"}) |
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.
How do we handle key rotations if we don't allow namespace owners to modify their registrations?
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 think for now we'd better off now allowing them to modify, even the keys, as we aren't dealing with key rotation in the system. #383 . I imagine to do the rotation, we will have a separate endpoint for partial update like PATCH /registry_ui/namespace/:id/pubkey
so that users know what they are doing. For the full-update like what you pointed out here, we should be strict.
* Improve Swagger to include csrf token, query params, RBAC * Refactor namespace db function to allow generic filtering * Control ns visibility based on auth status
032db0d
to
157c43b
Compare
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!
Closes #606 and #591