Skip to content

Various fixes #6

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

Merged
merged 4 commits into from
Nov 11, 2019
Merged

Various fixes #6

merged 4 commits into from
Nov 11, 2019

Conversation

maxceem
Copy link
Contributor

@maxceem maxceem commented Nov 1, 2019

  1. fix: "Cannot read property 'hits' of undefined" in Project Service

    • Project Service expects Milestone Templates to be stored inside "milestoneTemplates" so "milestoneTemplate" has been renamed to be plural.
  2. fix: member role validation on create and update

    • Unlike in Project Service endpoints, in this processor we should let create members with any roles because Project Service may create members with any roles implicitly, when accepting invitations.
    • Also, updated the list of possible user roles, with recently added new roles.

Project Service expects Milestone Templates to be stored inside "milestoneTemplates" so "milestoneTemplate" has been renamed to be plural.
- Unlike in Project Service endpoints, in this processor we should let create members with any roles because Project Service may create members with any roles implicitly, when accepting invitations.
- Also, updated the list of possible user roles, with recently added new roles.
@maxceem maxceem changed the title fix: "Cannot read property 'hits' of undefined" in Project Service Various fixes Nov 4, 2019
PROJECT_MEMBER_ROLE.ACCOUNT_MANAGER, PROJECT_MEMBER_ROLE.COPILOT, PROJECT_MEMBER_ROLE.OBSERVER).required()
// unlike in Project Service endpoints, in this processor we should let create members with any roles
// because Project Service may create members with any roles implicitly, when accepting invitations
role: Joi.string().valid(_.values(PROJECT_MEMBER_ROLE)).required()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxceem can it create any security loop hole? I mean if some one is able to raise the bus event with data which is not allowed by the project service, then if we don't have checks here, it might get through. However, on second thoughts, I think sending events to bus is not possible without authentication so we should be safe. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, this place doesn't bring an additional security loop. If someone happens to be able to send arbitrary messages to the Bus Api or Kafka, he could do much bigger harm than adding a member: removing or updating projects or any other arbitrary data which we store in ES. Also, he can still update or remove members.

We may still think if there is any chance someone could gain access to the Bus Api or Kafka because if so, it gives almost full control over the data we have inside ES.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@vikasrohit vikasrohit merged commit 3530f46 into topcoder-platform:develop Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants