Why Apache APISIX fits healthcare API protection
A health IT leader usually faces the same problem: FHIR servers, patient-facing apps, clinician portals and partner APIs have grown up with their own access paths, and no single place enforces who may call what. Apache APISIX gives those services one controlled entry point, deployed inside the organization's own cloud accounts, data centers or restricted networks. At that edge it routes requests to upstream services, validates identity through the openid-connect plugin against an identity provider the organization already runs, applies key, JWT or client certificate checks for machine clients, and limits request rates. Configuration lives in the gateway's Admin API or in files and can be changed without restarting, which lets the team manage routes as reviewed code.
The license is a practical starting point for procurement. APISIX is a top-level Apache Software Foundation project under the Apache License 2.0, so the organization can run the software without a per-seat or per-route license from the project itself. Commercial support, if wanted, comes from separate vendors, and the team should ask for that support in writing. Because the gateway runs where the organization controls it, the team also decides where logs, certificates and etcd data sit, which matters for data residency and for the business associate analysis under the HIPAA Security Rule.
The gateway is one control among several. The HIPAA Security Rule applies to covered entities and business associates for all electronic protected health information they handle, and no gateway configuration makes an organization compliant on its own. APISIX can support access control, transmission security and audit evidence for the systems behind it, but the organization still owns its risk analysis, workforce access decisions and the way FHIR resources are authorized inside each server. Before the build starts, confirm with your privacy and compliance leads which traffic the gateway will see, which of those flows carry ePHI, and which evidence an assessor will expect the gateway to produce.
Which HIPAA Security Rule requirements the gateway touches
This table maps the HIPAA Security Rule provisions that an APISIX gateway in front of clinical APIs can support, and what each one asks of the gateway configuration and the surrounding operation. Read it as a list of evidence the gateway can produce, not as a list of requirements the gateway satisfies on its own. The main takeaway is that the rule binds covered entities and business associates, that no HIPAA certification exists, and that the gateway only contributes to the compliance work your organization documents.
| Requirement | What it asks for | What the APISIX build contributes |
|---|---|---|
| Unique user identification (164.312(a)(2)(i), required) | Each user of ePHI systems has a unique name or number that is tracked. | Use per-consumer identities through OpenID Connect or JWT claims so each request maps to one person or client, not a shared API key. |
| Emergency access procedure (164.312(a)(2)(ii), required) | A documented way to reach ePHI during an emergency. | Define a break-glass route and credential path in the gateway design, with its approval and logging documented outside APISIX. |
| Automatic logoff (164.312(a)(2)(iii), addressable) | Sessions end after a period of inactivity. | Set token lifetimes and session timeouts in the identity provider and gateway, then document the chosen values and why they are reasonable. |
| Encryption and decryption (164.312(a)(2)(iv), addressable) | Mechanisms to encrypt ePHI where appropriate. | Terminate TLS at the gateway for client traffic and confirm the upstream leg to the FHIR server is also encrypted. Record the decision if any hop is left unencrypted. |
| Audit controls (164.312(b), standard) | Mechanisms that record and examine activity in systems with ePHI. | Log authentication outcomes and route access, and keep request bodies and identifiers out of gateway logs. Confirm the logging plugin and retention with your team. |
| Transmission security (164.312(e), standard) | Guard ePHI sent over electronic networks against unauthorized access. | Enforce TLS on every exposed route, use mTLS for machine clients where your partners support it, and restrict the Admin API to management networks. |
| Business associate terms (164.314(a)) | Contracts require subcontractors handling ePHI to meet the Security Rule and report incidents. | If DeployOpen or a hosting provider operates the gateway with access to ePHI, the contract must cover that work. Confirm the terms with your legal team before access begins. |
| Addressable specification process (164.306(d)) | For each addressable item, assess whether it is reasonable and appropriate, document the decision and implement an equivalent measure if needed. | Keep a written decision record for each addressable setting used in the gateway, such as token lifetime or encryption on internal hops. |
Routes, OIDC and plugins that matter for clinical APIs
A clinical API gateway succeeds or fails on a small set of configuration choices. Each card below covers one decision that shapes who can reach a FHIR endpoint, how users and machines prove identity, and where the gateway's responsibility ends and the FHIR server's begins.
Routes to FHIR endpoints
Define routes per FHIR resource family and HTTP method instead of one catch-all route to the FHIR base URL. Narrow routes make it possible to restrict write operations, such as creating or updating Patient resources, to a small set of trusted clients. Map each route to a named upstream and record which applications are allowed to call it. Confirm with your FHIR server team which base paths, search parameters and bulk operations the clinical apps actually use before you write the route list.
OpenID Connect with your identity provider
Use the openid-connect plugin for clinician-facing and patient-facing applications, with Keycloak, Microsoft Entra ID or another identity provider your organization already runs. Decide which flow each application uses, such as authorization code with PKCE for browser and mobile apps, and confirm the token claims the FHIR server needs for role and care-team decisions. Test token expiry, refresh and logout behavior before go-live, because gateway sessions and identity provider sessions can drift apart.
Key-auth and JWT for machine clients
Backend services, integration engines and scheduled exports usually cannot complete an interactive login, so they need key-auth or jwt-auth with consumers defined per system. Issue one consumer per integration so that revoking one credential does not affect others, and rotate keys on a schedule your security team sets. Keep the consumer list reviewed against the clinical systems inventory, because stale machine credentials are a common path into patient data.
Forward-auth for policy decisions
Where access depends on care relationships, consent or facility context, route the request through forward-auth to a policy service that returns allow or deny. This keeps the decision logic in one place that the compliance team can review, rather than spreading it across route configurations. Plan for the policy service to be highly available, because a failed call to it will block access. Confirm how the policy service receives the user identity and the requested resource.
Admin API kept off client networks
APISIX serves client traffic on port 9080 in traditional mode and exposes the Admin API on port 9180. The Admin API can change routes, consumers and plugins, so bind it to a management network, restrict it with firewall rules and require an admin key that is stored in your secrets manager. Verify from a client network that port 9180 is unreachable. Treat the Admin API as the most sensitive interface on the gateway, because a change there can expose patient endpoints without any application change.
Custom plugins only where needed
Write a custom plugin only when no built-in plugin covers a documented requirement, such as a header transformation that your FHIR clients depend on. Lua plugins run inside the gateway, while plugin runners let teams write in Java, Go or Python. Each custom plugin becomes code your team must test, patch and document for auditors. Keep the gateway as a control point for transport, identity and traffic, and do not move FHIR resource-level authorization into it.
Gateway is not FHIR authorization
The gateway can confirm who is calling and whether the route is allowed, but it cannot see which Patient resources a clinician should read. Resource-level access belongs in the FHIR server, which offers an AuthorizationInterceptor, consent and search narrowing interceptors and audit logging. Document this split in your design so that reviewers do not assume the gateway enforces care-team rules. Confirm the FHIR server's authorization configuration as part of the same release.
How a clinical request passes the gateway to the FHIR server
The gateway authenticates the caller before any request reaches the FHIR server, and the FHIR server still decides which resources that caller may read or change. A patient app or clinician client sends its request to APISIX in the DMZ on client traffic port 9080 (or the TLS listener you configure). APISIX runs the openid-connect plugin, which checks the bearer token against your identity provider, such as Keycloak, Microsoft Entra ID or Okta, and then forwards the request on the matched route to the FHIR server. Token validation at the gateway stops unauthenticated traffic early, but it only establishes who the caller is. Confirm with your identity team which token claims (scopes, SMART launch context, patient or practitioner identifiers) the gateway passes to HAPI FHIR as headers, and which claims the FHIR server must re-check itself.
The trust boundary sits between the DMZ gateway and the clinical network. Decide where TLS terminates and where it is re-established before writing any route. A common design terminates TLS on APISIX with the public certificate, then opens a new TLS session from APISIX to the FHIR server inside the clinical network, so the internal hop is encrypted too. Each TLS segment needs its own certificate chain and a documented owner. Under the HIPAA Security Rule, the encryption specification in 45 CFR 164.312 is addressable, so the decision and the reason for any unencrypted internal hop must be written down under 45 CFR 164.306(d) if you choose one. Firewall rules should allow only APISIX to reach the FHIR server port, and the Admin API on port 9180 should never be reachable from the DMZ.
The FHIR server remains the last control on resource access. HAPI FHIR states that it does not provide one security layer, so the team must configure its AuthorizationInterceptor and consent or search narrowing interceptors to limit reads by patient, organization or care relationship. A valid token from the gateway that carries no patient scope should not return a full bundle of records. Plan the test cases before go-live: an authenticated user outside the care team, a token with a narrower scope, and a search that omits a patient parameter. Record which layer rejected each request, because the audit trail needs to show both the gateway decision and the FHIR server decision.
How a healthcare gateway rollout is sequenced
The sequence moves APISIX into front of clinical APIs in controlled stages, so each stage proves identity, routing and logging behavior before any production patient or clinician traffic moves to the new gateway. Each phase ends with a written check that the next phase depends on.
Inventory APIs and map ePHI data flows
Start by listing every API the gateway will front, including FHIR endpoints, patient-facing apps, clinician portals, partner feeds and internal services. For each one, record the callers, the authentication method, the data classes in requests and responses, and where logs are written. Your privacy and security leads confirm which flows carry electronic protected health information (ePHI) under 45 CFR 164.302. The output is a signed inventory that becomes the scope for every later step.
Choose the APISIX deployment mode
Select traditional, decoupled or standalone mode based on your network segmentation, change control and whether you run etcd. APISIX documents all three modes, and the choice determines where the Admin API listens (port 9180 in traditional mode) and how configuration reaches the data plane. Your team, or your implementation partner, documents the decision with the network zones involved. The output is an architecture record approved by security and platform owners.
Stand up APISIX in a staging environment
Deploy the chosen mode into a non-production environment inside your own infrastructure, with TLS, Admin API access restricted to administrators and logging pointed at a test sink. Confirm the client listener (port 9080 in traditional mode) and the Admin API are reachable only from the networks you planned. The output is a running staging gateway with a configuration baseline stored in version control.
Configure OIDC, routes and consumers in staging
Wire the openid-connect plugin to your identity provider using the authorization code flow for patient and clinician apps, and client credentials or introspection for machine clients. Define routes per FHIR server or API, and map consumers and scopes to the care roles that the data owners approved. Test valid tokens, expired tokens, missing scopes and attempts to reach another team's resources. The output is a test report showing each route enforces the access model you documented.
Validate PHI handling in logs and transport
Confirm that access logs, error logs and any observability plugins do not record request bodies, query strings containing identifiers, authorization headers or tokens. Check that every connection carrying ePHI uses TLS and that the certificate and cipher settings match your transmission security policy. Ask your privacy officer to review sample log lines from test traffic. The output is a logging checklist with each field reviewed and an approved list of what is retained and for how long.
Run the new gateway in parallel
Send a controlled share of traffic, or mirrored read-only traffic where the API design allows it, through APISIX while the existing gateway remains the system of record. Compare response codes, latency, authentication decisions and audit entries between the two paths. Log every discrepancy with a root cause and a fix, and rerun the affected tests. The output is a parallel-run report that the clinical application owners accept.
Cut over with a tested rollback
Move production DNS or load balancer targets to APISIX in an agreed change window, with the rollback path written down and rehearsed before the change. Keep the previous gateway configuration available so traffic can return to it if a route, token check or log sink fails. Monitor authentication errors and logging output for the period set in your change plan. The output is a signed cutover record and a retained rollback artifact.
Keeping PHI out of gateway logs
Which access log fields in APISIX can carry patient identifiers?
The default access log fields are where most exposure starts, because the request path and query string are logged by default. A FHIR path such as /Patient/{id} can contain a patient identifier, and so can a search like /Patient?identifier= or a family and birthdate pair. Client IP, user agent and the upstream URI are usually not PHI on their own, but they can become identifying when combined with timestamps and account data. Review the log_format in your configuration and remove or mask any variable that carries request-specific data you do not need. Ask your team to list every field that reaches the log and to justify each one against a clear operational purpose.
Should APISIX log request and response bodies for FHIR traffic?
For clinical APIs, the default answer should be no. Request and response bodies in FHIR calls contain ePHI, including names, diagnoses, medications and notes, so logging them moves PHI into a store with different access controls and retention. Body logging plugins exist in APISIX, but they should stay disabled on routes that carry patient data. If a troubleshooting need arises, enable capture only on a non-production route with synthetic data, or on a short, approved window with a named owner and a removal date. Document the decision in your risk file, since the HIPAA Security Rule expects you to assess addressable safeguards and record the reasoning.
How do we stop identifiers in query strings from reaching logs?
Query strings are the most common leak path in FHIR APIs, because search parameters often hold identifiers such as medical record numbers or dates of birth. The practical controls are to keep these values out of the logged URI and to avoid placing them in query strings where possible. In APISIX, review the $request_uri and $args variables in your access log format and replace them with a masked form or a route-level identifier. Where a client must send identifiers in the query, coordinate with the application team so they move to request headers or the request body, which you can then exclude from logging. Test each change with sample traffic before it reaches production.
How do we keep token claims and bearer tokens out of logs?
Bearer tokens and identity claims should never appear in gateway logs in full. When you use the openid-connect plugin, the gateway validates tokens and can pass user claims upstream as headers, and those headers can end up in logs if the format includes them. Remove Authorization and any token or session cookie from the log format, and avoid logging the claims headers that carry subject identifiers or names. If you need a user reference for investigations, log a stable pseudonymous subject identifier that your identity provider issues, and keep the mapping under restricted access. Confirm the exact header names your configuration emits by checking the plugin documentation for your APISIX version.
What should we ship to a SIEM or Graylog without exposing PHI?
Log shipping should carry only the fields your security and operations teams need, after masking has run. Apply redaction in APISIX before the record leaves the gateway, not later in the SIEM, because copies made earlier in the pipeline are hard to recall. The shipped set typically includes timestamp, route name, status code, latency, consumer or client identifier and a pseudonymous subject reference. Confirm that the receiving system, whether a SIEM or a Graylog-style store, uses encryption in transit, role-based access and retention limits that match your policy. Your business associate contract should also cover any hosted log service that receives this data, since the Security Rule flows terms down to subcontractors that handle ePHI.
How do we test that PHI stays out of gateway logs?
Test with synthetic patient data, not production records, and check the logs at every layer the record passes through. Build a test set that includes a FHIR read by identifier, a search with several parameters, a POST with a clinical body, a request with a bearer token and an error response. Send the traffic through the gateway, then search the access logs, error logs and any shipped copies for the synthetic identifiers and token strings. Repeat the test after every change to the log format, plugin list or route configuration. Keep the test scripts and results as evidence. Auditors and your own compliance team will ask how you verified the control, and a documented, repeatable test answers that question.
Does HAPI FHIR BALP audit logging replace gateway log controls?
No. HAPI FHIR BALP audit logging records who accessed which FHIR resources inside the FHIR server, and it is a separate control from the gateway's access logs. The gateway sees the request before it reaches the server and cannot tell which resources were actually returned, so it cannot produce that record. Treat the two as complementary: APISIX logs network-level and authentication events with masked fields, while the FHIR server's audit trail covers resource-level access. Confirm the BALP configuration, its retention and who can read it, because that trail may itself contain ePHI. The HAPI FHIR security documentation describes these building blocks as parts of a layered design rather than a single security layer.
Who should own the gateway logging design in a healthcare project?
Ownership works best when the privacy or compliance lead signs off on the data elements, and the platform team implements and tests them. The compliance lead decides which fields are permitted in logs, how long they are kept and who may read them. The platform engineers write the log format, plugin configuration and shipping pipeline, then produce the test evidence. The application team confirms which identifiers their clients send and where. A partner can plan, implement and document this design in infrastructure you control, but the decisions about PHI handling remain with your organization and your legal counsel. Agree the responsibility split in the written scope before work starts.
Compliance considerations beyond the gateway
A gateway enforces some HIPAA and GDPR controls, but the business associate terms, the evidence trail and the rule text itself sit outside it. The cards below cover the contract, enforcement, pending rule change and guidance that shape what your APISIX evidence needs to show.
Business associate contract terms
Under 45 CFR 164.314, a contract with a business associate must require compliance with the Security Rule, flow the same terms down to subcontractors that handle ePHI, and require reporting of security incidents, including breaches of unsecured PHI. If a hosting partner or managed service operates the APISIX gateway, those obligations apply to that party too. Check who signs, who holds the logs, and how incident reports reach you.
No HIPAA certification exists
HHS states that no Security Rule standard requires certifying compliance and that HHS does not recognize private certifications, which do not prevent a later violation finding. Be cautious of vendors or partners offering a HIPAA certificate for the gateway. What you can produce is documented risk analysis, configuration records and test results that an assessor or OCR investigator can review.
Enforcement through audits and complaints
The HHS Office for Civil Rights enforces the Security Rule through complaint investigations, compliance reviews and audits. Its 2024 to 2025 audits reviewed 50 covered entities and business associates on provisions most relevant to hacking and ransomware. Keep gateway change records, access reviews and log retention settings in a form you can hand over during an inquiry.
Pending Security Rule revision
HHS proposed a major Security Rule revision on 6 January 2025 (90 FR 898). As of October 2026 no final rule has been published, and the Unified Agenda projects final action for July 2027. Design the gateway controls so that stricter requirements, such as stronger authentication or asset inventories, can be added through configuration rather than a redesign. Confirm the current status before you scope the work.
NIST SP 800-66 Rev. 2 as a guide
NIST SP 800-66 Revision 2, published in February 2024, maps key activities and sample questions to each Security Rule standard. HHS lists it as informational rather than legally binding. Use it to structure your gateway control mapping, such as access control, audit controls and transmission security, and record where each APISIX setting answers a question.
GDPR Articles 32 and 34 in practice
For EU patient data, Article 32 requires security appropriate to the risk and Article 34 covers notifying data subjects of breaches. In September 2026 the French regulator CNIL fined Hopital Prive de la Loire EUR 500,000 after finding that external access to its patient record system lacked VPN and multi-factor authentication. Confirm that remote and partner routes through APISIX enforce strong authentication and that access follows the care team's need to know.
Evidence DeployOpen prepares
DeployOpen prepares systems, controls and evidence for compliance assessments, including configuration baselines, access reviews, log retention settings and test results for the APISIX gateway. DeployOpen does not issue audit reports, attestations or certifications; independent auditors and certification bodies do. Ask any assessor you engage which artifacts they expect before the build starts.
What healthcare teams ask before a gateway project
What drives the cost of an APISIX gateway project for healthcare APIs?
The main drivers are the number of APIs and routes, how many identity integrations are needed, how far PHI logging and audit controls must reach, and the high availability design. Each API needs its own route, authentication and access rules, so a catalog of 10 APIs and a catalog of 80 differ mainly in testing and cutover effort. Identity work grows with each identity provider, client type and flow (for example, authorization code for patient apps and client credentials for backend services). Logging scope matters because every log sink, retention rule and redaction rule must be designed and tested. Ask any partner to price these four items separately in a written quote, and ask which costs are one-time and which recur, such as upgrades, support and testing retainers.
How long does a healthcare APISIX project take?
Duration depends on the same drivers as cost: the number of APIs, the identity integrations, the environments and the change approval steps your organization requires. No duration is set here because the research supplied for this page does not give a project timeline. A useful first step is an inventory that lets a partner estimate effort. Plan extra time for clinical and compliance review of logging and access rules, since those sign-offs often gate production cutover more than the gateway configuration itself. Ask for the timeline as milestones tied to written deliverables, with dependencies on your identity provider and network changes called out.
What must our team provide before a fixed-scope gateway quote?
A fixed-scope quote needs a defined starting point. Provide an API inventory listing each endpoint, its consumers, whether it carries ePHI, and its current gateway or direct exposure. Provide identity provider access or a test tenant, the client types that must sign in, and the claims your applications expect in tokens. Name data flow owners for each clinical or patient-facing API so that logging and access decisions have an accountable person. Also confirm the hosting target (cloud account, data center or restricted network), the TLS certificate process, and your change window rules. Missing items are the most common reason a quote changes after kickoff, so ask the partner to list every assumption in writing.
Can our internal platform team build an APISIX gateway for healthcare without a partner?
Yes, an experienced platform team can build it, provided it has skills in Kubernetes or Linux operations, TLS, OpenID Connect and HIPAA technical safeguards. The gateway itself is open source under the Apache License 2.0, so licensing does not require a purchase. The harder work is usually the healthcare-specific parts: redacting PHI from access and error logs, designing consumer and role models that match care team access, and producing evidence that the controls work. HIPAA has no certification, and the HHS Office for Civil Rights reviews compliance through complaints, compliance reviews and audits, so your own documentation must show how each safeguard is implemented. Weigh your staff's capacity against that workload and against ongoing upgrades.
Does a gateway project make our organization HIPAA compliant?
No. HIPAA has no certification, and HHS states that no Security Rule standard requires an entity to certify compliance. A gateway supports specific technical safeguards in 45 CFR 164.312, such as access control, audit controls and transmission security, but compliance covers the whole organization, including administrative and physical safeguards and business associate contracts under 45 CFR 164.314. DeployOpen prepares systems, controls and evidence for compliance assessments but does not issue audit reports, attestations or certifications. Ask your compliance lead to map each gateway control to the relevant standard and to decide which implementation specifications are required and which are addressable.
Why does a healthcare gateway need high availability, and how does that change the design?
Clinical and patient-facing APIs often sit on the path to care, so an outage can delay work for many users. High availability means running more than one data plane node behind a load balancer, and deciding how configuration is stored. APISIX supports traditional, decoupled and standalone deployment modes, and each has different failure domains. Traditional and decoupled modes depend on an etcd cluster, which needs its own quorum and backup plan. Standalone mode reads a file or API configuration and removes etcd, but then configuration change control moves into your deployment pipeline. Confirm recovery targets with clinical operations before choosing a mode, because those targets set the cost of redundancy.
Which identity integrations matter most for patient apps and clinician access?
Start with the identity provider that already governs staff and patient accounts, then list each client type. The APISIX openid-connect plugin works with providers such as Keycloak, Auth0, Microsoft Entra ID, Google and Okta, and supports authorization code, client credentials, token introspection and PKCE flows. Patient-facing mobile and web apps typically need authorization code with PKCE, while backend services usually need client credentials. Clinician access to FHIR servers needs claims that map to roles or care relationships, which is a design decision your identity team should own. Each provider and flow adds testing effort, so confirm the list before the quote is written.
How do we keep PHI out of gateway logs without losing audit value?
Log the metadata that auditors and incident responders need, such as who called which route, when, from where and with what result, and exclude request and response bodies and sensitive headers. Define a field allow list rather than a block list, then test log output with synthetic PHI before production. Keep logs for a period set by your retention policy and restrict who can read them. Confirm with your privacy office whether identifiers in URLs, such as patient IDs in paths, count as PHI in your logs, since many access logs record full paths. A partner can design and test these rules as part of the scope, but your privacy and security owners must approve the final field list.
How DeployOpen scopes and delivers healthcare gateway work
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, so APISIX in front of clinical APIs runs in your cloud accounts, data centers or restricted networks. Engagements are fixed-scope, with the gateway design, routes, authentication, logging rules and handover agreed in writing before work starts.
How we scope
- Inventory the FHIR servers, clinical and patient-facing APIs and apps that the gateway will front
- Agree the deployment mode, hosting location and which environments carry real patient data
- Write down the authentication flows, PHI log-redaction rules and audit logging expectations in the written scope
How we build
- Configure routes, OpenID Connect for apps and TLS for every hop, using the APISIX openid-connect plugin where it fits
- Test the gateway against your FHIR endpoints and check that tokens, identifiers and request bodies stay out of access logs
- Harden the Admin API, etcd access and certificate handling before any clinical traffic is routed through the gateway
How we hand over
- Deliver configuration as code, runbooks and a record of which controls map to which HIPAA Security Rule standards
- Walk your security and platform teams through verification results, open risks and any addressable specifications you chose to handle differently
- Confirm with your compliance lead and any auditor which evidence they need, since DeployOpen prepares evidence but does not issue attestations
How we support
- Plan upgrades of APISIX and plugins against the project's own release notes and your change process
- Retest routes, authentication and log redaction after each upgrade or significant change
- Offer ongoing support, upgrades and continuous testing as a retainer, priced from the written scope

