Skip to content

Commit

Permalink
satellite/console: rate limit project invitation endpoint (#6417)
Browse files Browse the repository at this point in the history
This change adds user ID rate limiting to the endpoint responsible for
sending project invitations.

Resolves storj-private#462

Change-Id: Icf0be7d7bb7f2765725ba3e152a2195bc02484e2

Co-authored-by: Jeremy Wharton <jeremy.e.wharton@gmail.com>
  • Loading branch information
andriikotko and jewharton committed Oct 17, 2023
1 parent 3f6dd44 commit 335ebd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion satellite/console/consoleweb/server.go
Expand Up @@ -287,7 +287,7 @@ func NewServer(logger *zap.Logger, config Config, service *console.Service, oidc
projectsRouter.Handle("/{id}/members", http.HandlerFunc(projectsController.DeleteMembersAndInvitations)).Methods(http.MethodDelete, http.MethodOptions)
projectsRouter.Handle("/{id}/salt", http.HandlerFunc(projectsController.GetSalt)).Methods(http.MethodGet, http.MethodOptions)
projectsRouter.Handle("/{id}/members", http.HandlerFunc(projectsController.GetMembersAndInvitations)).Methods(http.MethodGet, http.MethodOptions)
projectsRouter.Handle("/{id}/invite", http.HandlerFunc(projectsController.InviteUsers)).Methods(http.MethodPost, http.MethodOptions)
projectsRouter.Handle("/{id}/invite", server.userIDRateLimiter.Limit(http.HandlerFunc(projectsController.InviteUsers))).Methods(http.MethodPost, http.MethodOptions)
projectsRouter.Handle("/{id}/invite-link", http.HandlerFunc(projectsController.GetInviteLink)).Methods(http.MethodGet, http.MethodOptions)
projectsRouter.Handle("/invitations", http.HandlerFunc(projectsController.GetUserInvitations)).Methods(http.MethodGet, http.MethodOptions)
projectsRouter.Handle("/invitations/{id}/respond", http.HandlerFunc(projectsController.RespondToInvitation)).Methods(http.MethodPost, http.MethodOptions)
Expand Down

0 comments on commit 335ebd6

Please sign in to comment.