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

feat: Integrate service messages #48

Merged
merged 3 commits into from
Mar 9, 2021
Merged

feat: Integrate service messages #48

merged 3 commits into from
Mar 9, 2021

Conversation

gnarea
Copy link
Member

@gnarea gnarea commented Mar 9, 2021

Relaynet requires each parcel to encapsulate exactly one service message encrypted. This fixes #42.

The following changes were also necessary:

  • Drop Message.payload. Its equivalent in a service message is called content.
    • IncomingMessage.content supersedes the old Message.payload.
    • OutgoingMessage doesn't have an equivalent to the old .payload
  • Capture the service message type in the Messages. This type is to be used by app developers to determine how to process the content; for example, something like image/png could be rendered on screen whilst something like application/json; type=Tweet could be JSON-deserialised and verified against a schema.
    • OutgoingMessage.build() now requires the type.
    • IncomingMessage.type exposes the type.
  • Promote the identity certificate from the children of ThirdPartyEndpoint to the parent class. This is needed to encrypt messages regardless of whether the endpoint is private or public.

gnarea added 3 commits March 9, 2021 10:31
Each parcel encapsulates exactly one Relaynet _service message_ encrypted. This fixes #42.

The following changes were also necessary:

- Drop `Message.payload`. Its equivalent in a service message is called _content_.
  - `IncomingMessage.content` supersedes the old `Message.payload`.
  - `OutgoingMessage` doesn't have an equivalent to the old `.payload`
- Capture the service message _type_ in the `Message`s. This type is to be used by app developers to determine how to process the `content`; for example, something like `image/png` could be rendered on screen whilst something like `application/json; type=Tweet` could be JSON-deserialised and verified against a schema.
  - `OutgoingMessage.build()` now requires the `type`.
  - `IncomingMessage.type` exposes the `type`.
- Promote the identity certificate from the children of `ThirdPartyEndpoint` to the parent class. This is needed to encrypt messages regardless of whether the endpoint is private or public.
@gnarea gnarea merged commit 67c8cb9 into main Mar 9, 2021
@gnarea gnarea deleted the service-message-encrypt branch March 9, 2021 10:57
@github-actions
Copy link

github-actions bot commented Mar 9, 2021

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encrypt service messages
2 participants