Jupyter Extension for SMART on FHIR launch
Project description
Jupyter SMART on FHIR
Prototype extensions for loading credentials in Jupyter contexts via SMART on FHIR.
This package contains two implementations:
server_extension: a Jupyter server extension that acts as public client for a SMART server.hub_service: a JupyterHub service that acts as confidential client for a SMART server and performs asymmetric authentication.
Check the READMEs in the example folders for more information.
This package is very much a work in progress.
Server Extension
The Server extension is enabled by default on install. It registers the following handlers:
{base_url}/smart-on-fhir/launch- the launch URL to provide{base_url}/smart-on-fhir/login(an intermediate implementation-detail handler that may go away){base_url}/smart-on-fhir/callback- the OAuth callback you'll want to register
When deployed in JupyterHub, register the URLs https://jupyterhub.example.org/hub/user-redirect/smart-on-fhir/launch as the launch URL and https://jupyterhub.example.org/hub/user-redirect/smart-on-fhir/callback as the oauth callback URL.
After SMART launch, the token info will be stored in jupyter_runtime_dir() / "smart_token.json" (also available to notebooks as $SMART_TOKEN_FILE), and in $SMART_TOKEN.
$SMART_TOKEN will only be available to notebooks started after
Currently, only one token is stored at a time, so if there are multiple smart launches to a single notebook server, only the latest will be persisted.
Configure SMARTExtensionApp in jupyter_server_config.py:
c.SMARTExtensionApp.scopes = ["openid", "fhirUser", "launch", "patient/*.*"]
c.SMARTExtensionApp.client_id = "your-client-id"
see sourcecode in server_extension.py for now for more options.
JupyterHub Service
The JupyterHub service is a bare proof of concept which completes the SMART flow and fetches some sample data, it is not useful yet.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter_smart_on_fhir-0.1.0a1.tar.gz.
File metadata
- Download URL: jupyter_smart_on_fhir-0.1.0a1.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b14bd9c36958a51bcdcc69e4f356585ba8aeb3aada5d02ca5b9b190c4b551878
|
|
| MD5 |
6882f38e7fbe12a597da94bab1fb814d
|
|
| BLAKE2b-256 |
640bdeee757b432296de090436ace1fba71b406bf7511269b47a6811b6e6e5db
|
Provenance
The following attestation bundles were made for jupyter_smart_on_fhir-0.1.0a1.tar.gz:
Publisher:
release.yaml on jupyterhealth/jupyter-smart-on-fhir
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_smart_on_fhir-0.1.0a1.tar.gz -
Subject digest:
b14bd9c36958a51bcdcc69e4f356585ba8aeb3aada5d02ca5b9b190c4b551878 - Sigstore transparency entry: 194879309
- Sigstore integration time:
-
Permalink:
jupyterhealth/jupyter-smart-on-fhir@51a2da1b94f487e2c9b9103ec886e5de8aebdfda -
Branch / Tag:
refs/tags/0.1.0a1 - Owner: https://github.com/jupyterhealth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@51a2da1b94f487e2c9b9103ec886e5de8aebdfda -
Trigger Event:
push
-
Statement type:
File details
Details for the file jupyter_smart_on_fhir-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: jupyter_smart_on_fhir-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6166ccf7d9ae42f3e3dc64139184dcb79b57bda288ac0060e89ef5113d3012c0
|
|
| MD5 |
c102e045204618f44e652ec08d110961
|
|
| BLAKE2b-256 |
7e7238be63dffbb416a2d6d9c088fd2e9a6fcff004cf1816553b9c3b28c98470
|
Provenance
The following attestation bundles were made for jupyter_smart_on_fhir-0.1.0a1-py3-none-any.whl:
Publisher:
release.yaml on jupyterhealth/jupyter-smart-on-fhir
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_smart_on_fhir-0.1.0a1-py3-none-any.whl -
Subject digest:
6166ccf7d9ae42f3e3dc64139184dcb79b57bda288ac0060e89ef5113d3012c0 - Sigstore transparency entry: 194879314
- Sigstore integration time:
-
Permalink:
jupyterhealth/jupyter-smart-on-fhir@51a2da1b94f487e2c9b9103ec886e5de8aebdfda -
Branch / Tag:
refs/tags/0.1.0a1 - Owner: https://github.com/jupyterhealth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@51a2da1b94f487e2c9b9103ec886e5de8aebdfda -
Trigger Event:
push
-
Statement type: