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

feat!: add toggle-able Bento authorization middleware #48

Merged
merged 13 commits into from
Aug 2, 2023

Conversation

davidlougheed
Copy link
Member

@davidlougheed davidlougheed commented Jul 25, 2023

this doesn't implement any full-response endpoints or much in the way of complex fallback/different responses - just setting up the basics

@davidlougheed davidlougheed changed the title [WIP] Add toggle-able Bento authorization middleware Add toggle-able Bento authorization middleware Jul 26, 2023
@davidlougheed davidlougheed marked this pull request as ready for review July 26, 2023 13:52
@davidlougheed davidlougheed changed the title Add toggle-able Bento authorization middleware feat!: add toggle-able Bento authorization middleware Jul 26, 2023
@davidlougheed davidlougheed requested a review from gsfk July 26, 2023 14:58
Copy link
Member

@gsfk gsfk left a comment

Choose a reason for hiding this comment

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

Okay great! Just a few comments so far:

Werkzeug version needs to be <2.3 (werkzeug issue, debugpy issue)

Info endpoints (the ones in info.py) do not require auth.

returns 403 in a lot of cases where another response would be better, eg:

  • masks all 500 errors as 403, even in dev mode
  • beacon endpoints are configurable, they can be toggled on and off in the main beacon_config.json. So for example it's possible to have a beacon that implements /individuals but not /g_variants. In this case the corresponding flask blueprint is never loaded. For these endpoints 404 would be be better.
  • For the functions that have raise NotImplemented() as their body, some of these will get full auth implementations, and the rest I'll remove outright. Ideally the ones that are removed entirely will return 404.

@davidlougheed davidlougheed requested a review from gsfk July 27, 2023 17:28
@davidlougheed davidlougheed merged commit b3e18cc into master Aug 2, 2023
1 check passed
@davidlougheed davidlougheed deleted the features/bento-authz branch August 2, 2023 14:58
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