Registration and Authentication
A precursor to any exchange between parties requires setting up a secure exchange via a registration process. This section covers the registration and authentication considerations for both requesting and responding payers.
SMART Server Definition configuration defines how your Smile CDR instance will authenticate and communicate with external FHIR servers, enabling secure Payer-to-Payer data exchange.
Choose a manual or automated process for creating the definitions:
Manually via Smile web admin console: Navigate to "Smart Outbound Security" "Server Definitions"
Programmatically via JSON admin API: The OpenID Connect Servers Endpoint allows for automated creation and management of server definitions, especially useful for deployments across multiple environments
Generating an OIDC pre-seed files: A pre-seed file allows you to define and configure OIDC servers programmatically. This is particularly useful for automating deployments, maintaining consistent configurations across environments, and version controlling your OIDC setup
| Field | Description | Example |
|---|---|---|
| Server Name | Identifier for the server definition | p2p-server |
| Source Issuer URL | The exact Issuer URL of the Source Payer's OIDC client | https://source-payer.com/ |
| .well-known endpoint | Discovery endpoint for OIDC configuration | {issuer.url}/.well-known/openid-configuration |
| Request Scopes | Required scopes for access | openid cdr_all_user_authorities |
| Source FHIR Endpoint URL | Base URL of the external FHIR server | https://source-payer.com/fhir |
| Token URL | Service URL for code exchange | https://source-payer.com/oauth/token |
| Custom Token Parameters | Additional parameters | Patient |
| Response Type | Expected response format | code id_token token |
| Organization ID | Links OIDC server to internal Organization resource | org-123 |
Set up authentication parameters:
openid, fhirUser, patient/*.read)For customers who manage their authentication keys and processes within external Identity Provider (IdP) services (e.g., PingFed), Smile CDR's System-to-System (S2S) module provides a mechanism to integrate with these services.
This approach is particularly useful when:
Interceptors in Smile CDR act as customizable hooks within the P2P request flow. Two key interceptor pointcuts are relevant:
$member-match operation when a token is being requested.$export operation when a token is being requested.These interceptors receive inputs such as the S2S OIDC Server settings and the JWT Client Assertion.
$invoke-export request with Smile.As part of the registration process, payers should generate an HRex Organization resource to support:
Creating a SMART Client Definition for the requester is a required step for responding payers.
Manually via Smile web admin console: Under Users & Authorization, create a new OIDC Client under the SMART_OUT module
Programmatically via JSON admin API: For automated deployments
Generating an OIDC pre-seed files: For consistent configurations across environments
Key configuration steps:
client_id and configure authentication using Client JWT AuthenticationFHIR_OP_INITIATE_BULK_DATA_EXPORTFHIR_OP_MEMBER_MATCHFHIR_ALL_READFHIR_ALL_WRITETwo key considerations when designing the authorization layer:
Storing business identity: Consent is often linked to a business identifier, not a set of client credentials. Your system must be able to store a business identifier for the requesting payer that can be linked with credentials
Validating business identity: At the time of the request, an interceptor can cross reference the credentials against resources that validate authorization
For responding payers supporting Patient-level $export flows:
$member-match requestFor responding payers supporting Group-level $davinci-data-export flows:
For FHIR-resource based design:
Two recommended methods for obtaining business identifiers during group creation:
Process:
Best Practice: This approach leverages existing security infrastructure and ensures the identifier is securely and dynamically passed with each request.
Process:
http://smilecdr.com/fhir/extensions/payer-business-id).Considerations: Useful if the business identifier is static and does not change frequently.
function onAuthenticateSuccess(theOutcome, theOutcomeFactory, theContext) {
theOutcome.addUserData('business-id', 's2sBusId');
return theOutcome;
}
Note: s2sBusId is a fixed value for demonstration. In reality, this will be a value either supplied by the external IAM or a lookup of an Organization resource.
To implement external IdP integration:
Deploy Interceptors: Ensure custom interceptor scripts are properly deployed within your Smile CDR environment
S2S OIDC Server Settings: Configure settings to point to your external IdP's endpoints (e.g., .well-known/jwks.json for JWKS-based authentication)
Client Registration: Ensure your Smile CDR instance is registered as a client with your external IdP
Refactor Token Request Code: Use OIDC libraries as appropriate within interceptor scripts
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.