> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/platform/platform-services/websub/deployment.md).

# Deployment

Commons deployment of the MOSIP WebSub hub and consolidator, including Kafka and hub authentication.

OpenG2P Commons Services deploys the MOSIP hub and consolidator.

| Component    | Default image                               |
| ------------ | ------------------------------------------- |
| Hub          | `mosipid/websub-service:1.3.2`              |
| Consolidator | `mosipid/consolidator-websub-service:1.3.2` |

The chart can install a Kafka broker. Commons points the hub at the broker that is already installed:

```yaml
websub:
  enabled: true
  securityOn: false
  kafka:
    enabled: false
  kafkaInstallationName: commons-kafka
```

With the standard release names:

| Service             | URL                              |
| ------------------- | -------------------------------- |
| Hub, same namespace | `http://commons-services-websub` |
| Kafka               | `commons-kafka:9092`             |

Registry chart value `global.websubBaseUrl` should be the hub root, without `/hub`. The default in Commons is `http://commons-services-websub`.

## Hub authentication

`securityOn` enables the MOSIP auth-manager cookie check on register, publish, and subscribe. The Registry publishers do not obtain that cookie, so the Commons integration sets:

```yaml
securityOn: false
```

That switch does not disable callback challenges or `X-Hub-Signature`. Subscribers still send `hub.secret`. Turn `securityOn` on only when MOSIP auth-manager is deployed and every publisher and subscriber sends `Cookie: Authorization=<token>`.

## Registry processes

`WebsubHelper` lives in `openg2p-registry-core` and reads `websub_base_url`. The core setting name is `REGISTRY_CORE_WEBSUB_BASE_URL`. The Partner API and Celery charts also expose:

| Process       | Chart environment variable                |
| ------------- | ----------------------------------------- |
| Partner API   | `REGISTRY_PARTNER_API_WEBSUB_BASE_URL`    |
| Celery worker | `REGISTRY_CELERY_WORKERS_WEBSUB_BASE_URL` |

{% hint style="warning" %}
After an upgrade, confirm the effective `websub_base_url` inside both running processes. The default value set in core is the incluster access route `http://commons-services-websub`.
{% endhint %}

Which Registry call uses the hub is specified with the feature: topic registration in the [Outgestion Pipeline](https://docs.openg2p.org/products/registry/registry/design/outgestion-pipeline.md), and asynchronous search publish in [DCI partner search](https://docs.openg2p.org/products/registry/registry/design/partner-register-search/dci-search.md).

## Operations

| Component    | Health                          |
| ------------ | ------------------------------- |
| Hub          | `/hub/actuator/health`          |
| Consolidator | `/consolidator/actuator/health` |

| Symptom                                | Check                                                                                         |
| -------------------------------------- | --------------------------------------------------------------------------------------------- |
| `hub.mode=denied` with HTTP 200        | `securityOn`, auth-manager, and whether the caller sent the MOSIP cookie.                     |
| Subscribe is rejected                  | Non-empty `hub.secret`, a callback the hub can reach, and a body that echoes `hub.challenge`. |
| Publishes succeed but no callback runs | Subscription topic name, challenge response, and hub delivery logs.                           |

Kafka topic names are listed in [Subscription and delivery](https://docs.openg2p.org/platform/platform-services/websub/subscription.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/platform/platform-services/websub/deployment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
