This project was initially cloned from the original HAPI FHIR JPA Server Starter repo and is a "custom" version of it.
BasicAuth
class has been created, containing all necessary functions for HTTP Basic Auth implementation;BasicAuthorizationInterceptor
has been created as anAuthInterceptor
implementation - it intercepts incoming requests to the HAPI FHIR server and serves as an auth layer, comparing credentials in the header withhapi.fhir.server_client_id
andhapi.fhir.server_client_secret
;SecurityServletFilter
has been created as anHttpFilter
implementation - it filters incoming requests to the HAPI FHIR Tester App and serves as an auth layer.
- Oracle Java (JDK) 8 or newer;
- Apache Maven build tool (the newer, the better)
- Docker
mvn jetty:run
docker pull sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:dev
docker run -p 80:8080 sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:dev
docker-compose up
The project needs to be built before executing the command below.
mvn failsafe:integration-test
HAPI looks in the environment variables for properties in the application.yaml file for defaults, but it's also possible to override those properties by passing them as docker environment variables, e.g.:
docker run -p 80:8080 -e hapi.fhir.default_encoding=xml sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:dev
You may also want to use another application.yaml
file instead. It's possible by simply passing a path to it as an environment variable:
docker run -p 80:8080 -v $(pwd)/yourLocalFolder:/configs -e "--spring.config.location=file:///configs/another.application.yaml" sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:dev
mvn clean
- cleans thetarget
directory contentmvn package
- builds the project and stores into thetarget
directory