atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Require agent in all authenticated methods

Open joepio opened this issue 2 years ago • 0 comments

Currently, functions that authentication (e.g. Store::get_resource_extended) take an Opion<Agent>. If passed None, they skip authentication. If the user does not have an Agent, we pass PublicAgent. I think I made a mistake with this design, because it is insecure by default. The public case should be the None option, not the other way around.

The question that remains is: What will a sudo type of call look like? Do we pass a SuperAgent const &str? Or does the users have to Store.get_default_agent() every time?

joepio avatar Sep 22 '22 08:09 joepio