microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
7 stars 3 forks source link

Workflow queries:run access for site_clients #783

Closed shreddd closed 1 week ago

shreddd commented 1 week ago

In this branch, I enabled access for approved workflow site clients to make updates via the /queries:run endpoint, if they are authorized in the _runtime.api.allow collection in Mongo

Details

If a user comes in via an access token for a workflow client (prefix client: in the sub: field of JWT) they were previously denied access to the /queries:run endpoint. This is a blocker for https://github.com/microbiomedata/nmdc_automation/issues/280

Moving forward we want to migrate workflow client functionality into the standard "User" model so this is a step in that direction

Related issue(s)

Fixes issue #776

Related subsystem(s)

Testing

I tested these changes by adding tests to test_endpoints.py

Documentation

NA

Maintainability

TBD