Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Modified

Bahmni ABDM Proxy simulates HRP (Health Repository Providers) in order to allow sharing ABDM secrets across multiple single tenant bahmni instances running as HIU/HIP.

  1. Individual Bahmni instances (as HIU/HIP) continues to directly call the ABDM gateway using shared secrets

  2. ABDM Gateway responds back onto the ABDM Proxy callback endpoint (common accross all Bahmni HIP/HIU instances).

  3. ABDM Proxy maintains knowledge (map) about HIU/HIP (key) and their corresponding instance url. It extracts the HIU/HIP ID from the request callback header (e.g. X-HIU-ID) and derive the deligate delegate url

  4. It would then forward the request to the deligate delegate url (with headers as-is) in order to have it handled by the designated HIP/HIU instance.

...

Code Block
kubectl apply -f ingress.yaml

🔘

...

Configure HIU and HIP services on ABDM Gateway

Register individual HIP/HIU as service on the gateway using the shared abdm client secrets

Code Block
//HIU
curl --location --request PUT 'https://dev.ndhm.gov.in/devservice/v1/bridges/services' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ENTER_THE_TOKEN' \
--data-raw '{"id":"alpha","name":"Alpha","type":"HIU","active":true,"alias":["Alpha"]}'

//HIP
curl --location --request PUT 'https://dev.ndhm.gov.in/devservice/v1/bridges/services' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ENTER_THE_TOKEN' \
--data-raw '{"id":"omega","name":"Omega","type":"HIP","active":true,"alias":["Omega"]}'
Info

Configure the HIU ID and HIP ID registered with the gateway in the values.yaml of umbrella chart and follow this guide to provision the cluster.

🔘 Configure HIU and HIP instance url on Bahmni ABDM Proxy

Bahmni ABDM proxy uses Nginx + NJS to manage the HIU/HIP map and perform the deligation. Change the deligateRepository in njs.ts to represent your bahmni cluster with various instances of bahmni. In below example alpha and omega are 2 bahmni instances running as HIP/HIP in different namespace within the same EKS cluster having their own A record defined.

Code Block
const deligateRepository: { [key: string]: string } = {
  alpha: 'alpha.mybahmni.in',
  omega: 'omega.mybahmni.in',
};

TODO

...

Setup alpha and omega as HIP and HIU ID

...

Create services on ABDM gateway

...

Create Docker Image and push to Implementer’s dockerhub

...

Build the project using yarn build

Create and publish docker Image: docker build -t yourDockerHubRepo/abdm-callback-proxy . && docker push yourDockerHubRepo/abdm-callback-proxy. It would also require you to do a docker login to your dockerhub account before pushing the image.

Info

Setup a new dockerhub repo to maintain the abdm-callback-proxy image versions prior to building and publishing

🔘 Apply abdm proxy service in default namespace

Replace spec.containers.image in abdm-callback.proxy.yaml with your Dockerhub repo name (instead of bahmniindiadistro/). Apply the abdm-callback-proxy service in default namesapce

Code Block
kubectl apply -f abdm-callback.proxy.yaml
Info

To apply newer version of latest abdm-callback-proxy image on the cluser, use kubectl rollout restart deployment abdm-callback-proxy