ores.http.iam
Table of Contents
2. Summary
ores.http.iam is the adapter part that projects the identity-and-access
domain onto the HTTP server's REST surface. It holds the generated route units
for the iam models that opt in: the entities the gateway reads (account, role,
permission, session, login_info) and the operation models whose declared
messages the gateway serves (account_operations, authorization, login, signup,
bootstrap, session_operations).
iam's models opt in through the :ores.cpp.http-route.enabled: property in
their own model drawer, so a model that needs no route can leave the facet
off. The units speak the canonical protocol over NATS and hold no service,
repository or database context: the iam service stays the only place that
decides, and the caller's own token travels with every forwarded request.
The part declares #+component_kind: adapter. Its CMakeLists.txt files are
hand-authored, because the link libraries belong to the HTTP surface rather
than to the domain, and codegen writes only the two component_files.cmake
lists. A regeneration therefore never writes over the build.
The units are output of the ores.cpp.http-route facet, which is opt-in per
model. An entity model renders one route per derived verb; an operation model
renders one route per declared message, addressed by the subject it states.
The facet writes here because the part is named after the domain the units
project, which is the fractal naming rule in
Component architecture.
3. Inputs
- HTTP requests on the
/api/v1/iam/...paths the units register. - The caller's bearer token, forwarded to the service on every NATS request.
- The connected NATS client the hand-written per-component aggregator passes
to
register_routes. - The iam models under
projects/ores.iam/modeling/whose drawers opt in to theores.cpp.http-routefacet.
4. Outputs
- One route unit per opted-in model, at
src/routes/iam/<unit>_routes.cppandinclude/ores.http/routes/iam/<unit>_routes.hpp. - The routes and their OpenAPI schemas, registered on the router and the endpoint registry.
- NATS request messages to the iam service, one per route.
5. Entry points
include/ores.http/routes/iam/– the generated unit headers.src/routes/iam/– the generated unit implementations.iam_routes– the hand-written aggregator the host calls to install the units in turn.
6. Dependencies
ores.http.api– the router, the route builder, the OpenAPI registry and the request/response types.ores.nats– NATS transport for service calls.ores.iam.api– the canonical protocol messages the units send.ores.utility– the codecs and the wire support types.ores.logging– logger factory.
7. See also
- ores.http.server – the process that hosts these routes.
- ores.cpp.http-route – the facet that emits the units.
- Component architecture – the composite and adapter kinds.
- ores.iam – the domain this part projects.
target_link_libraries(${lib_target_name}
PUBLIC
ores.http.api.lib
ores.nats.lib
ores.logging.lib
PRIVATE
ores.iam.api.lib
ores.utility.lib)
target_link_libraries(${tests_target_name}
PRIVATE
${lib_target_name}
ores.testing.lib
Catch2::Catch2
ores.openssl_cleanup
Threads::Threads)
