ION DocsV3
  • Architecture
    • ION Architecture V2
      • ION V2 — Architecture Overview
      • V2 context
        • V2 capacity model
        • V2 constraints
        • V2 integration boundaries
        • V2 requirements
        • V2 solution strategy
      • V2 Structural Design
        • ION V2 Landscape
        • ION V2 Platform Views
          • ION V2 Delivery and Runway
          • ION V2 Incident-Processing Pipelines
          • ION V2 Platform Networking
          • ION V2 Platform Observability
          • ION V2 Platform Security
        • ION V2 System Context
        • ION V2 Systems
          • Alya System Topology
          • Cogs System Topology
          • Ion IQ System Topology
          • Kingsman System Topology
          • Pigeon System Topology
          • Veritas System Topology
          • Watchtower System Topology
      • V2 evolution and platform lineage
        • Tiberium Origins
          • Tiberium Architecture Overview
          • Tiberium Components Architecture Overview
        • Voyager and the V2 Merge
          • Voyager Architecture Overview
          • Voyager Identity Architecture Overview
          • Voyager Services Architecture Overview
      • V2 Platform Architecture
        • Alya Workbench
          • Mission Brief: Alya (Workbench for Cyber Defenders)
        • Asset Discovery
        • Automation
        • Customer Communications
          • Notification and Escalation Design
        • Reporting and Dashboards
        • Vulnerability Mitigations
      • V2 Well-Architected
        • V2 Reliability
          • Availability Architecture
        • V2 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V2 Security Architecture
          • Teams Notification Security
          • Customer Data and PII
          • V2 Identity
            • Applications and Authorization
            • V2 Identity Architecture
            • Microsoft Entra ID
            • V2 Identity Standard
            • V2 Identity Implementation
              • Application Registration
              • Application Roles
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Managed Identity
            • V2 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Portal Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Customer Environment Access Architecture
            • Customer Environment Access Guidelines
            • Customer Environment Access How-to
    • ION Architecture V3
      • ION V3 Architecture Overview
      • V3 context
        • V3 capacity model
        • V3 constraints
        • V3 integration boundaries
        • V3 requirements
        • V3 solution strategy
      • V3 Structural Design
        • Data and events
          • Archival and retention
          • Event model
          • Event sourcing
          • Event store
          • Micro-frontend interaction
          • Recovery and disaster recovery
          • Replay and reconstruction
          • Reporting and customer analytics
          • Event-sourcing requirements
          • Snapshots
          • UI interaction
        • ION v3 domains
          • Assets domain
            • Assets domain flows
            • Assets domain implementation
            • Assets domain model
          • Customer Collaboration domain
            • Customer Collaboration domain flows
            • Customer Collaboration domain implementation
            • Customer Collaboration domain model
          • Incident domain
            • Incident domain flows
            • Incident domain implementation
            • Incident domain model
          • Investigation domain
            • Investigation domain flows
            • Investigation domain implementation
            • Investigation domain model
          • Remediation domain
            • Remediation domain implementation
            • Remediation domain model
          • Ticket domain
            • Ticket domain flows
            • Ticket domain implementation
            • Ticket domain model
        • ION V3 Landscape
        • ION V3 Platform Views
          • Internal API
            • Internal API architecture
            • Internal API consumer guide
            • Internal API identity and access
            • Internal API implementation
          • Micro-Frontends
            • Micro-Frontends architecture
            • Micro-Frontends capability service (Signet)
            • Micro-Frontends composition
            • Micro-Frontends identity and access
            • Micro-Frontends implementation
            • Micro-Frontends real-time (SignalR)
            • Micro-Frontends routing and ingress
            • Shells and MFEs
          • SOAR Integration
            • SOAR Integration architecture
            • SOAR Integration customer onboarding
            • SOAR Integration Identity and Access Design
            • SOAR Integration implementation
            • SOAR Integration operations
        • ION V3 System Context
        • ION V3 systems
          • Alya
          • Cogs
          • ION IQ
          • Kingsman
          • Pigeon
          • Veritas
          • Watchtower
      • V2 to V3 evolution
        • V2 to V3 architecture delta
        • V2 to V3 decision changes
        • V2 to V3 migration guidance
        • V2 to V3 service impact
      • Well-Architected
        • Cost Optimization
          • Cost Governance
            • Cost Governance Architecture
            • Cost Governance Guidelines
            • Cost Governance Implementation
          • SKU Strategy
            • SKU Strategy Architecture
            • SKU Strategy Guidelines
            • SKU Strategy Implementation
        • Operational excellence
          • Audit Logs
            • Audit Logs Architecture
            • Audit Logs Guidelines
            • Audit Logs Implementation
          • CI/CD Runway
            • CI/CD Runway Architecture
            • CI/CD Runway Guidelines
            • CI/CD Runway Implementation
          • Feature Flags
            • Feature Flags Architecture
            • Feature Flags Guidelines
            • Feature Flags Implementation
          • Incident management
            • Incident management architecture
            • Incident management guidelines
            • Incident management implementation
          • Azure Landing Zone
            • Azure Landing Zone Architecture
            • Azure Landing Zone Guidelines
            • Azure Landing Zone Implementation
          • Notifications
            • Notifications Architecture
            • Notifications Guidelines
            • Notifications Implementation
          • Observability
            • Observability Architecture
            • Observability Guidelines
            • Observability Implementation
        • Performance efficiency
          • Capacity, sizing, and scaling
            • Capacity, sizing, and scaling architecture
            • Capacity, sizing, and scaling guidelines
            • Implement capacity, sizing, and scaling
          • UI responsiveness
            • UI responsiveness architecture
            • UI responsiveness guidelines
            • Implement UI responsiveness
        • V3 reliability
          • Application resilience patterns
          • Critical flows
          • Customer reliability assurance
            • ION Platform reliability and service continuity
            • Customer reliability slides
          • Disaster recovery
            • Disaster recovery architecture
            • Disaster recovery guidelines
            • Disaster recovery implementation
              • DR implementation: API Management
              • DR implementation: App Configuration
              • DR implementation: Application Gateway
              • DR implementation: Azure SQL Database
              • DR implementation: Container Apps
              • DR implementation: Container Registry
              • DR implementation: Cosmos DB
              • DR implementation: Event Hubs
              • DR implementation: Azure Front Door
              • DR implementation: Function Apps
              • DR implementation: Key Vault
              • DR implementation: Log Analytics and Application Insights
              • DR implementation: MySQL Flexible Server (Temporal)
              • DR implementation: PostgreSQL Flexible Server
              • DR implementation: Azure Managed Redis
              • DR implementation: Service Bus
              • DR implementation: SignalR
              • DR implementation: Storage accounts
            • Operational-data replication
            • Disaster recovery operations
          • Edge and routing
            • Azure Application Gateway
              • Azure Application Gateway architecture
              • Azure Application Gateway guidelines
              • Azure Application Gateway implementation
              • Azure Application Gateway resiliency
              • Azure Application Gateway security
            • Azure Front Door
              • Azure Front Door architecture
              • Azure Front Door guidelines
              • Azure Front Door implementation
              • Azure Front Door resiliency
              • Azure Front Door security
          • Event-store disaster recovery (moved)
          • Failure mode analysis
          • Graceful degradation
            • Graceful degradation architecture
            • Graceful degradation guidelines
            • Graceful degradation implementation
          • V3 reliability maturity model
            • V3 reliability maturity assessment
            • Maturity level 2: self-preservation
            • Maturity level 3: recovery readiness
            • Maturity level 4: maintain stability
            • Maturity level 5: stay resilient
          • Multi-region replication
            • Multi-region replication architecture
            • Multi-region replication guidelines
            • Multi-region replication implementation assessment
          • Reliability testing
          • Scaling and headroom
          • Targets and health model
          • Trade-offs and accepted risks
        • V3 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • API Contracts and Asynchronous Operations
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V3 Security Architecture
          • Data protection
            • Data protection architecture
            • Data protection guidelines
            • Data protection implementation guidelines
              • API Management
              • Application Gateway
              • Azure SQL Database
              • Azure Container Apps
              • Azure Cosmos DB
              • Azure Front Door
              • Azure Function Apps
              • Azure Database for MySQL
              • Azure Database for PostgreSQL
              • Data protection procedures
          • V3 Security Guidelines
          • V3 Identity
            • Applications and Authorization in ION V3
            • V3 Identity Architecture
            • Capabilities
            • Microsoft Entra ID for ION V3
            • V3 Identity Standard
            • V3 Identity Implementation
              • App Service Authentication
              • Application Registration
              • Application Roles
              • Customer Azure RBAC
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Mailbox-Scoped Access
              • Managed Identity
              • Workload Identity Federation
            • V3 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Azure RBAC Identity Workflow
              • Customer Portal Identity Workflow
              • Mailbox Access Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Shell and MFE Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Azure Lighthouse
              • Azure Lighthouse implementation
            • GDAP and Tenant Governance
              • Access Packages (legacy)
              • GDAP human access implementation
            • Customer environment access guidelines
            • Multi-tenant Entra apps
              • Multi-tenant Entra apps implementation
            • Teams B2B Direct Connect
              • Teams B2B Direct Connect implementation
          • Network Security
            • Network Security Architecture
            • Network Security Guidelines
            • Network Security Implementation
              • Egress and Static IPs
              • Resource Access Restrictions
          • V3 Security Patterns
    • ION Architecture V4
      • How V4 evolves from V3
  • Principles
  • Patterns
    • Application Permissions Only
    • Async REST
    • Audit Logs (Pattern)
    • Auth / AuthZ
    • Dead Letter Queue (DLQ)
    • Dual Writes (and how to avoid them)
    • ECST — Event-Carried State Transfer
    • Event Hubs Throttling
    • Feature Flags (Pattern)
    • Idempotent Write
    • MFE UI Interaction
    • Notifications (Pattern)
    • Private Data Store Access
    • Schema Evolution
    • Service Bus Topic Throttling
    • UI Interaction with an Event-Sourced Backend
  • Standards
    • API Standard
    • API Standards
    • Coding Standard
    • Coding Standards
    • Documentation Standard
    • Documentation Standards
    • Microservice Standard
    • Microservice Checklist
    • Operational Readiness Standard
    • ORR — Operational Readiness Review Checklist
  • Decisions
    • ADR-0001
    • ADR-0002
    • ADR-0003
    • ADR-0004
    • ADR-0005
    • ADR-0006
    • ADR-0007
    • ADR-0008
    • ADR-0009
    • ADR-0010
    • ADR-0011
    • ADR-0012
    • ADR-0013
    • ADR-0014
    • ADR-0015
    • ADR-0016
    • ADR-0017
    • ADR-0018
    • ADR-0019
    • ADR-0020
    • ADR-0021
    • ADR-0022
    • ADR-0023
    • ADR-0024
    • ADR-0025
    • ADR-0026
    • ADR-0027
    • ADR-0028
    • ADR-0029
    • ADR-0030
    • ADR-0031
    • ADR-0032
    • ADR-0033
    • ADR-0034
  • Services
  • Governance
    • Assumptions
    • Discrepancies
    • V3 reference coverage and conflict matrix
OntinueION Docs
  1. Architecture
  2. ION Architecture V3
  3. V3 Structural Design
  4. ION V3 Platform Views
  5. Micro-Frontends
  6. Micro-Frontends real-time (SignalR)

Micro-Frontends real-time (SignalR)

architecturev3

Micro-Frontends real-time (SignalR)

This page explains how live updates reach a micro-frontend (MFE). It covers:

  • the single Shell SignalR BFF that owns the real-time hub;
  • how the shell negotiates and holds the one browser connection;
  • how an MFE registers for an entity’s notifications through its own BFF;
  • how a backend service sends a notification to the users watching that entity.

It is written for four audiences: the shell team, MFE teams, BFF teams that relay subscriptions, and producer teams that emit notifications. Each audience has a checklist under onboarding.

The design comes from Event Sourcing — MFE UI Interaction Design Pattern and Event Sourcing — UI Interaction Design Pattern. The facts on this page come from alya-bff-shell-signalr/, fe-packages/signalr/, alya-fe/app-shell/, and the two reference consumers: the Elk BFF in alya-bff/ and Reichenbach (reichenbach-fe/, reichenbach-bff/, the Reichenbach aggregator). Where the code and the design rules disagree, the non-conformance and gaps table records it.

At a glance

FactValue
ServiceAlya BFF Shell SignalR, short name assgr, owner mdr-alya-team
ComputeWindows Function App func-assgr-<env>-chn-01, .NET 10 isolated
HubAzure SignalR sigr-assgr-<env>-chn-01, Serverless mode, hub name alya
Browser WebSocket hostagw-alya-shell-sigr.<domain> (Application Gateway, no cookie affinity)
NegotiatePOST https://portal.alya.<domain>/api/v2/signalr/negotiate, called only by the shell
Subscribe and unsubscribePOST and DELETE /v2/signalr/{entity_name}/{entity_id}/subscriptions on APIM API assgr-int, called only by MFE BFFs
SendSigned CloudEvent on Service Bus topic alya-signalr-events, published only by backend producers
Group name{entity_name}-{entity_id}, for example investigations-7f3c…
Group scopePer user (Entra oid), not per connection
Browser client@fe-ws/signalr, a Module Federation singleton shared by the shell and every remote
Who may use itAlya shell users only: Ontinue tenant, capability shell Alya

<domain> is ion.ontinue.com in production, and alpha-ion.dev or beta-ion.dev in the lower environments.

Why a single Shell SignalR BFF

If every MFE opened its own SignalR connection, a user with a dozen MFEs mounted would hold a dozen connections. That exhausts the Azure SignalR connection quota, multiplies the authentication handshakes, and amplifies reconnect storms. ION uses the shared-connection pattern instead: one connection per browser session, owned by the shell and served by one backend.

One connection per session

The shell holds the only SignalR connection. MFEs never open their own.

The connection count stays at one per session no matter how many MFEs are mounted, so the SignalR quota and the auth handshakes do not grow with the MFE count.

The shell owns the connection, not the business

The shell negotiates, connects, and reconnects. It never subscribes to entities and never reads payloads.

The connection and its state are shared through the @fe-ws/signalr singleton. Each MFE registers its own handlers, so a fault in one MFE's handler cannot break another MFE.

Groups are backend-controlled

Only a BFF can add a user to a group, after it has authorized the user for the entity.

The browser cannot join a group. The user identity comes from a validated token, and the group name is built on the server from the entity type and ID.

Producers publish events, not SignalR calls

Backend services publish a signed CloudEvent to Service Bus. The Shell SignalR BFF is the only writer to the hub.

Producers stay decoupled from the hub, its SKU, and its credentials. Signature and schema checks happen in one place.

Notifications are hints, REST is the truth

A missed notification must never leave the UI wrong. MFEs refetch over REST on every new connection.

Delivery to the browser is at most once. The MFE's own BFF stays the source of state, and the notification only tells the MFE when to read it.

Topology

The WebSocket leg skips Front Door. This is permitted edge exception 3 in ADR-0015 and is recorded as trade-off TO-04 in the reliability trade-offs.

Endpoints and paths

PurposeCallerPublic pathFront Door origin pathAPIM API and productFunction route
NegotiateShellportal.alya.<domain>/api/v2/signalr/negotiate/assgr-ext/v2/signalr/negotiateassgr-ext, MFE productPOST /v2/signalr/negotiate
HealthProbes, testsNot exposed on a portal routeNoneassgr-ext, GET /v1/healthGET /v1/health. The App Service health check is configured as api/v2/health (gap RT-15)
SubscribeMFE BFFNone. Server-to-server onlyNoneassgr-int, own internal productPOST /v2/signalr/subscriptions?entity_name=…&entity_id=…
UnsubscribeMFE BFFNone. Server-to-server onlyNoneassgr-int, own internal productDELETE /v2/signalr/subscriptions?entity_name=…&entity_id=…
WebSocketShellwss://agw-alya-shell-sigr.<domain>/client/?hub=alyaNone. Application Gateway listener, basic rule, no rewriteNoneNone
SendProducerNoneNoneNoneService Bus trigger handle-signalr-events

The assgr-int API exposes POST and DELETE /v2/signalr/{entity_name}/{entity_id}/subscriptions. Its operation policy rewrites the path to /v2/signalr/subscriptions and moves entity_name and entity_id into query parameters. The BFF base URL for assgr-int is https://apim-rome-<env>-chn-02.azure-api.net/assgr-int.

How the portal paths reach APIM, and the App Gateway mirror used during a Front Door outage, are covered in routing and ingress.

Flow 1 — Negotiate and connect

1

The shell negotiates once per token lifetime

Owner: Alya shell team

alya-fe/app-shell/src/contexts/signalr/signalr.context.tsx runs the negotiate call as a React Query query (signalr-negotiation-context). It retries 3 times. Stale time and garbage-collection time are both 45 minutes, against a token that lives 1 hour. Refetch on mount, focus, and network reconnect are all off, because every new negotiate result restarts the connection.

2

The Shell SignalR BFF binds the connection to the user

Owner: Alya BFF Shell SignalR

post-signalr-negotiate-ext accepts only Alya users. The Signet MfeCapabilitiesValidationMiddleware requires capability shell Alya. The function validates the X-Authorization token: the tenant MUST be the Ontinue tenant, the audience MUST be the Alya platform app, and the issuer MUST be v2.0. The SignalR UserId is the token’s oid, never a value from the request body.

The response is a JSON:API Negotiate resource with two attributes:

  • url: https://agw-alya-shell-sigr.<domain>/client/?hub=alya, the Application Gateway hostname, not the Azure SignalR hostname. Azure SignalR has public network access disabled and is reached by the gateway through its private endpoint.
  • accessToken: the SignalR client token for that UserId.
3

The shared provider opens the single connection

Owner: FE Guild (package), Alya shell team

The shell wraps its tree in SignalRProvider from @fe-ws/signalr. The provider builds one HubConnection with withAutomaticReconnect() and an accessTokenFactory that returns the negotiated token. It creates a new connection only when the URL or the token changes. It exposes { connection, isConnected, error } through React context.

@fe-ws/signalr is a Module Federation singleton in the shell’s rsbuild.config.ts, and every remote that uses live updates MUST declare it the same way (today Reichenbach does). That is what makes the shell’s context visible to MFEs: there is one module instance, so there is one context and one connection. No browser CustomEvent bridge exists.

Flow 2 — Register for an entity’s notifications

An MFE never calls the Shell SignalR BFF. It calls its own BFF on its own portal origin, and the BFF relays the request to assgr-int after it has authorized the user.

1

The MFE subscribes after the connection is up

Owner: MFE team

The MFE reads connection and isConnected from useSignalR(). It sends the subscription request only when a connection exists, and it keys the request on connection.connectionId. A new connection ID means a new subscription request and a REST refetch. Reichenbach’s investigation-subscription.ts is the reference: it posts to ${window.__IWKB_ORIGIN__}/api/subscriptions/investigation/{id}, which Front Door routes to APIM API rebff-ext.

2

The MFE BFF authorizes, then relays

Owner: MFE BFF team

The BFF decides whether this user may watch this entity. It then calls assgr-int with two credentials:

  • Authorization: the BFF’s own managed-identity token for APIM. APIM requires the app role Ion.RealtimeChannel.ReadWrite in this token.
  • X-Authorization: the user’s token. The global APIM policy keeps an existing X-Authorization header, and the Shell SignalR BFF reads the user oid from it.

The reference relays are:

RelayMFE pathRelay callEntity
Elk BFF (alya-bff/app/ElkBFF)/api/v1/customers/workspaces/ion_use_cases/signalr/subscriptions on portal.alyaassgr-int/v2/signalr/use_cases/{id}/subscriptions after the use case is checked in BoundedCtxConfiguse_cases
Reichenbach BFF (reichenbach-bff/apps/bff/src/subscriptions.py)/api/subscriptions/investigation/{id} on portal.iwkbassgr-int/v2/signalr/investigations/{id}/subscriptionsinvestigations

Both relays forward the raw user token. This does not conform to the identity rule that a relaying BFF passes validated context, not the token. See gap RT-01.

3

The Shell SignalR BFF adds the user to the group

Owner: Alya BFF Shell SignalR

SubscriptionValidationService requires a non-empty entity_id, the X-Authorization token, and an authenticated UserId. The entity_name MUST be one of the enum values. SignalRService.SubscribeAsync then calls UserGroups.AddToGroupAsync(oid, "{entity_name}-{entity_id}") and returns 204. DELETE calls RemoveFromGroupAsync.

The Shell SignalR BFF does no resource authorization. It trusts the relaying BFF, which is why only BFF identities with the app role can reach assgr-int.

Flow 3 — Send a notification from the backend

1

The producer publishes a signed CloudEvent

Owner: Producer team

The producer publishes to topic alya-signalr-events on sbus-rome-<env>-chn-01 through the ION Service Bus client, which signs the event and sets the application properties. Producers never call SignalR and never hold a SignalR role.

Producertypesourceion.entity_nameion.event_nameSessionId
Elk BFFion.event.signalr.axonstatusupdated.v1urn:io:ontinue:ion:elkuse_casesstatus-updatedSentinel workspace ID
Reichenbach aggregator (sbus_publisher.py)ion.event.signalr.investigations.key-findings.updated.v1 and siblingsurn:io:ontinue:ion:reichenbachinvestigationsThe update type, for example reichenbach.key-findings.updatedInvestigation ID

The Reichenbach MFE listens on investigation.event and expects the inner update object, so the producer and the consumer do not agree on the client method name or the payload shape. See gap RT-16.

2

The Shell SignalR BFF verifies and forwards

Owner: Alya BFF Shell SignalR

MessageValidationService runs three checks in order:

  1. Signature. The signature application property is verified with the public key registered for the event source. A failure dead-letters the message with InvalidMessageSignature.
  2. Schema. The body MUST deserialize to a CloudEvent. A failure dead-letters with SchemaValidationFailed.
  3. Routing fields. ion.entity_id, ion.entity_name, and ion.event_name MUST be present, and entity_name MUST be in the enum. A failure dead-letters with SchemaValidationFailed.

Any other exception abandons the message, and Service Bus redelivers it up to the maximum delivery count of 3.

SignalREventsService.ForwardEventAsync then calls Clients.Group("{entity_name}-{entity_id}").SendCoreAsync(event_name, [cloudEventJson]). The client method name is ion.event_name. The single argument is the entire CloudEvent as a JSON string, not just data.

Consuming notifications in an MFE

The rules below apply to every MFE that shows live data.

  • MFEs MUST consume the shell’s connection through @fe-ws/signalr (useSignalR, useHubEvent). They MUST NOT create a HubConnection, call negotiate, or mount their own SignalRProvider in federated mode.
  • MFEs MUST NOT use useHubSend. The hub runs in Serverless mode with no upstream, so client-to-hub messages go nowhere. Commands go over REST to the MFE’s own BFF.
  • MFEs MUST subscribe through their own BFF, and they MUST key the subscription on connection.connectionId, so a new connection triggers a new subscription request.
  • MFEs MUST refetch the affected state over REST whenever the connection ID changes and whenever isConnected becomes true again. Notifications sent while the connection was down are lost.
  • Handlers MUST tolerate duplicates, gaps, and reordering. The handler parses the CloudEvent string and checks type and ion.entity_id. It then either invalidates and refetches the matching query, or applies the payload only if the producer documents it as a full snapshot and it is newer than what is shown. Reichenbach card handlers, for example, drop an update whose revision (a UUIDv7) is older than the cached one.
  • MFEs MUST fall back to REST polling when isConnected stays false, or error is set, for longer than a short timeout. This rule is not implemented yet. See gap RT-02.
  • In standalone mode an MFE MAY mount its own SignalRProvider against a local or test negotiate endpoint. That code path MUST NOT run in federated mode.

The sketch below shows the three rules together. It is illustrative: the subscription hook stands for an MFE-specific hook such as Reichenbach’s useInvestigationSubscription, and entity.updated stands for the producer’s ion.event_name.

import { useHubEvent, useSignalR } from '@fe-ws/signalr';
import { useQueryClient } from '@tanstack/react-query';
import { useEffect } from 'react';

export const useLiveEntity = (entityId: string) => {
	const { connection, isConnected } = useSignalR();
	const connectionId = connection?.connectionId;
	const queryClient = useQueryClient();
	const queryKey = ['entity', entityId];

	// 1. Subscribe through the MFE's own BFF, keyed on the connection ID
	useEntitySubscription(entityId, connectionId);

	// 2. Catch up after every new or restored connection
	useEffect(() => {
		if (isConnected) void queryClient.invalidateQueries({ queryKey });
	}, [isConnected, connectionId]);

	// 3. The payload is the whole CloudEvent as a JSON string
	useHubEvent<string>('entity.updated', (raw) => {
		const event = JSON.parse(raw);
		if (event.ion?.entity_id === entityId) void queryClient.invalidateQueries({ queryKey });
	});
};

Group contract

The group name is {entity_name}-{entity_id}. The subscription API and the event schema share one closed enum, so a subscription and an event always meet in the same group:

entity_nameEntity
security_incidentsSecurity incident
security_ticketsSecurity ticket
service_requestsService request
use_casesUse case (Elk)
spi_tasksSecurity posture improvement task
customersCustomer
investigationsInvestigation (Reichenbach)

Membership is held per user, not per connection. That has consequences every MFE team needs to know:

PropertyEffect
Follows the userEvery tab and every device of the user receives the group’s events, not just the tab that subscribed
Survives reconnectsA reconnect keeps the membership. MFEs still re-subscribe on a new connection ID, which is idempotent and also restores the membership if the hub was recreated
Unsubscribe is user-wideDELETE removes the user from the group in every tab. Another tab that still shows the entity stops receiving events until it re-subscribes. The REST catch-up rule limits the impact
No TTLA membership that is never deleted stays until the hub is recreated. See gap RT-05
Not an authorization recordMembership only routes notifications. Every read still goes through the MFE’s BFF and its authorization

Adding an entity type

A new entity_name is a contract change owned by the Alya team. It touches three artefacts in alya-bff-shell-signalr/ that MUST change together:

  1. the entity_name enum in the internal API spec assgr-api-int.yaml;
  2. the entity_name enum in the event schema api/v1/events/signalr-event.json;
  3. the IonEntityName code enum.

Deploy the Shell SignalR BFF first. A producer or relay that uses a new value before then gets 400 on subscribe and SchemaValidationFailed on send.

Onboarding checklists

MFE team

  • Use useSignalR and useHubEvent from @fe-ws/signalr, and confirm the package is a singleton in the remote’s rsbuild.config.ts.
  • Add a subscribe and unsubscribe route to the MFE’s own BFF, called on the MFE’s own origin.
  • Key subscriptions on connection.connectionId.
  • Refetch over REST on every new connection, and make event handlers tolerate duplicates, gaps, and reordering.
  • Listen on exactly the ion.event_name values the producer sends.
  • Do not call useHubSend, negotiate, or /api/v2/signalr/*.

MFE BFF team (subscription relay)

  • Request the Ion.RealtimeChannel.ReadWrite app role for the BFF’s managed identity from the Alya team.
  • Configure the assgr-int base URL, https://apim-rome-<env>-chn-02.azure-api.net/assgr-int.
  • Authorize the user for the specific entity, with the same scope and permission rules as a read of that entity, before relaying.
  • Relay POST and DELETE /v2/signalr/{entity_name}/{entity_id}/subscriptions with the BFF’s token in Authorization.
  • Return a clear error to the MFE when assgr-int fails. A failed subscription MUST NOT break the page, because the MFE still has REST.

Producer team

  • Publish through the ION Service Bus client so the event is signed and carries the signature and cloudevent.type application properties.
  • Use a type that starts with ion.event.signalr., or the subscription filter drops the event.
  • Set a SessionId. The subscription is session-enabled. Choose a key that orders events per entity, such as the entity or workspace ID.
  • Set ion.entity_name from the enum, ion.entity_id, and ion.event_name, the client method the MFE listens on.
  • Get the Azure Service Bus Data Sender role on the topic for the producer’s identity.
  • Register the producer’s public key in every environment’s decryption_mechanisms tfvars in alya-bff-shell-signalr. App Configuration stores it as CloudEventCrypto:DecryptionMechanisms:<source without colons>. Without it, every event is dead-lettered with InvalidMessageSignature.
  • Keep data small. The whole CloudEvent goes to the browser, so it MUST NOT carry data the subscribed user may not read.

Event contract

The schema is alya-bff-shell-signalr/api/v1/events/signalr-event.json.

FieldWhereRule
specversion, id, timeBodyCloudEvents 1.0
typeBody and cloudevent.type application propertyMUST start with ion.event.signalr.. Case-sensitive. Version suffix such as .v1
sourceBodyProducer URN, for example urn:io:ontinue:ion:elk. Selects the public key
ion.entity_nameBodyOne value from the enum
ion.entity_idBodyThe entity instance ID
ion.event_nameBodyThe client method name that useHubEvent listens on
dataBodyProducer-defined. Reaches the browser unchanged
signatureApplication propertySet by the ION Service Bus client
SessionIdMessageRequired by the session-enabled subscription

Illustrative example:

{
  "specversion": "1.0",
  "id": "8d6c…",
  "type": "ion.event.signalr.axonstatusupdated.v1",
  "source": "urn:io:ontinue:ion:elk",
  "time": "2026-10-15T09:12:44Z",
  "ion": {
    "entity_name": "use_cases",
    "entity_id": "uc-1234",
    "event_name": "status-updated"
  },
  "data": { "…": "…" }
}

Delivery and failure semantics

SituationWhat happensWhat protects the user
Duplicate publish within 30 minutesService Bus duplicate detection drops itNothing else needed
Shell SignalR BFF downMessages wait on the subscription (TTL 3 days in production) and are forwarded when it returnsLate events are harmless because MFEs refetch
Bad signature or schemaDead-lettered with a reasonThe dead-letter queue and the service’s alerts
Transient errorAbandoned, retried up to 3 deliveries, then dead-letteredSame as above
Browser disconnected when the event is sentThe event is lost. Azure SignalR does not buffer for offline usersREST refetch on the next connection
WebSocket dropswithAutomaticReconnect() retries after 0, 2, 10, and 30 seconds, then the connection closesREST refetch. The polling fallback is not implemented (RT-02)
Application Gateway downHTTP fails over to priority-2 origins. The WebSocket leg has no failoverUsers see stale data until they refresh or the gateway returns
Front Door down, bypass activeThe shell runs on its agw-*-webapp hostname, but negotiate fails because the bypass rewrite set has no v2/signalr rule (RT-03)REST works through the bypass. Users refresh manually
assgr-int rate limit hit429 to the relaying BFFThe MFE still works over REST

Hosting and deployment

ItemValue
Function Appfunc-assgr-<env>-chn-01, Windows, .NET 10 isolated, plan S1, 3 workers in prd and gma, 1 elsewhere, always_on, health check api/v2/health, IP restrictions default Deny
SlotsBlue-green through a staging slot. The staging slot uses subscription assgr-signalr-events-v1-deployslot with its trigger disabled through sticky settings. Production uses assgr-signalr-events-v1-main
Azure SignalRsigr-assgr-<env>-chn-01, Standard_S1, 1 unit, Serverless, local auth disabled, public network access disabled, private endpoint, connectivity and messaging logs on
Hub identityUser-assigned managed identity with SignalR App Server and SignalR REST API Owner on the instance
Service BusTopic alya-signalr-events, duplicate detection 30 minutes, message TTL 3 days in prd. Subscription is session-enabled, filter "cloudevent.type" like 'ion.event.signalr.%', max delivery 3
APIMassgr-ext in apim-product-mfe-<env>-chn-01. assgr-int in its own internal product. CORS on assgr-ext allows the portal.alya, portal.alyashell, and portal.imfe origins and their agw-*-webapp twins, plus localhost in alpha and beta
ReliabilityT1 dependency of the T0 Alya workbench flow. See DR implementation: SignalR

Legacy v1 SignalR

Legacy. New work MUST NOT use it

The first-generation Alya SignalR BFF is still deployed and still used by the Alya shell itself (useSignalrNegotiation, socket.service.ts). New MFEs, BFFs, and producers MUST use the Shell SignalR BFF described above. There is no decommission plan yet (gap RT-13).

ItemLegacy v1Shell SignalR (v2)
Public path/api/v1/signalr/* on portal.alya, portal.imfe, and portal.ioniq/api/v2/signalr/* on portal.alya only
APIM APIalya-sigr-ext-feassgr-ext and assgr-int
BackendAlya SignalR BFF (asbff), Azure SignalR sigr-asbff-<env>-chn-01func-assgr, sigr-assgr-<env>-chn-01
WebSocket hostagw-alya-sigr.<domain>, cookie affinity enabledagw-alya-shell-sigr.<domain>, no affinity
Hubsalya_hub, modification_hub, service_request_hub, responseactions_events_hubalya
Bypass rewritePresent (alya-sigr-v1-rewrite)Missing (RT-03)

Non-conformance and gaps

IDGapImpactOwner
RT-01Non-conformant. The Elk and Reichenbach BFFs forward the raw user token to assgr-int in X-Authorization. The identity workflow says a relaying BFF passes validated context, not the token. The guidance is unchangedThe user token travels one hop further than designedAlya, Reichenbach
RT-02The REST polling fallback is a MUST but is not implemented. @fe-ws/signalr has no timeout or fallback, and no MFE implementation was verifiedWhen the connection is down, MFEs show stale data until the user refreshesFE Guild
RT-03The Application Gateway rewrite set for the Alya bypass (data-alya-shell-fe.tf) has no v2/signalr ruleLive updates stop during a Front Door outage bypassCPE
RT-04assgr-int rate limits are keyed on the caller oid, which is the relaying BFF’s managed identity. Operation: 150 per minute per oid, 1,000 per minute per IP. API: 300 per minute per oid, 1,000 per minute per IP, quota 8,000 per 30 minutes per oidThe effective limit is per BFF across all users, so one busy MFE can exhaust it for all of its usersAlya
RT-05UserGroups.AddToGroupAsync sets no TTLMemberships that are never deleted accumulateAlya
RT-06Production decryption_mechanisms registers only Elk. Reichenbach is registered in alpha, beta, and gamma onlyReichenbach events in production would be dead-lettered with InvalidMessageSignatureAlya, Reichenbach
RT-07The Shell SignalR BFF accepts only the Ontinue tenant and capability shell Alya. Support for the Bondi shell is undecidedCustomer-facing MFEs have no live-update pathAlya
RT-08Relays authorize by role (Reichenbach checks the reader role) or by entity existence (Elk checks the use case), not by the entity’s tenant scope. The Shell SignalR BFF does no resource authorizationAcceptable only while RT-07 holds, because Alya users have unrestricted scope. MUST be closed before any restricted-scope shell is supportedAlya, Reichenbach
RT-09Topic alya-signalr-cmds exists and the managed identity has the Sender role on it, but nothing uses itUnused permission and resourceAlya
RT-10@fe-ws/signalr exports useHubSend, but the Serverless hub has no upstreamCalls succeed in the browser and are silently droppedFE Guild
RT-11Azure SignalR CORS allows *Wider than needed. Negotiate CORS in APIM is already narrowAlya
RT-12Standard_S1, 1 unit, no availability zones, and not sized against the capacity modelA zone loss or connection peak stops live updates. Tracked as DR-09 and SC-03Alya
RT-13Legacy v1 SignalR is still in use and has no decommission planTwo real-time stacks to run and secureAlya
RT-14Verify. The shell’s negotiate query has no refetch interval and disables refetch on mount, focus, and reconnect, so nothing appears to renegotiate before the 1-hour token expiresAn automatic reconnect after the first hour may fail with an expired token, and live updates stop until reloadAlya
RT-15Verify. The Function App health check path is api/v2/health, but the health function route is v1/healthApp Service may treat healthy workers as unhealthy and recycle themAlya
RT-16Verify. The Reichenbach aggregator sets ion.event_name to the update type, such as reichenbach.key-findings.updated. The Reichenbach MFE listens on investigation.event and its handlers expect the inner update object, with type and data. The Shell SignalR BFF sends the whole CloudEvent as a JSON stringInvestigation cards may not update liveReichenbach

The SignalR access_token query parameter is also recorded in the Application Gateway access logs. That risk is tracked as gap 23 in the Application Gateway implementation.

Related documentation

  • Architecture · Identity and access · Routing and ingress · Composition · Implementation
  • Capability service (Signet) · Shells and MFEs
  • Identity workflow: shell and MFE · DR implementation: SignalR
  • Pattern — MFE UI Interaction · UI Interaction
  • ADR-0023 — Micro-Frontend (MFE) UI architecture · ADR-0015 — Edge topology
  • Source references: Event Sourcing - MFE UI Interaction Design Pattern · Event Sourcing - UI Interaction Design Pattern

On this page

  • At a glance
  • Why a single Shell SignalR BFF
  • Topology
  • Endpoints and paths
  • Flow 1 — Negotiate and connect
  • Flow 2 — Register for an entity’s notifications
  • Flow 3 — Send a notification from the backend
  • Consuming notifications in an MFE
  • Group contract
  • Adding an entity type
  • Onboarding checklists
  • MFE team
  • MFE BFF team (subscription relay)
  • Producer team
  • Event contract
  • Delivery and failure semantics
  • Hosting and deployment
  • Legacy v1 SignalR
  • Non-conformance and gaps
  • Related documentation
PreviousMicro-Frontends implementation
NextMicro-Frontends routing and ingress
Edit on GitHubSecurity