Documentation
¶
Overview ¶
Package main is the dev-idp binary entrypoint. Boots an HTTP server on GRAM_DEVIDP_ADDRESS that mounts:
- the Goa management API (under /rpc/...) for /users, /organizations, /memberships, /organization_roles, /invitations, /devIdp;
- the local-speakeasy mode at /local-speakeasy/;
- the oauth2 mode at /oauth2/;
- the oauth2-1 mode at /oauth2-1/;
- the workos mode at /workos/ (only when WORKOS_API_KEY is set).
A second tiny health server is mounted on GRAM_DEVIDP_CONTROL_ADDRESS.
dev-idp is dev-only -- no auth, no OTel SDK, no production safety guardrails. Intended to back local end-to-end tests of Gram's auth flows.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package design declares the Goa API for the dev-idp management surface.
|
Package design declares the Goa API for the dev-idp management surface. |
|
gen
|
|
|
internal
|
|
|
bootstrap
Package bootstrap opens dev-idp's SQLite database and applies the embedded schema on every start.
|
Package bootstrap opens dev-idp's SQLite database and applies the embedded schema on every start. |
|
config
Package config parses dev-idp's runtime configuration.
|
Package config parses dev-idp's runtime configuration. |
|
conv
Package conv has dev-idp's tiny set of *string <-> sql.NullString and related helpers.
|
Package conv has dev-idp's tiny set of *string <-> sql.NullString and related helpers. |
|
defaultuser
Package defaultuser implements the dev-idp's "default user" bootstrap.
|
Package defaultuser implements the dev-idp's "default user" bootstrap. |
|
keystore
Package keystore owns the dev-idp's single RSA keypair (idp-design.md §5.3): the only signing key the dev-idp uses, sourced from GRAM_DEVIDP_RSA_PRIVATE_KEY (PEM) at boot or freshly generated when the env var is unset.
|
Package keystore owns the dev-idp's single RSA keypair (idp-design.md §5.3): the only signing key the dev-idp uses, sourced from GRAM_DEVIDP_RSA_PRIVATE_KEY (PEM) at boot or freshly generated when the env var is unset. |
|
middleware
Package middleware provides the small set of HTTP/Goa middleware dev-idp needs.
|
Package middleware provides the small set of HTTP/Goa middleware dev-idp needs. |
|
modes/localspeakeasy
Package localspeakeasy implements the dev-idp's local-speakeasy mode — a drop-in port of the standalone local-speakeasy-idp binary's /v1/speakeasy_provider/* surface (idp-design.md §7.1) onto the dev-idp's shared Postgres store and per-mode currentUser.
|
Package localspeakeasy implements the dev-idp's local-speakeasy mode — a drop-in port of the standalone local-speakeasy-idp binary's /v1/speakeasy_provider/* surface (idp-design.md §7.1) onto the dev-idp's shared Postgres store and per-mode currentUser. |
|
modes/oauth2
Package oauth2 implements the dev-idp's oauth2 mode (idp-design.md §7.4): an OAuth 2.0 authorization server with optional PKCE (honored when present), no DCR, and OIDC compliance.
|
Package oauth2 implements the dev-idp's oauth2 mode (idp-design.md §7.4): an OAuth 2.0 authorization server with optional PKCE (honored when present), no DCR, and OIDC compliance. |
|
modes/oauth21
Package oauth21 implements the dev-idp's oauth2-1 mode (idp-design.md §7.3): an OAuth 2.1 authorization server with PKCE-required (S256), stateless DCR, and OIDC compliance.
|
Package oauth21 implements the dev-idp's oauth2-1 mode (idp-design.md §7.3): an OAuth 2.1 authorization server with PKCE-required (S256), stateless DCR, and OIDC compliance. |
|
modes/workos
Package workos implements the dev-idp's workos mode — emulates the Speakeasy IDP shape (the same /v1/speakeasy_provider/* surface served by /local-speakeasy/) but resolves user and organization data from the live WorkOS REST API instead of the dev-idp's local Postgres tables.
|
Package workos implements the dev-idp's workos mode — emulates the Speakeasy IDP shape (the same /v1/speakeasy_provider/* surface served by /local-speakeasy/) but resolves user and organization data from the live WorkOS REST API instead of the dev-idp's local Postgres tables. |
|
oops
Package oops is dev-idp's lightweight error helper.
|
Package oops is dev-idp's lightweight error helper. |
|
service
Package service contains the dev-idp's Goa service implementations (organizations, users, memberships, devIdp).
|
Package service contains the dev-idp's Goa service implementations (organizations, users, memberships, devIdp). |
|
workos
Package workos is dev-idp's tiny WorkOS client.
|
Package workos is dev-idp's tiny WorkOS client. |
|
pkg
|
|
|
devidptest
Package devidptest spins up a real dev-idp HTTP server inside a test.
|
Package devidptest spins up a real dev-idp HTTP server inside a test. |
|
testidp
Package testidp serves an in-process Speakeasy IDP for tests.
|
Package testidp serves an in-process Speakeasy IDP for tests. |
Click to show internal directories.
Click to hide internal directories.