Skip to content

Caching and restricting read access #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joepio opened this issue Aug 17, 2021 · 1 comment
Open

Caching and restricting read access #170

joepio opened this issue Aug 17, 2021 · 1 comment
Labels
security server atomic-server

Comments

@joepio
Copy link
Member

joepio commented Aug 17, 2021

Whenever the server requires an external resource, it will save it to the store which helps to keep it fast (especially for Properties).

As of now, all these resources are also available in collections (when you pass a query param). This means external resources are public, too. Since currenlty all atomic resources are public anyway, this is not a problem. But if Servers, for any reason, could access private data, this could be a possible leak.

See authentication #13

@joepio
Copy link
Member Author

joepio commented Dec 11, 2021

This problem seems interesting and difficult. Let's look at some approaches. We'll name the server holding the cached resources the Cacher and the other server the Source.

Cacher never downloads non-public resources

This is currently the case. (which means this issue is not a concern right now)
It works, but it limits what the Cacher can do with external data.
In practice, this means that the Client (browser client) always has to fetch data from the source itself, making it impossible to cache it in the Cacher.

Cacher performs authorization checks for external resources

Similar to how regular collections are implemented, the Cacher perform authorization checks on each resource for the user making the request before sending it.

  • Performance hit that can be big if the Source has a complex / deeply nested structure for determining authorization
  • Fails when the Source has different logic / rules / plugins to determine authorization.

I don't think this approach will suffice.

Cached resources are only shown to the Pod owner

Collections can simply skip all non-local resources if anyone else but the owner is making the request.
Severely limits what you can do, such as when a team is using one Server.

@joepio joepio removed this from the v0.32 self-hosting milestone Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security server atomic-server
Projects
None yet
Development

No branches or pull requests

1 participant