feat: use service account for tiled insertion#1398
feat: use service account for tiled insertion#1398ZohebShaikh wants to merge 11 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1398 +/- ##
==========================================
+ Coverage 95.04% 95.16% +0.12%
==========================================
Files 43 43
Lines 2786 3042 +256
==========================================
+ Hits 2648 2895 +247
- Misses 138 147 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a7cd2c8 to
224862a
Compare
tpoliaw
left a comment
There was a problem hiding this comment.
Running plans seems to work ok but I'm getting a 500 Internal Server Error when trying to access tiled through its docs UI.
Not sure if it's a bug on our side or theirs but from the tiled logs it's coming from the dls.py module
[...]
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/router.py", line 329, in search
tiled-1 | entry = await get_entry(
tiled-1 | ^^^^^^^^^^^^^^^^
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/dependencies.py", line 49, in get_entry
tiled-1 | entry = await filter_for_access(
tiled-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/utils.py", line 104, in filter_for_access
tiled-1 | await access_policy.allowed_scopes(
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/access_control/access_policies.py", line 562, in allowed_scopes
tiled-1 | self.build_input(
tiled-1 | File "/deploy/config/dls.py", line 101, in build_input
tiled-1 | principal.type is PrincipalType.external
tiled-1 | ^^^^^^^^^^^^^^
tiled-1 | AttributeError: 'NoneType' object has no attribute 'type'
| diamond-policies: | ||
| service: ghcr | ||
| resource: ghcr.io/diamondlightsource/authz-policy:0.0.18 | ||
| resource: ghcr.io/zohebshaikh/authz-policy:0.2.2 |
There was a problem hiding this comment.
This should wait for the authz update before it's merged
|
When running a plan with an unexpected instrument session, eg |
Try going to localhost:4181 for tiled authenticated access |
The service account only has permission for proposal 1 so this looks correct to me |
Sure but I'd expect a
I think I've misunderstood the premise here. I thought the service account could write anything. |
|
The service account can written data should only for a particular beamline or particular proposal or and the permissions can be set here If we give a beamline permission to write to anything they can potential delete stuff from any beamline as well The 500 error , I can fix as it coming from dls.py |
AuthZ Changes here