Skip to content
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

Add vessel data structures for authentication #139

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

madeline-os
Copy link
Collaborator

@madeline-os madeline-os commented Oct 15, 2021

These data structures are based on previous solutions for authentication by @danbornside based on SubVessel (wrapped as AuthMapV) as well as Cale's idea for ErrorV which handles possibly failing queries in a way that does not expose incoherent behavior to the end-users. There is also an AuthenticatedV wrapper which glues together two view selectors which need have no relation to each other in particular, but the intended use case is to combine it with AuthMapV.

The handler provided for AuthMapV assumes that the result of the query does not depend on the specific identity making the query. This allows efficient aggregation of queries across different authenticated users. There are other sorts of authenticated queries which do depend on the specific identity, like querying for one's own profile. One way we can accommodate such queries is to extend AuthenticatedV with a third key for "Personal" queries which use AuthMapV but do not do query aggregation.

This PR should be updated once obsidiansystems/vessel#14 is merged.

@Yasuke
Copy link

Yasuke commented Oct 18, 2021

LGTM, but I wouldn't mind seeing someone else rip into this one, as I don't do a ton of type work like this often!

@Ericson2314
Copy link
Member

Ericson2314 commented Oct 18, 2021

Per what I wrote in the chat, I think we are better off not bothering compose Compose, and just using :.:, until the base and base-orphans are fixed. That will make the version bumping of GHC and libraries we do easier at little cost.

@cgibbard
Copy link
Collaborator

@Ericson2314 Which chat? Also, what's the difference we're concerned about? There are some other places we're already using Compose...

@ali-abrar
Copy link
Member

Thank you @madeline-os

@ali-abrar ali-abrar merged commit ecef962 into develop Nov 15, 2021
@ali-abrar ali-abrar deleted the auth-vessels branch November 20, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants