codingtom
09/22/2023, 10:14 PMBearer header?)
- For patient data access, is it straightforward to have the TS client impersonate a given patient/user for a given request? (This is more of a general question - but we have not yet got this far with regular API requests either). Not sure what constraints are placed on authenticating as a user - e.g. if we would need to pass in a password that we store in another database or something. Patients will not have access to these Medplum accounts - we would only use them to separate resources.
- An alternative to using access controls like this would be to query with an administrative (or full read-only access) user - but always enforce a compartment for data. For example, even when querying for a single ID, use a search query with (_compartment: "Patient/...", _id: "..."). Do you see any drawbacks to this approach? A primary concern we have is the nested/cyclic nature of GQL - for example, if it were possible to query related patients from a parent resource a couple of layers deep (e.g. hypothetically, expand fields from all Patients who had visited a Location), we might inadvertently expose data outside of the compartment specified at the top level. Do you know if the top-level compartment specified on the GQL query cascades down to deeper layers? The example is contrived, but we want to be certain that it's not possible.codingtom
09/22/2023, 10:14 PMrahul1
09/23/2023, 5:23 AMrahul1
09/23/2023, 5:24 AMrahul1
09/23/2023, 5:29 AMMedplumClient.setBasicAuth() method to set the basic authentication header on every request.rahul1
09/23/2023, 5:30 AM_compartment parameter transitively, so I wouldn't recommend thisrahul1
09/23/2023, 5:30 AMcodingtom
09/23/2023, 6:38 PM_compartment - sounds like we will need to explore proper access controls here. I'm sure we can figure out a scheme for making requests with per-request credentials, this gives us enough to explore I think. Thanks!codingtom
09/25/2023, 5:25 PMreshma
09/25/2023, 5:43 PMjnak
10/06/2023, 7:16 PM