relay
relay copied to clipboard
feat(relay): add mechanism to only allow events from trusted relays
This PR adds a signature to requests between relays which is used to verify if the request comes from a trusted relay.
It works by adding a signed header when sending the request upstream which will be checked if the proper setting is enabled. If the signature fails the verification, then the envelope is dropped and an outcome is produced.
The signature will only be checked if the request comes from external relays, since we don't need to verify that an internal relay is trusted.