Skip to content

BIP Claims API

Derek Fitchett edited this page Dec 10, 2024 · 15 revisions

BIP Claims API

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.

Requests

Requests can be sent to the Downstream BIP Claims API by forwarding through the service svc-bip-api via RabbitMQ. To send requests over RabbitMQ, use exchange name svc_bip_api.requests and one of the queues below:

Downstream Endpoint Queue Name Request Input Response Description
GET {baseURL}/contentions/special_issue_types svc_bip_api.get_special_issue_types GetSpecialIssueTypesRequest GetSpecialIssueTypesResponse Get special issue types for contentions
GET {baseURL}/claims/{claimId} svc_bip_api.get_claim_details GetSpecialIssueTypesRequest GetSpecialIssueTypesResponse Get claim details by claim ID
PUT {baseURL}/claims/{claimId}/cancel svc_bip_api.cancel_claim CancelClaimRequest CancelClaimResponse Cancel claim by claim ID
GET {baseURL}/claims/{claimId}/contentions svc_bip_api.get_claim_contentions GetClaimContentionsRequest GetClaimContentionsResponse Get claim contentions for claim by claim ID
POST {baseURL}/claims/{claimId}/contentions svc_bip_api.create_claim_contentions CreateClaimContentionsRequest CreateClaimContentionsResponse Create claim contentions on claim by claim ID
PUT {baseURL}/claims/{claimId}/contentions svc_bip_api.update_claim_contentions UpdateClaimContentionsRequest UpdateClaimContentionsResponse Update claim contentions in claim by claim ID
PUT {baseURL}/claims/{claimId}/lifecycle_status svc_bip_api.put_claim_lifecycle_status PutClaimLifecycleRequest PutClaimLifecycleResponse Update claim's lifecycle status
PUT {baseURL}/claims/{claimId}/temporary_station_of_jurisdiction svc_bip_api.put_temp_station_of_jurisdiction PutTempStationOfJurisdictionRequest PutTempStationOfJurisdictionResponse Update claim's temporary station of jurisdiction

The baseURL 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.

RabbitMqController fields all requests from RabbitMQ on the queues above and makes the downstream requests to the BIP Claims API using the BipApiService which uses a custom RestTemplate to make the secure call to the downstream endpoints. When the response is received, it is sent back to the caller on the same exchange using the routing key included in the original request headers (see VRO RabbitMQ Strategy).

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

Security Requirements

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

  • Application Id (applicationID): VRO application name - environment variable BIP_APPLICATION_ID loaded through bip.applicationId application property
  • Station Id (stationID): Custom - VRO system user facility - environment variable BIP_STATION_ID loaded through bip.stationId application property
  • User Id (userID): Custom - VRO system user - environment variable BIP_CLAIM_USERID loaded through bip.claimClientId application property
  • Issuer (iss) - environment variable BIP_CLAIM_ISSUER loaded through bip.claimIssuer application property
  • Subject (sub) - hard-coded
  • Issued At (iat) - dynamic upon creation
  • Expiration (exp) - dynamic upon creation
  • External User ID (externalUserId): unique id linked to the veteran or user making these changes - added from the request field externalUserId (see BipPayloadRequest)
  • External Key (externalKey): key indicating how the externalUserId is linked to the user - added from the request field externalKey (see BipPayloadRequest)

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

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.

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.

For more information about the JWT payload and contact info, see the bip-vetservices-claims wiki (private repo).

Clone this wiki locally