Skip to content

Fix sending a message without all receiver public keys#143

Merged
TKussel merged 8 commits intodevelopfrom
fix/encryption-public-keys
Jul 5, 2023
Merged

Fix sending a message without all receiver public keys#143
TKussel merged 8 commits intodevelopfrom
fix/encryption-public-keys

Conversation

@Threated
Copy link
Member

I had to change all the return types to enable telling the client which proxy he can't send stuff to.
The Response code I used is not really intended for such a case but it seemed resonable.
The description says:

The HTTP 424 Failed Dependency client error response code indicates that the method could not be performed on the resource because the requested action depended on another action, and that action failed.

@Threated
Copy link
Member Author

I am still unsure about fully rejecting to send anything if one recipient has invalid certs as all applications using beam would need to implement the same logic where they say ok I got this status I need to resend the msg without these recipients. I still think it would be more intuitive if they would just get filtered out as apps already have to deal with not getting results from certain sights.

@lablans
Copy link
Member

lablans commented Jun 29, 2023

Beam is not only used for federated queries via Lens. I would argue for strong guarantees within Beam itself. So if Beam.Proxy knows it cannot deliver to at least one recipient, it should say so, reject the request and issue a corresponding response.

To make this response actionable by the calling application, it should be machine-readable (e.g. JSON) and contain the offending AppIDs along with a (free-text) error. There's at least two cases for errors: a) Site is known but no valid certificate found; b) Site is not even known.

@TKussel , your stance?

@TKussel TKussel merged commit c6886af into develop Jul 5, 2023
@TKussel TKussel deleted the fix/encryption-public-keys branch July 5, 2023 13:54
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.

3 participants