Repository navigation
feat: add authz checks to API - #1539
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1539 +/- ##
==========================================
+ Coverage 95.91% 95.93% +0.02%
==========================================
Files 44 44
Lines 3254 3300 +46
==========================================
+ Hits 3121 3166 +45
- Misses 133 134 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
27a9865 to
ae58c78
Compare
b575c2b to
b6049c8
Compare
ae58c78 to
8112e4b
Compare
ZohebShaikh
left a comment
There was a problem hiding this comment.
Looks Good, few comments
b6049c8 to
63009c0
Compare
8112e4b to
a4c6778
Compare
63009c0 to
9865265
Compare
a4c6778 to
4fa20de
Compare
| ): | ||
| task = runner.run(interface.get_task_by_id, task_id) | ||
|
|
||
| if opa and not opa.admin() and (task and fedid != task.task.metadata.get("user")): |
There was a problem hiding this comment.
This only checks task access if OPA is configured. Do we want to restrict access based on user name when authn is enabled but authz is not?
9865265 to
41e28ca
Compare
1168a23 to
fa02ed5
Compare
41e28ca to
1c0d35f
Compare
0912158 to
6237ebc
Compare
1c0d35f to
494c3f6
Compare
6237ebc to
bcb0423
Compare
494c3f6 to
0482d81
Compare
bcb0423 to
55c9886
Compare
| LOGGER = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class OpaClient: |
There was a problem hiding this comment.
Nit: might be helpful to have a brief comment explaining the difference between OpaClient and OpaUserClient
There was a problem hiding this comment.
Can you add this comment ?
e2cbd6d to
aaa33b4
Compare
ZohebShaikh
left a comment
There was a problem hiding this comment.
I have checked that the policy is working as expected. There is just one docs update which can be added at a later point
Require authz checks as part of endpoints that modify state of the blueapi deployment either by running plans or changing existing tasks.