Private services
When registering an endpoint, every service is by default reachable via HTTP requests to the ingress. You can configure a service asprivate
, via the service configuration.
Note that private services can still be invoked by other handlers via the SDK.
Locking down service access
Only Restate needs to be able to make requests to your services. The Restate Server will proxy all requests for these services. Therefore, it is advisable to ensure that only Restate can reach your service. Unrestricted access to the services is dangerous. If you’re working with multiple Restate instances, you also may want to check that requests are coming from the right instance. To make this easier, Restate has a native request identity feature which can be used in the SDK to cryptographically verify that requests have come from a particular Restate instance. To get started, you need an ED25519 private key, which you can generate using openssl as follows:RESTATE_REQUEST_IDENTITY_PRIVATE_KEY_PEM_FILE=private.pem
.
On start, Restate will log out the public key in a convenient compact
format:
generate.sh
publickeyv1_w7YHemBctH5Ck2nQRQ47iBBqhNHy4FV7t2Usbye2A6f
does not
need to be kept secret and can be safely included in your code when providing to the
SDK. To learn how to provide the public key to the SDK, see the serving docs of your SDK:
(TS /
Java /
Go /
Python /
Rust)