You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For DataBiosphere/data-browser#1662 we need to determine if a snapshot is public. We originally planned on doing this by making two enumerateSnapshots requests, one with the credentials of a service account (the public SA) that has no special permissions in TDR and another one with those of the service account that has access to all snapshots (the indexer SA). From the difference between the two responses we planned to infer which snapshots are public. The original plan turns out to also be complicating our code and making it inefficient.
I think TDR should include a boolean property on both enumerateSnapshots and retrieveSnapshot that is True for public snapshots. Knowing whether a snapshot is public should not have to be inferred by triangulating with requests from different identities. An identity (user, service account) that has special access to non-public snapshots should be able to tell from the TDR response whether a snapshot is accessible to them because it is a non-public snapshot to which they have explicit access, or because it is public.
Assuming that the public status of a snapshot is easily retrievable and does not require additional round-trips to the backend database, this should be easy to implement.
The text was updated successfully, but these errors were encountered:
hannes-ucsc
changed the title
TDR's enumerateSnapshots and retrieveSnapshot responses lack public status
Can't tell from TDR's responses whether snapshot is public
Dec 10, 2021
For DataBiosphere/data-browser#1662 we need to determine if a snapshot is public. We originally planned on doing this by making two
enumerateSnapshots
requests, one with the credentials of a service account (the public SA) that has no special permissions in TDR and another one with those of the service account that has access to all snapshots (the indexer SA). From the difference between the two responses we planned to infer which snapshots are public. The original plan turns out to also be complicating our code and making it inefficient.I think TDR should include a boolean property on both
enumerateSnapshots
andretrieveSnapshot
that is True for public snapshots. Knowing whether a snapshot is public should not have to be inferred by triangulating with requests from different identities. An identity (user, service account) that has special access to non-public snapshots should be able to tell from the TDR response whether a snapshot is accessible to them because it is a non-public snapshot to which they have explicit access, or because it is public.Assuming that the public status of a snapshot is easily retrievable and does not require additional round-trips to the backend database, this should be easy to implement.
The text was updated successfully, but these errors were encountered: