This project was initially cloned from the original HAPI FHIR JPA Server Starter repo and is a "custom" version of it.
BasicAuthclass has been created, containing all necessary functions for HTTP Basic Auth implementation;BasicAuthorizationInterceptorhas been created as anAuthInterceptorimplementation - it intercepts incoming requests to the HAPI FHIR server and serves as an auth layer, comparing credentials in the header withhapi.fhir.server_client_idandhapi.fhir.server_client_secret;SecurityServletFilterhas been created as anHttpFilterimplementation - 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:rundocker pull sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:dev
docker run -p 80:8080 sensynehealth.azurecr.io/dhos/dhos-hapi-fhir-api:devdocker-compose upThe project needs to be built before executing the command below.
mvn failsafe:integration-testHAPI 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:devYou 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:devmvn clean- cleans thetargetdirectory contentmvn package- builds the project and stores into thetargetdirectory