Directories
¶
| Path | Synopsis |
|---|---|
|
Package audit is the platform's ONE audit writer: every service writes its own audit.<module>__* table through this package instead of hand-rolling INSERT statements per service.
|
Package audit is the platform's ONE audit writer: every service writes its own audit.<module>__* table through this package instead of hand-rolling INSERT statements per service. |
|
Package authz wires the authz service: the fragment-loaded engine, the transactional grant store, the effective-access decision, and their HTTP surface.
|
Package authz wires the authz service: the fragment-loaded engine, the transactional grant store, the effective-access decision, and their HTTP surface. |
|
client
Package client is the shared "is this caller the platform superadmin" AdminAuthorizer implementation, used by org, identity, registry and the gateway's superadmin guard.
|
Package client is the shared "is this caller the platform superadmin" AdminAuthorizer implementation, used by org, identity, registry and the gateway's superadmin guard. |
|
decision
Package decision implements the effective-access decision EXACTLY: the ordered 8-step, fail-closed effective-access decision, the 13-reason enum (OPENFGA_DENIED is named ENGINE_DENIED here — the engine is not OpenFGA), and evidence/batchCan semantics.
|
Package decision implements the effective-access decision EXACTLY: the ordered 8-step, fail-closed effective-access decision, the 13-reason enum (OPENFGA_DENIED is named ENGINE_DENIED here — the engine is not OpenFGA), and evidence/batchCan semantics. |
|
engine
Package engine is the evaluator for the supported Zanzibar subset (this, computedUserset, tupleToUserset, union).
|
Package engine is the evaluator for the supported Zanzibar subset (this, computedUserset, tupleToUserset, union). |
|
fragment
Package fragment loads module authz fragments (a module's authz.fragment.json "relations" JSON) into the effective engine.Model, subset-walled and inert for modules the registry doesn't know about or has disabled: an unknown/disabled module's fragment contributes NOTHING to the effective model, and — the property this package exists to prove — a check against an object type that belongs ONLY to such a fragment answers false, never errors, never allows.
|
Package fragment loads module authz fragments (a module's authz.fragment.json "relations" JSON) into the effective engine.Model, subset-walled and inert for modules the registry doesn't know about or has disabled: an unknown/disabled module's fragment contributes NOTHING to the effective model, and — the property this package exists to prove — a check against an object type that belongs ONLY to such a fragment answers false, never errors, never allows. |
|
store
The default module-access tuple writer.
|
The default module-access tuple writer. |
|
Package bootstrap implements the kiban-bootstrap step runner: an ordered set of idempotent, individually-logged steps (preflight, migrations orchestration, realm reconciliation, service accounts, superadmin, seed, verify) that each report a truthful applied|converged|failed outcome.
|
Package bootstrap implements the kiban-bootstrap step runner: an ordered set of idempotent, individually-logged steps (preflight, migrations orchestration, realm reconciliation, service accounts, superadmin, seed, verify) that each report a truthful applied|converged|failed outcome. |
|
Package config loads configuration from environment variables, with support for *_FILE secret-file variants that take precedence over the plain env var when both are set.
|
Package config loads configuration from environment variables, with support for *_FILE secret-file variants that take precedence over the plain env var when both are set. |
|
Package errenv defines the platform's error and success envelope shapes, the canonical error codes, and HTTP writers for both.
|
Package errenv defines the platform's error and success envelope shapes, the canonical error codes, and HTTP writers for both. |
|
The sample shell's minimal group admin surface — the position admin slice pattern applied to groups.
|
The sample shell's minimal group admin surface — the position admin slice pattern applied to groups. |
|
Package httpx provides plumbing-only HTTP middleware shared across services: correlation-id propagation, panic recovery, and access logging.
|
Package httpx provides plumbing-only HTTP middleware shared across services: correlation-id propagation, panic recovery, and access logging. |
|
The real AdminAuthorizer, replacing denyAllAuthorizer in production.
|
The real AdminAuthorizer, replacing denyAllAuthorizer in production. |
|
Package livestack is a shared guard that live-dependent test helpers and the infra/e2e-*.sh / modules/*/curl-proof.sh scripts use to detect when the deployment they would otherwise mutate is the PUBLIC stack (`make public-up`) rather than an isolated one: `make check`/`make test` must never mutate a deployment a human is using (test runs against a public deployment can revert realm redirect URIs, restore required actions, and truncate org tables).
|
Package livestack is a shared guard that live-dependent test helpers and the infra/e2e-*.sh / modules/*/curl-proof.sh scripts use to detect when the deployment they would otherwise mutate is the PUBLIC stack (`make public-up`) rather than an isolated one: `make check`/`make test` must never mutate a deployment a human is using (test runs against a public deployment can revert realm redirect URIs, restore required actions, and truncate org tables). |
|
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0 |
|
Package obs provides the platform's structured logger: a JSON slog handler to stderr with correlation-id awareness.
|
Package obs provides the platform's structured logger: a JSON slog handler to stderr with correlation-id awareness. |
|
metrics
Package metrics is the platform's Prometheus exposition package: one Registry per service process, built once in that service's main and threaded through to (a) an HTTP middleware wrapped directly around the service's own mux (b) a GET /metrics handler on the service's own listener and (c) whichever service-specific Record*/Observe* calls that service's own code needs (authz's decision path, notification's delivery worker, the gateway's module proxy).
|
Package metrics is the platform's Prometheus exposition package: one Registry per service process, built once in that service's main and threaded through to (a) an HTTP middleware wrapped directly around the service's own mux (b) a GET /metrics handler on the service's own listener and (c) whichever service-specific Record*/Observe* calls that service's own code needs (authz's decision path, notification's delivery worker, the gateway's module proxy). |
|
The production AdminAuthorizer.
|
The production AdminAuthorizer. |
|
Package pgconv holds the nullable-column conversions every pgx-backed store repeats.
|
Package pgconv holds the nullable-column conversions every pgx-backed store repeats. |
|
The real AdminAuthorizer (service.go's interface).
|
The real AdminAuthorizer (service.go's interface). |
|
Package testauditgolden is a shared helper for golden tests of audit event PAYLOAD SHAPE (keys + JSON value types, never values themselves — an audit payload routinely carries real member/company/document IDs and titles that must never be pinned verbatim into a checked-in fixture).
|
Package testauditgolden is a shared helper for golden tests of audit event PAYLOAD SHAPE (keys + JSON value types, never values themselves — an audit payload routinely carries real member/company/document IDs and titles that must never be pinned verbatim into a checked-in fixture). |
|
Package testchaos provides shared "dependency down" fake upstream servers for chaos tests: every module's HTTP layer must prove fail-closed (authz-down -> 503 AUTHORIZATION_UNAVAILABLE, org-down -> 503, never a fallback to stale data) and, where the module's design says so, fail-open-by-design (notification-down must not fail the business write it's attached to).
|
Package testchaos provides shared "dependency down" fake upstream servers for chaos tests: every module's HTTP layer must prove fail-closed (authz-down -> 503 AUTHORIZATION_UNAVAILABLE, org-down -> 503, never a fallback to stale data) and, where the module's design says so, fail-open-by-design (notification-down must not fail the business write it's attached to). |
|
Package testopenapi is a reusable helper: load a module's openapi.yaml fragment once, then validate RECORDED handler-test responses (status + body) against the operation the request actually matched, so the running service is proven to honor its contract at the HTTP boundary.
|
Package testopenapi is a reusable helper: load a module's openapi.yaml fragment once, then validate RECORDED handler-test responses (status + body) against the operation the request actually matched, so the running service is proven to honor its contract at the HTTP boundary. |
|
Package testsec is the shared negative-security matrix: one place that generalizes the ad hoc 401/403/503/forged-header pattern internal/gateway/admin_position_routes_test.go and admin_group_routes_test.go established, so every guarded route in the gateway and all four module HTTP layers is proven, not just the ones a human remembered to hand-write a matrix for.
|
Package testsec is the shared negative-security matrix: one place that generalizes the ad hoc 401/403/503/forged-header pattern internal/gateway/admin_position_routes_test.go and admin_group_routes_test.go established, so every guarded route in the gateway and all four module HTTP layers is proven, not just the ones a human remembered to hand-write a matrix for. |
|
Package version carries the platform's own build identity — Version (the VERSION file's contents, e.g.
|
Package version carries the platform's own build identity — Version (the VERSION file's contents, e.g. |
Click to show internal directories.
Click to hide internal directories.