Skip to main content

Forgeline

An internal developer platform: a CLI that signs in with a code, a gateway, and three services that pass identity along with a narrower token at each hop.

ApplicationPlanned
This example is planned. Not built yet. This page is the specification for the example.
Works with
GoPythonJavaScript / TypeScriptlumo CLIGo net/httpFastAPIExpressGitHub Actions
Stack
Go CLI, Go gateway, services in Go, Python and Node.js

Scenario​

A developer types forge deploy. The CLI is signed in as that developer. The gateway checks the token and calls the build service, which calls the artifact service, which calls the deploy service. Each service receives a token for itself only. A nightly job has no person behind it and uses its own credentials.

People and agents​

WhoRole in the applicationIdentity in LumoAuth
DeveloperRuns the CLI.A user with a role for each environment.
Nightly jobCleans old builds.A confidential application with one scope.
Three servicesBuild, artifacts, deploy.Three resources, each with its own audience.

Flows​

FlowWhat happensWhat LumoAuth does
Loginforge login shows a code.The device grant. Refresh tokens keep the CLI signed in.
GatewayThe gateway receives a call.Introspection for opaque tokens, local verification for JWTs.
HopThe build service calls the artifact service.A token exchange for the audience of the next service. The developer stays the subject.
PermissionThe deploy service checks "may deploy to production".A permission check for the developer.
MachineThe nightly job runs.The client credentials grant, with one scope.
PipelineCI applies configuration to a sandbox.An API key, the CLI and the generated client.

Parts​

PartBuilt withJob
CLIGoDevice sign-in and calls to the gateway.
GatewayGo, the Go SDKToken checks.
ServicesGo, FastAPI, ExpressOne SDK each, to show the same hop in three languages.

What the seed script creates​

  • An application for the CLI with the device grant.
  • Three resources and their scopes.
  • Roles for each environment.
  • An application for the nightly job.
  • An API key for CI.

Walkthrough​

  1. Run forge login.
  2. Run forge deploy staging, and read the three tokens in the logs.
  3. Run forge deploy production without the role, and read the refusal.
  4. Run the nightly job.