Conversation
|
Note that this branch is based on #29 |
d6f1a45 to
90bec6f
Compare
shilorigins
left a comment
There was a problem hiding this comment.
All tests in test_dependencies.py are passing, but I'm getting test_api/test_api_keys.pyfailures for tests that passed in #29. Did you rerun the full suite?
Oh good catch. I should have noticed this. What happened is that I had to wrap all of the api_key endpoints in these envelope objects (see 0bee7fb) so that the frontend & backend could interact. In doing this I forgot to update the tests themselves. I will update the tests now, knowing that both commits should be reverted when I work on slaclab/react-squirrel#77. |
Description
Add dependencies for checking API Key authorization for all necessary endpoints. Check read access and write access as each is needed. Nearly all endpoints are covered with either read or write permissions. Below are the endpoints that are left open:
//health{"status": "healthy"}to signify the API is up/v1/health/heartbeat/v1/api-keys/bootstrapAdd special dependencies for checking API Key authorization for WebSockets. WebSockets handle headers differently and have different error code structures/codes.
Also I moved the Response Models for the
/healthroute to their own file inapp/schemas/health.py.Motivation
Closes #21
Where Has This Been Documented?
Waiting on #22
Screenshots
OpenAPI docs showing auth is required for endpoints
Pre-merge checklist