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.
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
| Who | Role in the application | Identity in LumoAuth |
|---|---|---|
| Developer | Runs the CLI. | A user with a role for each environment. |
| Nightly job | Cleans old builds. | A confidential application with one scope. |
| Three services | Build, artifacts, deploy. | Three resources, each with its own audience. |
Flows
| Flow | What happens | What LumoAuth does |
|---|---|---|
| Login | forge login shows a code. | The device grant. Refresh tokens keep the CLI signed in. |
| Gateway | The gateway receives a call. | Introspection for opaque tokens, local verification for JWTs. |
| Hop | The build service calls the artifact service. | A token exchange for the audience of the next service. The developer stays the subject. |
| Permission | The deploy service checks "may deploy to production". | A permission check for the developer. |
| Machine | The nightly job runs. | The client credentials grant, with one scope. |
| Pipeline | CI applies configuration to a sandbox. | An API key, the CLI and the generated client. |
Parts
| Part | Built with | Job |
|---|---|---|
| CLI | Go | Device sign-in and calls to the gateway. |
| Gateway | Go, the Go SDK | Token checks. |
| Services | Go, FastAPI, Express | One 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
- Run
forge login. - Run
forge deploy staging, and read the three tokens in the logs. - Run
forge deploy productionwithout the role, and read the refusal. - Run the nightly job.