Services must register themselves with the portal-registry using a dedicated WebSocket channel. This channel handles service registration, liveness monitoring, and bidirectional command communication.
Endpoint:
wss://<controller-host>:<port>/ws/microservice
Authentication:
Authentication is performed within the first JSON-RPC message payload using the service/register method. The JWT must be provided in the params.jwt field without a Bearer prefix. The JWT must use the RS256 algorithm. The controller resolves the signing key via JWKS using the kid.
Disconnect Semantics:
There is no explicit deregister RPC. Closing the registration socket automatically marks the instance as disconnected. Reconnecting will generate a new runtimeInstanceId.
{
"jsonrpc": "2.0",
"id": "register-1",
"method": "service/register",
"params": {
"jwt": "<service-jwt>",
"serviceId": "com.networknt.user-1.0.0",
"envTag": "prod",
"environment": "prod",
"version": "1.0.0",
"protocol": "https",
"port": 8443,
"tags": {}
}
}