FHIR Chat · reverse proxy mode · hapi

Stream: hapi

Topic: reverse proxy mode


view this post on Zulip Grahame Grieve (Oct 19 2016 at 20:49):

hey James, can you run HAPI in a reverse proxy mode, where it simply serves the interface and then redirects to another server?

view this post on Zulip Grahame Grieve (Oct 19 2016 at 20:49):

well, can you run the CLI in that mode..

view this post on Zulip James Agnew (Oct 21 2016 at 16:04):

Hmm no, CLI assumes it's the only FHIR server in the world at this point. Curious, why would you want to do this?

view this post on Zulip Grahame Grieve (Oct 21 2016 at 20:58):

well, let's say I'm putting up a FHIR server. I need to host a set of functions off my database in my own server.

view this post on Zulip Grahame Grieve (Oct 21 2016 at 20:59):

but my dev team is not so large, and I don't have $$ for a focused web security guy, and I'm concerned that I don't have the skills to put up a secure web server that doesn't accidentally expose other services I know nothing about

view this post on Zulip Grahame Grieve (Oct 21 2016 at 21:00):

but I could put a reverse proxy HAPI CLI, and know that my server is completely hidden behind a FHIR server that has been inspected and hammered

view this post on Zulip Grahame Grieve (Oct 21 2016 at 21:00):

and I can get HAPI to handle conformance and tx in front of me....

view this post on Zulip James Agnew (Oct 21 2016 at 21:19):

oh interesting. yeah, i could see that.

not supported yet, but that does sound like something worthwhile to add to the roadmap... i guess similarly if you had a FHIR server that only supported one of JSON or XML it could handle translation too.

view this post on Zulip Grahame Grieve (Oct 21 2016 at 21:21):

y

view this post on Zulip David Hay (Oct 22 2016 at 18:52):

Would it be worth thinking about how to support something like nginx in that role? I don't know enough to really comment properly, but suspect there will be issues with references where HAPI thinks it's at a particular URL, but nginx is re-writing it...

view this post on Zulip Kevin Mayfield (Oct 22 2016 at 21:41):

Would Apache Camel be suitable for this? It could pass conformance requests to the HAPI server and forward requests to other FHIR servers (and filter other resources). We're looking at using it for rewriting urls, profile mappings and security translations. In our Camel apps we use Spring and also HAPI FHIR libraries. [We also plan to use traditional health middleware but camel is enabling a micro-service architecture]

view this post on Zulip Grahame Grieve (Oct 23 2016 at 03:34):

you could use any reverse proxy, yes. but having HAPI out in front gives you FHIR specific stuff

view this post on Zulip Brian Postlethwaite (Oct 24 2016 at 01:15):

Yes, explicit URLs would need to be re-written.
But that would then cause issues if XML content is signed (or re-signed).

view this post on Zulip Michael Lawley (Nov 20 2016 at 01:16):

@David Hay Having had some involvement in doing this kind of thing, I can say that it's somewhat feasible if you're running in a read-only mode but it quickly gets very hard as soon as you want to support batch / transactions since you effectively need to do deep inspection of the requests.

HAPI itself is not extra helpful here since it doesn't provide a simple mechanism to process batch requests and feed them up into HAPI's internal dispatch mechanism.

view this post on Zulip Michael Lawley (Nov 20 2016 at 01:18):

@James Agnew Another related use-case would be for delegating terminology-specific requests to a dedicated server while use the HAPI server to handle other resource types.


Last updated: Apr 12 2022 at 19:14 UTC