Skip to content

This application will serve as the replacement for the current HNSecure application.

License

Notifications You must be signed in to change notification settings

bcgov/moh-hni-esb

Repository files navigation

Lifecycle:Stable Security Rating Quality Gate StatusLines of Code

MOH HNI ESB (HNSecure)

The HNI ESB application acts as a single point of access for the HNClient-v2 application.

The application performs an authorization check against the JWT that must be passed in the Authorization header and also does light message validation before routing the message to a final destination.

hnclientv2

Configuration

Prerequisites:

  • Apache Maven 3.6.1+
  • Java 11

Step 1: Configure and run HNI ESB

HNI ESB must be configured to validate a JWT as part of the OAuth 2 flow. The following parameters need to be configured depending on the Keycloak environment:

  • Authorized Party - found in application.properties this is the client id of the client retrieving a JWT
  • Audience - found in application.properties
  • Issuer - still in the code this is the URL of the realm issuing the token
  • RemoteJWKSet - still in the code this is the URL of the certs endpoint of the realm issuing the token

Run the applications

HNI ESB can be run from the command line:

cd hnsecure
mvn compile camel:run

After the application is running, you can send a message using the HNClient-v2 application.

#Testing External Endpoints without connectivity external-endpoint-stubs creates mock endpoints for testing hn-secure routes that send to external endpoints. The endpoints will return a simple response. It can be run from the command line:

cd external-endpoint-stubs
mvn spring-boot:run