Skip to content
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

Resolves #1013 Updated onlyOrgWithRole middleware to onlyOrgWithPartnerRole #1104

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

jdaigneau5
Copy link
Collaborator

@jdaigneau5 jdaigneau5 commented Jul 18, 2023

Closes Issue #1013

Summary

The onlyOrgsWithRole middleware function allowed the BULK_DOWNLOAD organization to access non GET endpoints. This goes against the principle of least privilege, so the middleware was updated to allow only orgs with partner roles, like Cna, Adp, to be granted access.

Important Changes

middleware.js

  • Updated onlyOrgsWithRole function to check for orgs with non-partner roles

Testing

Steps to manually test updated functionality, if possible

  • 1) Run npm run test:unit-tests
  • 2) Ensure orgs with just the BULK_DOWNLOAD role can only access the GET /cve endpoint

@david-rocca david-rocca merged commit 7948977 into dev Jul 21, 2023
9 checks passed
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