Authentication overview

Orion Health provides a suite of healthcare solutions, including integration engines, virtual care platforms, and patient engagement tools, all designed to facilitate secure and compliant health data exchange. Authentication mechanisms for Orion Health's APIs and platforms are engineered to meet stringent healthcare regulatory requirements, such as HIPAA in the United States and GDPR in Europe, ensuring the confidentiality, integrity, and availability of protected health information (PHI). The approach to authentication focuses on balancing secure access with the need for interoperability, particularly through adherence to standards like FHIR (Fast Healthcare Interoperability Resources) and HL7.

Developers integrating with Orion Health's ecosystem typically interact with APIs that require clear identification and authorization before sensitive health data can be accessed or modified. This involves establishing trust between the calling application or service and the Orion Health platform. The specific authentication flow can vary depending on the product being integrated and the nature of the integration (e.g., user-facing application versus backend system integration). Orion Health's developer documentation emphasizes the correct implementation of these protocols to maintain data security and compliance across all integrations.

Supported authentication methods

Orion Health primarily supports industry-standard authentication methods to ensure secure and interoperable connections. The choice of method often depends on the type of application, the user interaction required, and the specific Orion Health product or API endpoint being accessed.

OAuth 2.0

OAuth 2.0 is the recommended framework for applications that require delegated authorization, allowing users to grant third-party applications limited access to their resources without sharing their credentials. Orion Health leverages OAuth 2.0 for scenarios such as patient portals, clinician-facing applications, and other services where an end-user's identity needs to be authenticated and their consent for data access obtained. This protocol provides a secure method for issuing access tokens and refresh tokens, which are then used to authorize API requests. Implementations typically follow standard OAuth 2.0 flows, such as the authorization code grant flow, which includes:

  • Authorization Request: The client application directs the user to an Orion Health authorization server.
  • User Consent: The user authenticates with Orion Health and grants permission for the client application to access specified data.
  • Authorization Code: The authorization server redirects the user back to the client application with an authorization code.
  • Token Exchange: The client application exchanges the authorization code for an access token and optionally a refresh token by making a server-to-server request to the authorization server.
  • API Access: The client application uses the access token to make authenticated requests to Orion Health APIs.

For more detailed information on OAuth 2.0 specifications, developers can refer to the official OAuth 2.0 website.

API Keys

For server-to-server integrations or applications where direct user interaction is not required, Orion Health supports authentication via API keys. API keys are unique identifiers used to authenticate an application or project without a specific end-user context. They are typically generated and managed within the Orion Health developer portal or through direct consultation with Orion Health's integration specialists. API keys are suitable for:

  • Backend services making requests to Orion Health APIs.
  • System-level integrations that operate without direct user intervention.
  • Monitoring tools or data synchronization services.

When using API keys, developers are responsible for their secure storage and transmission, avoiding hardcoding them directly into client-side code or public repositories. API keys are often passed in request headers (e.g., X-API-Key) or as query parameters, depending on the specific API endpoint's requirements.

Table of Authentication Methods

Method When to Use Security Level
OAuth 2.0 User-facing applications, delegated access, patient portals, clinician apps High (token-based, consent-driven, refreshable)
API Keys Server-to-server integrations, backend services, system-level automation Medium-High (requires secure storage and transmission)

Getting your credentials

Obtaining authentication credentials for Orion Health platforms and APIs is typically a structured process involving direct engagement with Orion Health. Given the enterprise nature of their solutions and the sensitive health data involved, self-service portals for credential generation might be limited, particularly for production environments.

The general process involves:

  1. Initial Consultation: Contacting Orion Health's sales or integration team to discuss your specific integration requirements and gain access to relevant documentation and resources. This often begins through their contact page.
  2. Developer Account Setup: Once an agreement is in place, Orion Health will guide you through setting up a developer account or providing access to their developer portal. This portal serves as the central hub for managing applications, viewing API documentation, and potentially generating credentials.
  3. Application Registration (for OAuth 2.0): For integrations requiring OAuth 2.0, you will need to register your application within the developer portal. This registration typically involves providing details such as your application's name, redirect URIs, and a brief description. Upon successful registration, you will receive a Client ID and Client Secret, which are crucial for initiating OAuth flows.
  4. API Key Generation (for API Keys): For API key-based authentication, the developer portal usually provides an interface to generate and manage API keys associated with your project or application. You may be able to create multiple keys for different environments (e.g., development, staging, production) and manage their lifecycles.
  5. Environment Access: Orion Health typically provides access to various environments (development, testing, production) each with its own set of API endpoints and potentially distinct credentials. Ensure you are using the correct credentials for the intended environment.

For precise steps and access to the necessary tools, refer to the official Orion Health documentation or consult directly with their technical support and integration specialists.

Authenticated request example

The exact structure of an authenticated request will depend on whether you are using OAuth 2.0 or an API key, and the specific Orion Health API endpoint you are calling. Below are conceptual examples for both methods.

OAuth 2.0 example (after token acquisition)

Once you have successfully completed the OAuth 2.0 authorization code flow and obtained an access_token, you will typically include it in the Authorization header of your API requests. This example demonstrates a GET request to a hypothetical patient data endpoint.

GET /api/v1/patients/12345 HTTP/1.1
Host: api.orionhealth.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

In this example:

  • YOUR_ACCESS_TOKEN should be replaced with the actual access token obtained from the OAuth 2.0 flow.
  • The Bearer scheme indicates that the token is a bearer token, meaning the holder of the token is granted access.

API Key example

When using an API key, it is commonly passed in a custom HTTP header, though some APIs might accept it as a query parameter. This example assumes an API key is passed via an X-API-Key header.

POST /api/v1/data-ingestion HTTP/1.1
Host: api.orionhealth.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json

{
  "dataType": "observation",
  "data": { /* ... health data payload ... */ }
}

In this example:

  • YOUR_API_KEY should be replaced with your actual API key generated in the developer portal.
  • The X-API-Key header is a common convention for transmitting API keys.

Always consult the specific API documentation provided by Orion Health for the exact header names, parameter requirements, and endpoint URLs relevant to your integration.

Security best practices

Adhering to security best practices is critical when integrating with Orion Health platforms due to the sensitive nature of health data. These practices help protect against unauthorized access, data breaches, and ensure compliance with healthcare regulations.

  1. Secure Credential Storage:
    • Avoid Hardcoding: Never hardcode API keys, client secrets, or other credentials directly into your application's source code, especially for publicly accessible repositories.
    • Environment Variables: Store credentials in environment variables or configuration management systems.
    • Secret Management Services: For production environments, utilize dedicated secret management services (e.g., AWS Secrets Manager, Azure Key Vault, Google Secret Manager) to securely store and retrieve credentials at runtime.
  2. Protect Client Secrets (OAuth 2.0):
    • Client secrets for OAuth 2.0 applications must be treated with the same level of security as passwords.
    • Ensure they are only used in secure server-side environments and never exposed in client-side code (e.g., JavaScript in a browser).
  3. HTTPS/TLS Enforcement:
    • Always use HTTPS (TLS) for all communication with Orion Health APIs. This encrypts data in transit, preventing eavesdropping and man-in-the-middle attacks. Orion Health APIs enforce TLS 1.2 or higher.
  4. Least Privilege Principle:
    • Request and obtain only the minimum necessary permissions and scopes for your application to function. Avoid requesting broad access if your application only needs specific data points.
    • Regularly review and revoke unnecessary permissions.
  5. Token Management (OAuth 2.0):
    • Short-lived Access Tokens: Use short-lived access tokens and refresh tokens. If an access token is compromised, its utility is limited by its expiration.
    • Secure Refresh Token Storage: Store refresh tokens securely, as they can be used to obtain new access tokens. Implement rotation for refresh tokens if supported.
    • Token Revocation: Implement mechanisms to revoke tokens if a security incident occurs or if an application's access needs to be terminated.
  6. IP Whitelisting:
    • Where possible, restrict API key usage or OAuth client access to a predefined list of trusted IP addresses. This adds an extra layer of security by ensuring requests only originate from authorized servers.
  7. Error Handling without Exposure:
    • Ensure that API error messages do not expose sensitive system information, internal details, or debugging information that could aid an attacker.
  8. Regular Security Audits and Updates:
    • Periodically review your application's security posture, dependencies, and authentication implementation.
    • Keep your software libraries and frameworks up to date to patch known vulnerabilities.

By diligently applying these security best practices, developers can significantly reduce the risk of security vulnerabilities and ensure the integrity and privacy of health data when integrating with Orion Health platforms.