Why HAPI FHIR authentication and authorization is harder than it looks
A HAPI FHIR server holding health data has no login of its own, so identity work is required before any app, clinician or partner touches it. You need to decide how callers prove who they are, how the server maps that identity to permitted actions on specific resources, and how each request is logged. HAPI FHIR provides the building blocks for this: authentication interceptors, the AuthorizationInterceptor, consent and search narrowing interceptors, CORS support and BALP audit logging. The project states that it does not provide a single one-size-fits-all security layer, so assembling these pieces into a coherent design is your responsibility. The HAPI FHIR security introduction is the right starting point for confirming which interceptors fit your version and deployment.
Teams usually need this work as soon as the server leaves a developer laptop: when a mobile app, a clinical application or a partner system reads or writes patient data, or when a regulator or internal security team asks who accessed what. The JPA server adds complexity because it supports several FHIR versions, from DSTU2 through R5, and each version has its own resource shapes and search parameters that rules must cover. Partitioning compounds this, since resources placed in different partitions for tenancy, data source separation or regional grouping may need different access rules. A rule written against one partition or version can silently allow access in another, so the rule set needs testing against every version and partition you run.
Authentication is the easier half, because you can usually delegate it to an existing identity provider. Authorization is harder. You must decide who may read which resource types, which compartments or patients a user is linked to, how search results are narrowed so that a broad query does not leak records, and what a partner application may do after consent. Each of these decisions should be written down with the clinical and compliance owners before configuration starts, and the resulting rules must be tested with negative cases, such as a user searching across patients they should not see. Confirm with your own team which of these rules your use case requires, because the answers determine most of the effort.
Which HAPI FHIR building blocks handle identity
HAPI FHIR does not ship a single security layer, so identity is assembled from several interceptors and configuration points that run inside the JPA server starter. Each piece below answers a different question: who is calling, what they may touch, which records they may see, and which browsers may reach the server.
JPA server starter as the host
The JPA server starter is the application that carries every security component, whether you deploy it as the hapiproject/hapi Docker image, as a Spring Boot application, or as a WAR on Tomcat, Jetty or Wildfly. Interceptors are registered against this host, so the deployment choice decides how you add them and how you test them. Confirm how your chosen packaging wires custom interceptors and which Java version your release requires.
Starter repositoryAuthentication interceptor for tokens
The authentication interceptor is the hook that inspects each incoming request, validates the bearer token against your identity provider, and rejects requests that fail. Your team owns the validation logic, including issuer, audience, signature and expiry checks, so it must match how your identity provider signs tokens. Confirm the exact interceptor base class and hook names against the version you run.
Security introductionAuthorizationInterceptor rules
The AuthorizationInterceptor turns an authenticated identity into allow or deny decisions by resource type, operation and compartment, such as limiting a patient-facing client to resources in one patient's compartment. Rules are evaluated per request, so mistakes here expose data even when authentication works. Test each role against read, search, create and transaction bundles, because bundles can bypass rules written only for single-resource calls.
Consent interceptor
The consent interceptor applies patient or organizational consent decisions on top of the authorization rules, so a permitted client still cannot see records a patient has restricted. Consent data must come from a source you govern, and the rules for how consent is recorded, revoked and evaluated belong to your privacy office. Confirm how the interceptor reads consent resources and what happens when consent data is missing.
Search narrowing interceptor
The search narrowing interceptor adds filters to search queries so a caller only receives matching results, for example limiting a search for Observation to patients the caller is linked to. It protects against broad searches that the authorization rules alone would not catch, because a permitted search can still return too much. Verify narrowing with paged results, _include and chained searches, which can reach resources outside the intended filter.
CORS configuration
CORS settings control which browser origins can call the server, which matters when a single-page app or patient portal sends FHIR requests from a browser. Permissive origins let any website make authenticated calls on behalf of a logged-in user, so origins should be listed explicitly for each environment. Confirm the configuration keys for your version and test preflight requests against your real front-end domains.
Which identity pattern fits your FHIR server
This table compares the main ways to put identity in front of a HAPI FHIR server, from validating bearer tokens inside the server to placing a gateway in front of it. Read each row for when the option fits and what it asks your team to run and maintain afterward.
| Pattern | When it fits | Operational cost | Main risk |
|---|---|---|---|
| OAuth2 bearer token validation in the server | One identity provider issues tokens and your team owns the FHIR server code path | Token validation keys or JWKS endpoint to configure, rotate and monitor; interceptor code to maintain | Misconfigured audience or issuer checks accept tokens meant for other systems |
| Gateway or proxy in front of the server | Several services share one identity model, or security teams want enforcement outside application code | Gateway ownership, its own upgrades, certificate handling and a second place to change access rules | Requests that reach the server directly bypass the gateway if network paths are not closed |
| SMART on FHIR style scopes | Apps need clinician or patient-scoped access to resources and must be launched from an EHR or portal | Scope definitions, launch context handling and app registration to maintain as apps change | Broad scopes granted for convenience, so apps read more data than their purpose requires |
| Custom AuthorizationInterceptor rules | Access depends on local business rules such as organization, region, or care relationship | Rule code tied to resource types and operations, regression tests for each rule, and rework after FHIR version or server upgrades | Gaps in rule coverage for operations, search parameters or included resources that were not tested |
Build sequence for authentication and authorization
This sequence turns an open HAPI FHIR server from an unprotected API into one where every request is tied to a verified identity, limited to the resources that identity may use, and recorded in an audit trail. Each step closes with a check you can run before moving on.
Inventory clients and user roles
List every system and person that will call the FHIR server, including EHR integrations, portals, analytics jobs and clinician users. For each, record the resource types and operations it needs, such as read-only access to Patient and Observation, or write access to a single system's Bundle submissions. Owners are your clinical informatics lead and integration team, with security reviewing the list. The step is done when every client has a named owner and a written list of permitted resource types and operations, and any client without a clear need is flagged for removal.
Decide the trust boundary
Document where identity is verified and where authorization decisions are enforced. Typically this means the identity provider issues tokens, the HAPI FHIR server validates them, and the server's AuthorizationInterceptor makes the access decision. Also decide whether any traffic passes through an API gateway, and whether the database and admin endpoints sit outside the trust boundary. The output is a short architecture diagram signed off by security. Confirm with your identity provider's team which token formats and claims they can issue, since this shapes every later step.
Register the server with the identity provider
Create the client registrations and API scopes in your identity provider for the FHIR server and for each calling client. Define scopes that map to the roles from step one, and confirm the token lifetime, signing algorithm and the claims that will carry role or patient context. The identity provider team performs this in their admin console with your input. Check that a test token issued for a registered client contains the expected scopes and claims when decoded, and that a client without the right registration cannot obtain one.
Add the authentication interceptor and validate tokens
Install the authentication interceptor in the HAPI FHIR server so that each request must carry a bearer token. Configure it to validate the token signature, issuer, audience and expiry against your identity provider's keys, using the configuration keys documented for your chosen HAPI FHIR version. Confirm the metadata and public capability endpoints behave as you intend. The check: a request with no token is rejected, a request with an expired or wrongly signed token is rejected, and a valid token returns a resource.
Define AuthorizationInterceptor rules per role and resource
Write AuthorizationInterceptor rules that allow each role only the operations and compartments defined in step one, and deny everything else by default. Start with the narrowest rule set and widen only when a documented need appears. Engineers write the rules in Java as part of the custom server build or starter overlay, and integration testers review them against the inventory. The check: a token scoped to read Observation can read Observation but receives a denial for Patient writes, and a token with no matching rule receives no data.
Add consent and search narrowing where data must be filtered
Where a user or client may see only part of a resource set, such as records for patients in their care team or a region, add the consent interceptor or search narrowing interceptor. Decide the filter logic with your privacy and clinical governance owners before coding it, because it defines who can see what. Test the filter on search results and on direct reads by identifier, since filtering only one path leaves a gap. The check: a scoped user's searches return only permitted patients, and a direct read of a non-permitted patient ID is refused.
Configure CORS for browser clients
If browser applications call the server, configure CORS so that only the approved origins, methods and headers are allowed. Avoid wildcard origins on a server that carries patient data. Confirm the exact settings with your web team, since they depend on the front-end hosting. The check: a request from an approved origin receives the expected headers, and a request from an unlisted origin is refused by the browser or the server, with no sensitive response leaked.
Enable audit logging and test the full path
Turn on audit logging so that access decisions and data reads are recorded with the caller identity, as described in HAPI FHIR's security documentation (including BALP, the Basic Audit Log Pattern). Then run an end-to-end test that covers missing tokens, expired tokens, each role's allowed and denied operations, consent filtering and CORS. Keep the test results and the log samples as evidence for your security review. The step is complete when every test case passes, each denied request appears in the audit log with the caller identity, and a retest is scheduled after any rule change.
How a request moves through identity checks
The diagram starts with a client that obtains a token from the identity provider, then sends a FHIR request across the trust boundary into the HAPI FHIR server. The authentication interceptor validates the token before the AuthorizationInterceptor decides whether the request is allowed. Search narrowing then filters what the caller may see, and the BALP audit event is recorded before the response returns. Check that the token validation and the authorization rules run before any database query.
Client requests traverse identity checks inside the FHIR server before data is returned.
Where consent and search narrowing change the design
The key design decision is whether a rule blocks a whole resource type or filters results inside a search. A type-level rule (for example, denying all access to Observation for a given client) is simple to express in the AuthorizationInterceptor and simple to test. Search narrowing is different: the same client may see some Observation resources but not others, so the restriction must be applied to the query itself, using compartment or search parameter constraints, rather than checked after the fact. Narrowing that is applied only to the first page of results, or only to the primary resource, is a common source of leaks. Confirm early which of your access rules are type-level and which need row-level narrowing, because the second kind adds effort in both build and test.
Consent records need a home that the authorization logic can query on every request. Model them as FHIR resources, typically Consent, stored on the same server so they can be read, versioned and audited like other data, or delegate the decision to an external policy or consent service that returns allow or deny for a given patient, purpose and requester. Either way, decide who owns the consent data, how revocation takes effect (immediately or at token expiry), and what happens when the decision service is unavailable. A decision service adds a network dependency to every read, so measure its latency against your query volume before committing to it.
Narrowing interacts with paging, _include, _revinclude and references in ways that can expose restricted resources. A search may return a permitted DiagnosticReport whose included Observation or Patient is not permitted to the caller. Paging links can carry a search that was narrowed for a different user, and references to restricted resources may still reveal that a record exists. Build a test suite that uses the real query patterns your clients send, including paged searches, chained parameters, reverse includes and direct reads by ID, and run it against each consent scenario. Confirm the exact behavior of your HAPI FHIR version with its interceptors before relying on it, because these rules are easy to get subtly wrong.
What drives authentication and authorization effort
This table lists the factors that change how much work it takes to add identity, authorization and consent to a HAPI FHIR server, with the effect of each and how to keep it down. Read each row as a lever: the more of these your organization has, the more rules, testing and identity configuration you will need to write and verify.
| Driver | Why it raises effort | How to keep it down |
|---|---|---|
| Client types and roles | Each client type (EHR, patient app, bulk export job, analytics) needs its own SMART-style scopes or rules, and every role adds rule combinations to test. | Start with a short role list mapped to clinical or operational duties, and add a client type only when it needs different access. |
| Resource types and compartments in scope | Every resource type and compartment the AuthorizationInterceptor covers needs an explicit allow or deny rule, and missed types are a common source of data exposure. | Phase the scope: secure the resource types in the first release and document the rest as out of scope until they are reviewed. |
| Consent complexity | Consent-based access needs consent resources, a consent interceptor configuration and tests for patient-level exceptions, revocations and conflicting directives. | Limit consent to the categories your policy requires and confirm with privacy and legal staff which rules the system must enforce. |
| Search narrowing rules | Search parameters that return data across patients or compartments need narrowing so users see only the records their rules allow, and each parameter adds test cases. | List the search parameters clients actually use and narrow those first, instead of narrowing every parameter in advance. |
| Partitions for tenant or region separation | Partitioning can map tenants, regions or data sources to separate partitions, so each partition needs its own access mapping and cross-partition tests. | Use the fewest partitions that meet your separation requirement, and confirm how partition and authorization rules interact in your chosen version. |
| FHIR versions served | Each FHIR version (for example DSTU2, DSTU3, R4, R4B or R5) can expose different resource definitions and search behavior, so rules must be checked per version. | Serve only the versions your clients require and retire unused endpoints from the rule set. |
| Existing identity provider integrations | Connecting to an OpenID Connect or other identity provider requires token validation, claim mapping and group or role translation, and each additional provider repeats this work. | Reuse one identity provider for all clients where possible and map its claims to a single documented role model. |
| Environment count | Development, test, staging and production each need their own identity registrations, redirect settings, rule configuration and test data, and drift between them causes failures. | Keep rules in version-controlled configuration and promote the same build through each environment with only identity settings changed. |
How the setup differs by deployment model
A single HAPI FHIR instance, usually the JPA server starter running as a container, a WAR or a Spring Boot application, is the simplest case. Token validation happens in one process, so key material, JWKS retrieval and clock settings all live in one place. Rules are packaged with the server, and a change to an AuthorizationInterceptor rule means a rebuild and restart. Caching is local to the process, which makes stale keys and expired cached decisions easier to trace.
- Key retrieval: the server fetches signing keys from the identity provider's JWKS endpoint, so confirm outbound access from the server to that endpoint.
- Clock skew: token expiry checks depend on the host clock, so confirm time synchronization on the host.
- Certificate trust: if the identity provider uses an internal certificate authority, confirm the Java truststore contains it.
- Rule deployment: rules ship in the application build, so plan a restart window for every change.
- Caching: confirm how long validated tokens and keys are cached and what happens when the identity provider rotates keys.
Confirm each of these against your environment, including the identity provider's documented key rotation behavior and the exact JWKS URL.
When several HAPI FHIR nodes sit behind a load balancer, every node must validate tokens the same way. Each node independently fetches keys and checks expiry, so a key rotation or a clock difference on one node can cause intermittent 401 responses that are hard to reproduce. Rule definitions must be identical across nodes, and a rolling deployment means old and new rules can serve traffic at the same time.
- Key distribution: each node needs its own reachability to the identity provider, and a failed fetch on one node should not block validation on others.
- Consistent rules: deploy the same build to every node, and verify the version on each one before routing traffic.
- Clock alignment: confirm that every node is synchronized to the same time source.
- Load balancer behavior: confirm that the load balancer does not strip or alter the
Authorizationheader and that TLS termination is configured as intended. - Session state: confirm whether any session or cached decision is stored per node, since a user may land on a different node on the next request.
Confirm the load balancer, identity provider and key rotation behavior with your platform team before a rolling deployment.
On Kubernetes, the HAPI FHIR JPA server starter can be installed with a Helm chart, and the chart's values file becomes the main place where identity settings are configured. Secrets such as client secrets or truststore passwords should come from Kubernetes Secrets or an external secret manager rather than plain values. Pods are replaced often, so any caching that lives in the pod is lost on restart, and autoscaling adds nodes that must validate tokens immediately.
- Identity settings: confirm how the chart passes issuer URL, audience and JWKS settings into the container, and whether these are set through values or environment variables.
- Network policy: confirm that egress rules allow the pod to reach the identity provider and any key endpoint.
- Trust material: mount internal CA certificates or truststores as volumes or through an image build, and confirm the Java process reads them.
- Rule updates: treat rule changes as a new image or chart release, and confirm the rollout strategy before enabling it.
- Autoscaling: confirm that new pods can fetch keys at startup and that readiness checks wait for that to succeed.
Check the chart version and its values against the release you have tested, since chart keys change between releases.
In an air-gapped network, the identity provider may be inside the enclave, or tokens may be issued by a provider on a different network that the server cannot reach directly. Key retrieval from a public URL is often impossible, so keys must be provisioned through an approved internal process and refreshed on a schedule the security team controls. Rules and dependencies must also be transferred in, which makes every update a controlled change.
- Key provisioning: decide whether keys are pulled from an internal JWKS endpoint or loaded from a file, and document the refresh procedure.
- Time sources: confirm an internal time source, because validation of expiry and not-before claims depends on it.
- Certificates: confirm how internal CA certificates reach the Java truststore and how their renewal is tracked.
- Artifact transfer: confirm how HAPI FHIR builds, starter images and rule files are moved across the boundary.
- Cached trust: confirm how long cached keys remain valid if the refresh process stalls.
Confirm the key distribution path and the refresh owner with your security team before any test deployment, because these decisions determine whether validation keeps working during an outage.
Secrets, keys and access controls to lock down
Adding identity to HAPI FHIR means the server trusts whatever your identity provider and rule configuration tell it. The cards below cover the credentials, configuration and endpoints that decide whether that trust holds, and the settings that must be closed before any environment holds real patient data.
Identity provider client secrets and signing keys
The server needs client secrets or the public keys used to verify token signatures from your identity provider. Store secrets in a secrets manager or the platform's secret store, never in the repository or a container image. Confirm which token signing algorithms and key rotation schedule your provider uses, and that the server validates the issuer and audience on every token. A leaked client secret lets an attacker act as a trusted application.
Rule definitions as reviewed configuration
AuthorizationInterceptor rules decide which compartments, resource types and operations each role can reach, so they are security controls, not application settings. Keep rule code in version control, require review for every change, and test each rule with both allowed and denied requests. An empty rule set or a catch-all allow rule can expose the full dataset without any error in the logs.
Administrative and operations endpoints
Administrative paths, metadata operations, and any endpoints that reveal server state or allow bulk export should sit behind the same authorization rules as clinical data, or be blocked at the network edge. Inventory every path the deployed server exposes, including those added by the starter, and confirm each one is either denied or restricted to an operations role. Check this on the deployed instance, not only in the configuration files.
Default-open access during testing
Test setups often run with authorization disabled so that integration work can proceed quickly. That state can survive into a shared or pilot environment without anyone deciding it should. Make the open setting an explicit, named configuration that the deployment pipeline refuses to promote, and run a denied-request test against every non-production environment that holds data resembling real records.
TLS between components
Tokens, patient identifiers and clinical payloads cross several hops: client to load balancer, load balancer to the server, server to the database and server to the identity provider. Encrypt each hop, not only the public edge, and verify certificates on outbound calls to the identity provider so that token validation cannot be redirected. Confirm the certificate chain and trust store used by the Java runtime, since a failed check there is easy to disable by mistake.
The testing UI
The starter's web testing interface lets anyone with network access send requests to the server with whatever credentials they enter. Disable it or restrict it to internal networks in every environment that holds real data, and confirm that the setting is applied in the deployed image. Treat its presence in a production build as a finding in your security review.
HAPI FHIR security docsHow to test that identity controls work and fail safely
Identity controls on a HAPI FHIR server are only as good as the tests that prove them. Build a test matrix before the first production release and keep it as a versioned artifact owned by the platform team. On the token side, cover at least four cases: no token, an expired token, a token issued for a different audience, and a valid token whose scopes do not include the operation being attempted. Each case should be sent against the server's authentication interceptor and the AuthorizationInterceptor rules, and the expected result should be written down in advance as a specific HTTP status and an empty or absent resource body. On the role side, build a grid with every role your identity provider issues on one axis and every resource type your rules cover on the other, including create, read, update, delete and search for each. Confirm that the grid matches your access policy, not the behavior you happen to observe.
Search is where authorization most often leaks. A user may be denied direct reads of a restricted Patient but still receive that patient's data through _include or _revinclude parameters, through references in a permitted Observation or Encounter, or by paging through a result set whose later pages were never filtered. Write tests that request restricted resources through each of these paths and through _count and page links, and confirm that consent and search narrowing interceptors remove the restricted data from every bundle, including the Bundle.link entries. Also test what happens when a token expires between the first page and the next, because the server should reject the continuation rather than serve cached results. Failure modes need their own tests. Simulate an identity provider outage, a JWKS endpoint that returns stale keys, and a misconfigured audience, and confirm the server fails closed with a clear error and no anonymous fallback. Confirm the exact behavior with your identity provider and the HAPI FHIR version you deploy, since interceptor behavior can differ across releases. Run this suite on every HAPI FHIR upgrade, every change to an interceptor or rule file, and every change to the identity provider configuration, so that a regression appears in a pipeline rather than in a clinical user's query.
What to monitor, audit and document after go-live
How do I monitor authorization denials and token failures on a HAPI FHIR server?
Start by logging every denied request and every rejected token, with the caller, the resource type, the operation and the reason, then alert on sudden changes rather than on single events. Denials usually spike after a role change, a client secret expiry or an identity provider outage, so compare counts against a baseline from a normal week. Check that your authentication interceptor logs the token issuer and audience on failure, because those fields are the fastest way to separate a misconfigured client from an attack. Confirm with your own engineers exactly which log lines the interceptors and your container platform emit, since the logging setup depends on your deployment and is not something to assume from defaults.
What should BALP audit logs capture, and how long should we keep them?
BALP (the Basic Audit Log Patterns defined for FHIR) gives you a consistent record of who accessed which health data and when, and HAPI FHIR provides it as one of its building blocks. Review it for access by users outside their normal care relationships, bulk reads, and repeated failed attempts. Retention is set by your own policy and by the regulations that apply to your organization, so ask your privacy and legal teams for the period rather than copying a figure from a vendor. Store audit records separately from the application database, restrict who can alter them, and test that you can retrieve a single patient's access history within a reasonable time during an investigation.
When roles change, how do we review AuthorizationInterceptor rules?
Treat every role change in the identity provider as a trigger for a rule review, because HAPI FHIR authorization rules are only as current as the role claims they match. Build a short checklist: which rules reference the changed role, which compartments or patient scopes it reaches, and whether search narrowing still limits results as intended. Run a fixed set of test requests for each role after the change and keep the expected results in version control. Ask your team to name an owner for the rule set, and make sure removed staff lose access in the identity provider without waiting for a server change.
How should we rotate keys and client secrets used by the FHIR server?
Rotate signing keys, client secrets and any database or service credentials on a documented schedule and also after any suspected exposure. For token validation, the server should fetch signing keys from the identity provider's published key set so that a rotated key is picked up without editing the server configuration, and you should test that behavior in staging. Keep secrets in your secrets manager, not in the server image or in the configuration files of the starter, and confirm that old secrets are revoked, not just unused. Record each rotation with the date, the owner and the systems touched so the change can be shown to an assessor.
How do we run regression tests after a HAPI FHIR upgrade?
Upgrade in a staging environment with a copy of your authorization test suite, and treat any custom interceptor as code that must be retested on every release. HAPI FHIR v8.8.2 was released on 25 September 2026 according to the project's GitHub releases, so check the release notes for changes to interceptor APIs that your rules depend on. Note that HAPI FHIR 8.2.0 requires JDK 17, so confirm your Java runtime before any move across that boundary. The suite should cover each role against read, search, create, update and delete, plus token expiry, missing tokens and wrong audiences, and the results should be compared against the approved baseline before production.
What documentation will an assessor ask for about our FHIR authorization setup?
Assessors usually want evidence that access is designed, approved, tested and monitored, so prepare an architecture diagram, a description of each authentication and authorization interceptor, and the rule set exported with its owner and change history. Add the role-to-access matrix, the results of the most recent authorization test run, the BALP log review records, the key rotation log and your upgrade regression reports. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications; independent auditors and certification bodies do that work. Ask your assessor early which framework applies, since the expected evidence differs by standard and by organization.
Who should own authorization operations after go-live, and what does it cost to keep it running?
Ongoing work falls into three groups: your team reviews logs, roles and rotations; your platform or Java engineers maintain the server and upgrades; and your security team runs periodic testing. Costs recur through staff time, infrastructure, and any support or retainer you buy, while the initial build is one-time. Commercial support is offered by Smile CDR, which the HAPI FHIR README points to, and the open-source project itself is licensed under Apache 2.0, so licensing does not add a per-seat fee. Ask any partner for a written split of operational responsibilities and the frequency of rule and secret reviews before you sign.
How DeployOpen scopes, builds and hands over this work
This sequence turns an authentication and authorization requirement into a written scope, a configured HAPI FHIR server in your own infrastructure, tested access rules, and handover documents your team can operate. Each step ends with a check you can verify.
Confirm scope and access model in writing
DeployOpen reviews your HAPI FHIR deployment, identity provider, client applications and the data each role should reach, then agrees a fixed scope and deliverables in writing before any build work starts. The access model covers who authenticates, which SMART or OAuth 2.0 flows your apps use, which resource types and compartments each role may read or write, and where consent applies. Done when your security and clinical stakeholders have signed off the access matrix and the scope document.
Confirm the FHIR version and server build
Before wiring security, the team confirms the HAPI FHIR version, the JDK requirement for that release (HAPI FHIR 8.2.0 requires JDK 17), and whether you run the JPA server starter or a custom build. Authentication interceptors and AuthorizationInterceptor rules are tied to the server build, so this decision comes first. Done when the version, Java runtime and deployment method are recorded in the design document and match your change-control process.
Set up the identity provider integration
DeployOpen connects the HAPI FHIR server to your identity provider inside your environment, typically by validating bearer tokens on each request through an authentication interceptor. The work includes token issuer and audience checks, signing key handling, and mapping identity claims to the roles used by authorization rules. Done when test tokens for each role are accepted or rejected as the access matrix specifies, and invalid or expired tokens return an unauthenticated response.
Write and apply AuthorizationInterceptor rules
The team translates the access matrix into AuthorizationInterceptor rules that allow or deny operations by role, resource type and, where needed, patient compartment. Rules are kept in version control and reviewed like code, because a single broad allow rule can expose data across patients. Done when every rule maps to a line in the access matrix and a rule review has confirmed there is no default allow path for unlisted operations.
Add consent and search narrowing
Where patients or organizations limit sharing, DeployOpen configures consent handling and search narrowing so that a caller only receives resources they are permitted to see, including for search results and included references. The team tests this with patients that have partial consent and with queries that try to bypass narrowing through includes, chained searches or direct reads. Done when the test cases show that restricted resources are excluded from every search path the server exposes.
Test the authorization setup as an attacker would
DeployOpen's security testing team exercises the API with valid tokens for each role, missing or tampered tokens, cross-patient reads, unsupported operations and the server's own discovery and operation endpoints. Findings are logged with severity, reproduction steps and the fix proposed. Done when the findings report is delivered and every high-impact finding has a fix that is retested and recorded as closed.
Hand over configuration, tests and runbooks
DeployOpen delivers the configuration, interceptor code, automated authorization tests, access matrix, and runbooks for token rotation, adding a role, investigating a denied request and rolling back a rule change. Your engineers run the test suite and a supervised change so the handover is proven rather than assumed. Done when your team has executed the runbooks on its own and the artifacts are stored in your repository and document system.
Prepare evidence and agree ongoing support
DeployOpen packages evidence your compliance team can give an independent auditor, such as configuration records, test results, change history and the access matrix. DeployOpen does not issue audit reports or certifications; independent auditors and certification bodies do that. Optional retainers can cover upgrades, regression testing of custom interceptors when HAPI FHIR releases change, and periodic retesting. DeployOpen is not an official HAPI FHIR or Smile CDR partner. Done when the evidence index is delivered and any retainer scope is agreed in writing.

