Skip to content

BIP Claims API

Cheng edited this page Jun 21, 2023 · 15 revisions

VRO uses BIP Claims API to get information about and do updates to VBA Benefit Claims.

Access to BIP Claims API is available only within VA firewall.

BIP Claims API uses mTLS. VRO's mTLS implementation is detailed in BIP-APIs.

Integration Requirements

The following benefit claim data is retrieved

  • Temporary station of jurisdiction
  • Existence of contentions' special issues "Rapid Decision Rating Version 1" (RDR1) and "Rapid Ready Decision" (RRD)

The following are the updates to claim data

  • Removal of contentions' special issue RDR1
  • Update of lifecycle status to "Ready for Decision" (RFD)

Open API Specification

BIP Claim API's Open API Specification is available from the Swagger page.

All the end-points that are used within the VRO application is also available from the Mock Bip Claim Api Swagger page in the local development environment.

Code Walkthrough

Security Requirements

BIP requires a Bearer JWT for access. Following claims are used

  • Subject (sub)
  • User Id (userID): Custom - VRO system user
  • Issuer (iss)
  • Station Id (stationID): Custom - VRO system user facility (?)
  • Application Id (applicationID): Custom - VRO application name
  • Expiration (exp)
  • Issued At (iat)

The JWT is created before each API call in BipApiService createJwt method.

Subject claim is hard-coded in createJwt. Expiration and Issued At claims are dynamicaly created in createJwt. The other claims are made available to the application with environment variables through application.properties.

  • User Id: BIP_CLAIM_USERID through bip.claimClientId
  • Issuer: BIP_CLAIM_ISS through bip.claimIssuer
  • Station Id: BIP_STATION_ID through bip.stationId
  • Application Id: BIP_APPLICATION_ID through bip.applicationId

JWT is signed by a secret provided by the BIP API team. The secret is made available to the application with the environment variable BIP_CLAIM_SECRET through application.properties bip.claimSecret setting.

In the VRO Kubernetes environment the related Kubernetes secrets for the BIP environment variables are

  • BIP_CLAIM_USERID: bip.bipClaimUserId
  • BIP_CLAIM_ISS: bip.bipApplicationIss
  • BIP_STATION_ID: bip.bipStationId
  • BIP_APPLICATION_ID: bip.bipApplicationId
  • BIP_CLAIM_SECRET: bip.bipClaimSecret

Note that due to an issue in the application (BIP_CLAIM_ISS is not specied in Helm charts) bip.bipApplicationIss is not functional. The hard coded value in application.properties bip.claimIssuer setting is used. This is in the list of issues for future fixes.

A set of BIP environment variables are available for local development by sourcing the setenv.sh script. There were attempts to move these to application-local.properties but failed. Please see the note in setenv.sh script.

** API hostnames**

Environment Hostname
dev claims-dev.dev.bip.va.gov
test claims-test.dev.bip.va.gov
int claims-int.dev.bip.va.gov
ivv claims-ivv.stage.bip.va.gov
uat claims-uat.stage.bip.va.gov
pat claims-pat.stage.bip.va.gov
pdt claims-pdt.stage.bip.va.gov
demo claims-demo.stage.bip.va.gov
perf claims-perf.prod.bip.va.gov
preprod claims-preprod.prod.bip.va.gov
prodtest claims-prodtest.prod.bip.va.gov
cola claims-cola.prod.bip.va.gov
prod claims-prod.prod.bip.va.gov

API Calls

The following end points are used

  • GET /claims/{claimId}
  • GET /claims/{claimId}/contentions
  • PUT /claims/{claimId}/contentions
  • PUT /claims/{claimId}/lifecycle_status

The base URL is made available to the application with the environment variable BIP_CLAIM_URL through application.properties bip.claimBaseURL setting. The corresponding Kubernetes secret is bip.bipClaimUrl.

For local development and testing a Mock Server is available in docker compose with host name mock-bip-claims-api.

BIP API Service

All API calls are implemented in Bip API Service. Bip API Service uses the custom RestTemplate bean (qualifier: bipCERestTemplate) described in BIP-APIs.

Bip Api Service is available to rest of the application as a Spring service. The only current customer is Bip Claim Service which uses it through Bip Api Service Interface. This is mostly for historical progression of the implementation but also makes it possible to unit test Bip Claim Service more easily as Bip Api Service Interface is overridden in a test configuration.

BIP Claim Service

BIP Claims API related functionality is provided to the rest of the application through BIP Claim Service. The public methods hasAnchors, removeSpecialIssue, and markAsRFD should be recognizable from the VRO-v2-Roadmap. The public method completeProcessing is used to double check temporary station of jurisdiction as specified in requirements.

Clone this wiki locally