Deploy the gRPC gateway
Run the gateway as a separate Lemline process to let applications start workflows and read their history. The process uses the same Lemline binary as the workers. It takes its own listen ports and can run on a separate host when the configured backends are reachable from both.
Connect the gateway to the workers' infrastructure
Point
lemline.databaseat the orchestration database used by the workers. The gateway reads definitions and stores accepted starts there.Point
lemline.messagingat the workers' broker and use the same commands channel. Keep a worker running withlemline listenin each namespace you intend to serve.Point
lemline.analyticsat the lifecycle analytics store populated by the workers. See Lifecycle Analytics Reference for the datasource and ingestion settings. For a same-host SQLite installation, use the same local database files in both processes.If this gateway should serve a subset of namespaces, set
lemline.namespacesin its configuration. When unset, the gateway serves all namespaces allowed by the caller's token.
Enable TLS and bearer authentication
Use a server certificate for the gateway hostname and a JWT issuer that publishes verification keys at a JWKS URL. Merge the following shape into the gateway's existing configuration. Replace the paths and issuer URLs with the values for your environment. See Gateway TLS for certificate settings, including client certificates.
Start the gateway with that file. Configure a different metrics port if the worker uses the default port on the same host.
Verify an authenticated request
Install grpcurl and jq, and set these variables in the client shell before making the call:
Variable | Value |
|---|---|
| Absolute path to the source checkout for the Lemline version you run |
| Gateway hostname and gRPC port, for example |
| PEM file for the CA that signed the gateway certificate |
| A namespace containing a published definition and allowed by your token |
| A valid bearer token from the configured issuer. With the default claims, include the namespace in the |
The response includes one definition from the requested namespace. For UNAUTHENTICATED, check the token's issuer, expiry and signing key. For an authorization error, check the token's namespace claim and the gateway's namespace configuration. Starting instances requires the lemline.start scope. Live watch calls require lemline.watch.
See gRPC Gateway Reference for API options, scopes and status codes.