-
Notifications
You must be signed in to change notification settings - Fork 0
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
Features/new auth #60
Conversation
bento_beacon/authz/middleware.py
Outdated
from .utils.beacon_response import build_response_meta | ||
from ..config_files.config import Config | ||
from ..utils.beacon_response import build_response_meta | ||
from .headers import auth_header_getter |
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.
this import now goes unused
@@ -0,0 +1,10 @@ | |||
from flask import request, Request |
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.
this file is just unused stuff, but we could leave it if you intend to do some non-bearer-token stuff in the future
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.
yeah, it's going to be in the katsu / gohan stuff
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
First pass at adding authz to beacon: response to main
/individuals
endpoint varies with user permissions:Users without permissions will get the default response only, whether they have a token or not (response currently hardcoded to counts, configurable response coming soon)
The
/individuals/<id>
endpoint requires a token with valid permissions, all other users receive 401 / 403.