ores.iam.service
Table of Contents
2. Summary
ores.iam.service is the NATS service entrypoint for the IAM domain. It reads
configuration, opens database and NATS connections, registers all message
handlers from ores.iam.core, and runs the event loop. All business logic
lives in ores.iam.core; this component is responsible only for bootstrap,
dependency injection, and graceful shutdown.
3. Inputs
- Configuration file: NATS server URL, PostgreSQL connection string, and environment settings.
- NATS request messages from UI clients and peer services on the
ores.iam.*subject hierarchy (0x2000–0x2FFF range).
4. Outputs
- A running NATS service handling all IAM operations.
- NATS response messages returned to callers.
- Structured logs via
ores.logging.
5. Entry points
src/main.cpp— process entry point.src/app/— application bootstrap and dependency injection.src/config/— configuration parsing and validation.
6. Dependencies
ores.iam.core— all NATS handlers, repositories, and domain services.ores.iam.api— shared protocol types.ores.logging— structured logging infrastructure.nats.c— NATS client for connection management.
7. Build dependencies
What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.
8. Options
The options this service takes beyond logging, NATS and the database. Codegen writes the member, its wire field, its command-line declaration and its assignment from each entry.
8.1. jwt_private_key
RSA private key PEM for signing JWT tokens (RS256).
Read from ORES_IAM_SERVICE_JWT_PRIVATE_KEY environment variable or –jwt-private-key command-line option. Must be a valid RSA private key in PEM format.
9. See also
- ores.iam — component group overview.
- ores.iam.core — all business logic for the IAM domain.
10. Test dependencies
The suites link what the profile cannot know about.
target_link_libraries(${lib_target_name}
PUBLIC
ores.security.lib
ores.iam.core.lib
ores.eventing.core.lib
ores.nats.lib
ores.database.lib
ores.service.lib
ores.utility.lib
ores.telemetry.core.lib
ores.service.lib
ores.inbox.api.lib)
target_link_libraries(${tests_target_name}
PRIVATE
${lib_target_name}
ores.utility.lib
ores.testing.lib
ores.logging.lib
Catch2::Catch2
faker-cxx::faker-cxx
Threads::Threads)
