corecells

module
v0.0.0-...-043add5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2026 License: MIT

Directories

Path Synopsis
Package accesscore implements the accesscore Cell: identity management, session lifecycle (login/refresh/logout/validate), RBAC authorization, and role queries.
Package accesscore implements the accesscore Cell: identity management, session lifecycle (login/refresh/logout/validate), RBAC authorization, and role queries.
accesscoretest
Package accesscoretest provides public test-infrastructure helpers for the accesscore cell.
Package accesscoretest provides public test-infrastructure helpers for the accesscore cell.
configgetter
Package configgetter wires accesscore ConfigGetter adapters.
Package configgetter wires accesscore ConfigGetter adapters.
internal/abac
Package abac is the ABAC (Attribute-Based Access Control) policy authoring and persistence model for accesscore.
Package abac is the ABAC (Attribute-Based Access Control) policy authoring and persistence model for accesscore.
internal/accountlockout
Package accountlockout is the typed mediator that drives auto-lockout decisions for sessionlogin.
Package accountlockout is the typed mediator that drives auto-lockout decisions for sessionlogin.
internal/adapters/http
Package http provides HTTP adapter implementations for accesscore's outbound cross-cell calls.
Package http provides HTTP adapter implementations for accesscore's outbound cross-cell calls.
internal/adapters/postgres/internal/pgexec
Package pgexec is the sealed PostgreSQL executor funnel for the accesscore adapter.
Package pgexec is the sealed PostgreSQL executor funnel for the accesscore adapter.
internal/adminprovision
Package adminprovision encapsulates the idempotent, race-safe "bring the first admin into existence" domain logic.
Package adminprovision encapsulates the idempotent, race-safe "bring the first admin into existence" domain logic.
internal/authzmutate
Package authzmutate is the single entry point for all authz-field mutations on a User aggregate.
Package authzmutate is the single entry point for all authz-field mutations on a User aggregate.
internal/credential
Package credential is the single sanctioned holder of accesscore password hashing.
Package credential is the single sanctioned holder of accesscore password hashing.
internal/credentialauthority
Package credentialauthority is the read-side funnel for "is this user-bound credential authorized to issue or continue using a session?" decisions.
Package credentialauthority is the read-side funnel for "is this user-bound credential authorized to issue or continue using a session?" decisions.
internal/credentialinvalidate
Package credentialinvalidate is the single entry point for credential revocation events: it bumps the user's authz_epoch, revokes all active sessions, and revokes all refresh chains in one ambient transaction.
Package credentialinvalidate is the single entry point for credential revocation events: it bumps the user's authz_epoch, revokes all active sessions, and revokes all refresh chains in one ambient transaction.
internal/domain
Package domain contains the accesscore Cell domain models.
Package domain contains the accesscore Cell domain models.
internal/dto
Package dto contains accesscore's local typed views of cross-cell event payloads.
Package dto contains accesscore's local typed views of cross-cell event payloads.
internal/httpcookie
Package httpcookie delivers the accesscore refresh token as an httpOnly cookie on the session endpoints (login / refresh / logout) and reads it back on refresh.
Package httpcookie delivers the accesscore refresh token as an httpOnly cookie on the session endpoints (login / refresh / logout) and reads it back on refresh.
internal/mem
Package mem provides in-memory repository implementations for accesscore.
Package mem provides in-memory repository implementations for accesscore.
internal/mem/internal/txlock
Package txlock mints un-forgeable, self-invalidating lock-ownership leases for the mem accesscore store.
Package txlock mints un-forgeable, self-invalidating lock-ownership leases for the mem accesscore store.
internal/ports
Package ports defines accesscore's outbound dependency interfaces.
Package ports defines accesscore's outbound dependency interfaces.
internal/ports/conformance
Package conformance defines a UserRepository contract acceptance suite shared by all ports.UserRepository implementations (mem, PG, future).
Package conformance defines a UserRepository contract acceptance suite shared by all ports.UserRepository implementations (mem, PG, future).
internal/scopedtx
Package scopedtx funnels every tenant-scoped accesscore write (and tenant-scoped read inside a transaction) through a single tenant.WithScope + RunInTx wrapper.
Package scopedtx funnels every tenant-scoped accesscore write (and tenant-scoped read inside a transaction) through a single tenant.WithScope + RunInTx wrapper.
internal/sessionmint
Package sessionmint centralizes access-JWT issuance so that login, IssueForUser (change-password flow), and refresh share a single fail-closed "fetch roles → sign access" pipeline.
Package sessionmint centralizes access-JWT issuance so that login, IssueForUser (change-password flow), and refresh share a single fail-closed "fetch roles → sign access" pipeline.
internal/testutil
Package testutil provides shared test fixtures for corecells/accesscore tests.
Package testutil provides shared test fixtures for corecells/accesscore tests.
mem
Package mem exposes the typed funnel for mem-backed accesscore wiring.
Package mem exposes the typed funnel for mem-backed accesscore wiring.
postgres
Package postgres exposes the typed funnel for PostgreSQL-backed accesscore wiring.
Package postgres exposes the typed funnel for PostgreSQL-backed accesscore wiring.
slices/authorizationdecide
Package authorizationdecide implements the authorization-decide slice: the ABAC PDP (policy decision point) engine.
Package authorizationdecide implements the authorization-decide slice: the ABAC PDP (policy decision point) engine.
slices/configreceive
Package configreceive implements the config-receive slice: consumes config state-sync events from configcore.
Package configreceive implements the config-receive slice: consumes config state-sync events from configcore.
slices/identitymanage
Package identitymanage implements the identity-manage slice: CRUD + Lock/Unlock user accounts.
Package identitymanage implements the identity-manage slice: CRUD + Lock/Unlock user accounts.
slices/policymanage
Package policymanage implements the policy-manage slice: CRUD operations for ABAC Policies, publishing event.policy.updated.v1 on every mutation (consistency level L2: local transaction + outbox publish).
Package policymanage implements the policy-manage slice: CRUD operations for ABAC Policies, publishing event.policy.updated.v1 on every mutation (consistency level L2: local transaction + outbox publish).
slices/rbaccheck
Package rbaccheck implements the rbac-check slice: HasRole / ListRoles queries for a given user.
Package rbaccheck implements the rbac-check slice: HasRole / ListRoles queries for a given user.
slices/sessionlogin
Package sessionlogin implements the session-login slice: password-based login with JWT access token and opaque refresh token issuance.
Package sessionlogin implements the session-login slice: password-based login with JWT access token and opaque refresh token issuance.
slices/sessionlogout
Package sessionlogout implements the session-logout slice: revokes sessions and publishes revocation events.
Package sessionlogout implements the session-logout slice: revokes sessions and publishes revocation events.
slices/sessionrefresh
Package sessionrefresh implements the session-refresh slice: validates an opaque refresh token via refresh.Store and issues a fresh access JWT.
Package sessionrefresh implements the session-refresh slice: validates an opaque refresh token via refresh.Store and issues a fresh access JWT.
slices/sessionvalidate
Package sessionvalidate implements the session-validate slice: verifies access tokens and returns Claims.
Package sessionvalidate implements the session-validate slice: verifies access tokens and returns Claims.
slices/sessionverifyrpc
Package sessionverifyrpc implements the gRPC server for the grpc.auth.session.verify.v1 contract — accesscore's session-token verification RPC and the FIRST platform-cell gRPC service (PR-11 #1154).
Package sessionverifyrpc implements the gRPC server for the grpc.auth.session.verify.v1 contract — accesscore's session-token verification RPC and the FIRST platform-cell gRPC service (PR-11 #1154).
slices/setup
Package setup implements the interactive first-run admin provisioning slice.
Package setup implements the interactive first-run admin provisioning slice.
Package auditcore implements the auditcore Cell: tamper-evident audit log with hash chain (via runtime/audit/ledger framework), event consumption, and query.
Package auditcore implements the auditcore Cell: tamper-evident audit log with hash chain (via runtime/audit/ledger framework), event consumption, and query.
auditcoretest
Package auditcoretest provides testutil helpers for the auditcore Cell.
Package auditcoretest provides testutil helpers for the auditcore Cell.
internal/appender
Package appender is the single-source implementation of the auditcore audit-append behavior, shared by the four slice packages auditappend{user,config,session,role}.
Package appender is the single-source implementation of the auditcore audit-append behavior, shared by the four slice packages auditappend{user,config,session,role}.
internal/dto
Package dto holds typed payload structs for auditcore event contracts.
Package dto holds typed payload structs for auditcore event contracts.
slices/auditappendbootstrap
Package auditappendbootstrap is the audit-append-bootstrap slice: it consumes event.auth.bootstrap-failed.v1 events and appends them to the bootstrap audit ledger via runtime/audit.AppendBootstrapAuthFail.
Package auditappendbootstrap is the audit-append-bootstrap slice: it consumes event.auth.bootstrap-failed.v1 events and appends them to the bootstrap audit ledger via runtime/audit.AppendBootstrapAuthFail.
slices/auditappendconfig
Package auditappendconfig is the audit-append-config slice: it consumes config-change events and appends them to the audit ledger.
Package auditappendconfig is the audit-append-config slice: it consumes config-change events and appends them to the audit ledger.
slices/auditappendrole
Package auditappendrole is the audit-append-role slice: it consumes role assignment events and appends them to the audit ledger.
Package auditappendrole is the audit-append-role slice: it consumes role assignment events and appends them to the audit ledger.
slices/auditappendsession
Package auditappendsession is the audit-append-session slice: it consumes session lifecycle events and appends them to the audit ledger.
Package auditappendsession is the audit-append-session slice: it consumes session lifecycle events and appends them to the audit ledger.
slices/auditappenduser
Package auditappenduser is the audit-append-user slice: it consumes user lifecycle events and appends them to the audit ledger.
Package auditappenduser is the audit-append-user slice: it consumes user lifecycle events and appends them to the audit ledger.
slices/auditquery
Package auditquery implements the audit-query slice: query audit entries via HTTP using ledger.Store.
Package auditquery implements the audit-query slice: query audit entries via HTTP using ledger.Store.
Package configcore implements the configcore Cell: configuration management with versioning, publishing, rollback, and feature flag evaluation.
Package configcore implements the configcore Cell: configuration management with versioning, publishing, rollback, and feature flag evaluation.
configcoretest
Package configcoretest provides testutil builders and fakes for the configcore cell.
Package configcoretest provides testutil builders and fakes for the configcore cell.
internal/adapters/postgres
Package postgres provides a PostgreSQL implementation of configcore ports.
Package postgres provides a PostgreSQL implementation of configcore ports.
internal/configreader
Package configreader holds the shared config-read business logic (GetByKey / List) consumed by two sibling slices that sit on different HTTP trust boundaries: the public-facing `configread` slice (GET + list under /api/v1, admin-gated) and the internal control-plane `configreadinternal` slice (GET under /internal/v1, caller-cell gated).
Package configreader holds the shared config-read business logic (GetByKey / List) consumed by two sibling slices that sit on different HTTP trust boundaries: the public-facing `configread` slice (GET + list under /api/v1, admin-gated) and the internal control-plane `configreadinternal` slice (GET under /internal/v1, caller-cell gated).
internal/crypto
Package crypto provides configcore-specific crypto helpers.
Package crypto provides configcore-specific crypto helpers.
internal/domain
Package domain contains the configcore Cell domain models.
Package domain contains the configcore Cell domain models.
internal/dto
Package dto provides handler-level response types for configcore, shared across slices that return the same entity shape.
Package dto provides handler-level response types for configcore, shared across slices that return the same entity shape.
internal/events
Package events defines configcore's internal event wire payloads and decoders.
Package events defines configcore's internal event wire payloads and decoders.
internal/mem
Package mem provides in-memory repository implementations for configcore.
Package mem provides in-memory repository implementations for configcore.
internal/ports
Package ports defines the driven-side interfaces for configcore.
Package ports defines the driven-side interfaces for configcore.
internal/scopedread
Package scopedread funnels every tenant-scoped configcore read through a single tenant.WithScope + RunInTx wrapper.
Package scopedread funnels every tenant-scoped configcore read through a single tenant.WithScope + RunInTx wrapper.
internal/testutil
Package testutil provides test doubles and helpers scoped to the configcore cell.
Package testutil provides test doubles and helpers scoped to the configcore cell.
postgres
Package postgres wires PostgreSQL-backed repositories for configcore.
Package postgres wires PostgreSQL-backed repositories for configcore.
slices/configpublish
Package configpublish — PublishFailureMode type.
Package configpublish — PublishFailureMode type.
slices/configread
Package configread implements the public config-read slice: GET + list of config entries under /api/v1/config (admin-gated).
Package configread implements the public config-read slice: GET + list of config entries under /api/v1/config (admin-gated).
slices/configreadinternal
Package configreadinternal implements the internal control-plane config-read slice: GET a config entry under /internal/v1/config, mounted on the InternalListener where service-token + caller-cell auth is enforced.
Package configreadinternal implements the internal control-plane config-read slice: GET a config entry under /internal/v1/config, mounted on the InternalListener where service-token + caller-cell auth is enforced.
slices/configsubscribe
Package configsubscribe implements the config-subscribe slice: consumes config state-sync events to update a local version-tracking cache.
Package configsubscribe implements the config-subscribe slice: consumes config state-sync events to update a local version-tracking cache.
slices/configwrite
Package configwrite implements the config-write slice: Create/Update/Delete config entries with event publishing.
Package configwrite implements the config-write slice: Create/Update/Delete config entries with event publishing.
slices/featureflag
Package featureflag implements the feature-flag slice: Get/Evaluate feature flags.
Package featureflag implements the feature-flag slice: Get/Evaluate feature flags.
slices/flagwrite
Package flagwrite implements the flag-write slice: Create/Update/Delete/Toggle feature flags with transactional repo writes (L1 consistency).
Package flagwrite implements the flag-write slice: Create/Update/Delete/Toggle feature flags with transactional repo writes (L1 consistency).
internal
Package registrycore implements the registrycore Cell: the runtime contract registry's carrier cell (303-US4, #2235), a platform control-plane cell beside accesscore / auditcore / configcore (dogfooding — the registry is itself a Cell).
Package registrycore implements the registrycore Cell: the runtime contract registry's carrier cell (303-US4, #2235), a platform control-plane cell beside accesscore / auditcore / configcore (dogfooding — the registry is itself a Cell).
internal/adapters/postgres
Package postgres provides the PostgreSQL implementation of registrycore's ports.Registry (303-US5, #2236).
Package postgres provides the PostgreSQL implementation of registrycore's ports.Registry (303-US5, #2236).
internal/mem
Package mem provides the in-memory implementation of ports.Registry (303-US5, #2236).
Package mem provides the in-memory implementation of ports.Registry (303-US5, #2236).
internal/ports
Package ports defines the driven-side interfaces for registrycore (303-US5, #2236).
Package ports defines the driven-side interfaces for registrycore (303-US5, #2236).
internal/ports/conformance
Package conformance defines a ports.Registry contract acceptance suite shared by every ports.Registry implementation (mem, PG, future).
Package conformance defines a ports.Registry contract acceptance suite shared by every ports.Registry implementation (mem, PG, future).
internal/scopedread
Package scopedread funnels every tenant-scoped registrycore read through a single tenant.WithScope + RunInTx wrapper.
Package scopedread funnels every tenant-scoped registrycore read through a single tenant.WithScope + RunInTx wrapper.
slices/registryadmin
Package registryadmin serves the runtime contract-registration admin approval contracts http.registry.contract.{approve,reject,retire}.v1 (303-US7, #2238) over the durable ports.Registry store.
Package registryadmin serves the runtime contract-registration admin approval contracts http.registry.contract.{approve,reject,retire}.v1 (303-US7, #2238) over the durable ports.Registry store.
slices/registryread
Package registryread serves the runtime contract-registration list contract http.registry.contract.list.v1 (303-US4, #2235) over the durable ports.Registry store (303-US5, #2236).
Package registryread serves the runtime contract-registration list contract http.registry.contract.list.v1 (303-US4, #2235) over the durable ports.Registry store (303-US5, #2236).
slices/registrywrite
Package registrywrite serves the runtime contract-registration submit contract http.registry.contract.submit.v1 (303-US6, #2237).
Package registrywrite serves the runtime contract-registration submit contract http.registry.contract.submit.v1 (303-US6, #2237).
Package syscore implements the syscore Cell: a stateless platform system/observability boundary cell (#1860).
Package syscore implements the syscore Cell: a stateless platform system/observability boundary cell (#1860).
slices/healthread
Package healthread serves the aggregated cell-health contract http.admin.health.cells.v1 (#1860).
Package healthread serves the aggregated cell-health contract http.admin.health.cells.v1 (#1860).
slices/systemread
Package systemread serves the admin system metadata contract http.admin.system.v1 (#1861).
Package systemread serves the admin system metadata contract http.admin.system.v1 (#1861).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL