2.5 KiB
2.5 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|
| core/config-identity-provider-into-handler | Wire IdentityProvider and ForwardingPolicy into ServerHandler | completed |
|
narrow | low | component | implementation |
Description
Wire the IdentityProvider and ForwardingPolicy into ServerHandler and the server accept loop. This is the integration task that connects the config split, identity trait, and forwarding policy to the actual runtime behavior.
Key changes:
Server::run()(orserve()) constructsConfigIdentityProviderfromArcSwap<DynamicConfig>and passes it toServerHandlerServerHandlerholdsArc<dyn IdentityProvider>instead ofArc<ServerAuthConfig>auth_publickey()callsidentity_provider.resolve_from_fingerprint()and stores the resultingIdentityon the sessionchannel_open_direct_tcpip()evaluatesForwardingPolicy::check()using the session'sIdentityConfigReloadHandleis threaded through fromServer::run()so callers can reloadDynamicConfig- The
ServerHandler::new()API takesIdentityProvider+DynamicConfiginstead ofServerAuthConfig
This is a wiring/integration task — the pieces exist from tasks 1.1-1.3, this connects them.
Acceptance Criteria
ServerHandlerholdsArc<dyn IdentityProvider>andArc<ArcSwap<DynamicConfig>>instead ofArc<ServerAuthConfig>auth_publickey()delegates toIdentityProvider::resolve_from_fingerprint()and storesIdentityon the sessionchannel_open_direct_tcpip()evaluatesForwardingPolicy::check()before proxying; logs rejection with principal and targetServeOptionsproduces(StaticConfig, DynamicConfig)at startupConfigReloadHandlereturned fromServer::run()for external reloadConfigIdentityProviderconstructed at startup from initialDynamicConfig- All existing integration tests pass
- New integration test: reload DynamicConfig → new auth keys take effect on next connection
- New integration test: ForwardingPolicy deny rule blocks channel open
References
- docs/architecture/identity.md — IdentityProvider wiring into ServerHandler
- docs/architecture/configuration.md — ConfigReloadHandle, ConfigIdentityProvider
- crates/alknet-core/src/server/handler.rs — current handler to be refactored
- crates/alknet-core/src/server/serve.rs — ServeOptions and Server::run()
Notes
To be filled by implementation agent
Summary
To be filled on completion