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

flexy definition of group recp #97

Closed
wants to merge 4 commits into from
Closed

flexy definition of group recp #97

wants to merge 4 commits into from

Conversation

mixmix
Copy link
Member

@mixmix mixmix commented Oct 13, 2022

hit a problem, needed this

@mixmix mixmix requested a review from staltz October 13, 2022 04:36
Copy link
Member

@staltz staltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we drop this recps validation (on line 87) entirely? It doesn't seem like it belongs to this module. recps and encryptionFormat are just passed along down to ssb-db2 which then passes recps to ssb-box2, and it's ssb-box2's responsibility to validate recps.

It feels out of place that we're doing box2 recps validation in this module which should just be about the metafeed tree. Perhaps we could add this validation to ssb-tribes2 once that one uses ssb-meta-feeds.

It would be useful to allow box1 encryption here too. I'm not sure there is consensus that ssb-box1 should be hard deprecated.

@mixmix
Copy link
Member Author

mixmix commented Oct 17, 2022

@staltz this is a good point. I should have left a note in the code (and now have).
The reason we're checking recps is because we don't have a clear specification for how non-groupId recps should work. i.e. if I put a feedId in... tell me how I use that to map to a keyScheme in meta-feeds? Should I always use the rootMF? If we don't then we will have to try 100x more decryptions because any encrypted message could be DM'ing ANY of our subfeeds.

UNDER-specified => locked down

Recap from #89
image

@mixmix mixmix requested a review from staltz October 17, 2022 22:48
@mixmix
Copy link
Member Author

mixmix commented Oct 17, 2022

Opened an issue ssbc/ssb-meta-feeds-migration-spec#4

@staltz
Copy link
Member

staltz commented Oct 18, 2022

Mmm, sorry Mix, I still don't understand why this logic would belong in this module.

if I put a feedId in... tell me how I use that to map to a keyScheme in meta-feeds? Should I always use the rootMF?

Suppose you're using ssb-meta-feeds inside a module called ssb-foo-bar. Then the recps selected inside ssb-foo-bar are passed to ssb-meta-feeds, which just redirects them down to ssb-box2, which in turn does some validation and then redirects them to ssb-keyring, which also does some validation albeit different kind of validation (e.g. can't do a DM between two keys you own).

graph LR;
  ssb-foo-bar -- recps --> ssb-meta-feeds -- recps --> ssb-box2 -- recps --> ssb-keyring
Loading

My point is that validation should happen in ssb-box2 and ssb-keyring, and that it's ssb-foo-bar's responsibility for choosing the friend's rootMF if they want to announce a private subfeed that only the friend's rootMF can know about. So I'm saying that ssb-meta-feeds shouldn't do any recps validation.

UNDER-specified => locked down

What does this mean?

@staltz
Copy link
Member

staltz commented Nov 3, 2022

For the sake of getting things done, I pushed commit d894b1e to master which removes validation of recps. This PR was last commented on 16 days ago, and we have to move a lot faster than that, so I just made a decision.

We can keep discussing this idea and it's possible to revert the decision in the future if we want.

@staltz staltz closed this Nov 3, 2022
@staltz staltz deleted the groupId_ish branch November 3, 2022 11:31
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.

None yet

2 participants