Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Engineering
  4. Level Up Your Digital Health Platform with Kong, SMART on FHIR, Okta
Engineering
September 2, 2025
5 min read

Level Up Your Digital Health Platform with Kong, SMART on FHIR, Okta

Biswa Mohanty
Staff Solutions Architect, Kong

The healthcare industry is buzzing about FHIR (Fast Healthcare Interoperability Resources). Pronounced “fire,” this widely adopted data standard has been revolutionizing how healthcare information is exchanged. But building a truly modern, secure, and scalable digital health platform takes more than just a data standard.

Here comes SMART on FHIR, a framework that builds on FHIR to create a universal, secure, and user-friendly way for applications to access electronic health records(EHRs). It adds a critical security layer using open standards like OAuth 2.0 and OpenID Connect (OIDC).

But how do you manage all of this in a real-world environment? That's where an API gateway like Kong Gateway and an identity and access management (IAM) provider like Okta come together to create a powerful, secure, and seamless solution.

By placing Kong in front of your FHIR APIs and using Okta as your authentication authority, you can transform a standard endpoint into a fully managed, secure, and observable service that's ready for the demands of modern digital health.

The golden triangle: Kong, Okta, and FHIR

Together, these three technologies enable healthcare organizations to connect systems with confidence, manage identities responsibly, and share data securely.

  • FHIR Server: Your source of truth. It houses the health data (the patient, observation, and practitioner resources) and exposes it via the FHIR API.
  • Okta: Your identity and access management authority. It handles the complex work of authenticating users (patients, providers, etc.), managing their credentials, and issuing the access tokens that grant specific permissions according to the SMART on FHIR specification.
  • Kong Gateway: Your central control point. It sits in front of your FHIR server and inspects every single request. It intercepts calls, validates the tokens issued by Okta, and enforces security and traffic policies before a request is ever allowed to touch your backend FHIR service.

Centralized security with Kong and Okta

Healthcare data is highly sensitive and strictly governed by regulations like HIPAA. The combination of Kong and Okta provides a robust, centralized security layer for your FHIR services. Here's how it works.

  1. The SMART app launch: A user in a third-party application (like a patient portal or a provider-facing app) clicks a button to access their health data. This kicks off the SMART on FHIR "launch sequence".
  2. Redirect to Okta: The application redirects the user to your Okta-powered login page. With Kong configured, you can seamlessly handle these redirects.
  3. Authentication and consent: The user authenticates with their credentials in Okta. Okta then displays a consent screen, where the user can approve the application's request for specific permissions (or scopes), such as patient/Patient.read or launch/patient.
  4. Token issuance: Once the user consents, Okta generates a secure access token (a JSON Web Token or JWT) that contains the approved scopes and information about the user and patient context. This token is sent back to the application.
  5. API request via Kong: The application now makes a request to the FHIR API, including the access token in the Authorization header. This request goes to Kong, not directly to the FHIR server.
  6. Token validation at the edge: This is where Kong plays a critical role. Using its OpenID Connect (OIDC) plugin, Kong intercepts the request, automatically communicates with Okta to validate the token's signature and claims, and ensures that the token is not expired.
  7. Secure backend access: Only if the token is valid, Kong allows the request to proceed to the backend FHIR server. This means your FHIR server is completely shielded from unauthenticated and unauthorized traffic.

This workflow offloads the entire authentication and authorization process to the specialists—Okta for identity management, and Kong for enforcement. This allows your FHIR service to focus solely on secure data delivery.

Crafting compliant FHIR responses at the edge

A critical part of FHIR compliance is providing meaningful, standardized feedback, especially for errors. When something goes wrong, the FHIR standard specifies that the API should return an OperationOutcome resource. This provides far more detail than a generic 401 Unauthorized or 429 Too Many Requests message.

The problem is that many of these errors can originate from the gateway itself (e.g., rate limit exceeded, invalid API key). This is where Kong's ability to modify responses becomes essential.

You can configure Kong to intercept default gateway responses and transform them into fully compliant FHIR OperationOutcome resources.

  • Using the response-transformer plugin: For common errors, this plugin is perfect. You can configure it to catch specific status codes (like a 401 from the OIDC plugin or a 429 from the rate-limiting plugin) and replace the generic response body with a pre-defined, FHIR-compliant JSON object.
  • Using serverless functions for dynamic responses: For more complex scenarios, you can use Kong's serverless functions capabilities (e.g., the pre-function and post-function plugins). This lets you write custom code (in Lua) that runs directly on the gateway to dynamically construct an OperationOutcome. You could inspect headers, check parts of the request, and build a detailed, context-specific error message on the fly.

Here’s an example of what a gateway-generated OperationOutcome for a failed authentication attempt might look like.

By handling this at the edge, you ensure that every single response from your API endpoint, whether from your backend FHIR server or the gateway itself, is perfectly compliant. This dramatically improves interoperability and the overall developer experience for teams building applications on your platform.

Beyond authentication: The power of Kong plugins

In addition to authentication and response transformation capabilities, Kong provides a rich ecosystem of plugins to further enhance your FHIR services. These plugins help you with the following.

  • Rate limiting: Protect your FHIR server from being overwhelmed by setting limits on how many requests a user or application can make in a given time. This is critical for ensuring fair usage and high availability.
  • Caching: Some FHIR data, like practitioner details or clinic locations, doesn't change very often. Kong can cache these responses to deliver them instantly to users while reducing the load on your backend.
  • Full observability and auditing: When dealing with protected health information (PHI) and/or personally identifiable information (PII), a detailed audit trail is legally mandatory. Kong can log every single API request and response to give you complete visibility into who accessed which data and when. You can feed this data into monitoring tools like Prometheus and Grafana for real-time insights into the health and usage of your FHIR APIs.

By combining the SMART on FHIR standard with the identity management power of Okta and the robust security and management capabilities of Kong Gateway, healthcare organizations can build a truly secure, scalable, and resilient platform for the future of interoperable health data.

Conclusion

Bringing together SMART on FHIR, Kong Gateway, and Okta isn’t just another tech stack — it’s the backbone of the next wave of healthcare innovation. As providers rush to improve healthcare outcomes while keeping patient data under lock and key, this trio of technologies gives them a clear path forward.

Kong Gateway — trusted by enterprises worldwide and built to handle billions of API calls — offers scalability, security, and flexibility. Whether you’re running on-prem, in the cloud, or somewhere in between, Kong fits right in and grows as you scale. And with an extensive plugin ecosystem, you won’t have to rip and replace when standards or regulations shift — you can keep pace without missing a beat.

Ready to put it to work? Sign up for Kong Konnect for free, or book a personalized demo to see how this architecture can take your platform to the next level.

Unleash the power of APIs with Kong Konnect

Learn MoreGet a Demo
API GatewayOAuth

More on this topic

Videos

How to Use Kong Gateway OAuth2 Plugin

Videos

MCP vs OpenAPI vs A2A vs ?: Preparing for the Agentic World

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo
Topics
API GatewayOAuth
Share on Social
Biswa Mohanty
Staff Solutions Architect, Kong

Recommended posts

How OAuth2 Authorization Works: Kong API Gateway 4 Step Tutorial

Kong Logo
EngineeringMarch 8, 2021

In this tutorial, I'm going to walk through adding OAuth2 authorization and authentication to your service with the Kong API Gateway OAuth2 plugin . First, I'll cover the fundamentals. If you're already familiar with how Kong Gateway and OAuth2 wor

Aapo Talvensaari

Kong AI/MCP Gateway and Kong MCP Server Technical Breakdown

Kong Logo
EngineeringDecember 11, 2025

In the latest Kong Gateway 3.12 release , announced October 2025, specific MCP capabilities have been released: AI MCP Proxy plugin: it works as a protocol bridge, translating between MCP and HTTP so that MCP-compatible clients can either call exi

Jason Matis

Stay Vendor Agnostic: Using an Abstraction Layer to Navigate Acquisitions

Kong Logo
EnterpriseDecember 12, 2025

The challenges of an acquisition frequently appear in a number of critical areas, especially when dealing with a platform as important as Kafka: API Instability and Change : Merged entities frequently rationalize or re-architect their services, whic

Hugo Guerrero

What is Apache Kafka? Guide for Beginners

Kong Logo
Learning CenterDecember 8, 2025

Apache Kafka is a distributed, fault-tolerant, high-throughput event-streaming platform. LinkedIn originally developed it to handle massive data pipelines. The Apache Software Foundation now maintains this open-source project. The Commit Log Mental

Kong

Federated Connectivity: Unlocking Data Silos with API Gateways

Kong Logo
EngineeringMay 6, 2024

"The whole is more than the sum of its parts." Aristotle is credited with this quote, and it's true in the world of data. Legacy systems typically approached their role in a limited manner.  Each system was intended to be used by a certain user set

Ahmed Koshok

How to Manage Your Kubernetes Services with an API Gateway

Kong Logo
EngineeringApril 9, 2024

Kubernetes is an open-source container orchestration system for automating deployment, scaling, and management of containerized applications. It groups containers into logical units for easy management and discovery.  API gateways sit between client

Peter Barnard

Enabling Secure Data Exchange with Decentralized APIs

Kong Logo
EngineeringMarch 26, 2024

Stop me if you’ve heard this one before, but there’s a lot of data out there — and the amount is only growing. Estimates typically show persistent data growth roughly at a 20% annual compounded rate. Capturing, storing, analyzing, and actioning data

Ahmed Koshok

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2026