Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add features for SMARTv2 #47

Draft
wants to merge 63 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
1ca1dd7
Added ability to run in Windows.
GinoCanessa Aug 21, 2020
dba5c2f
Added refresh token to refresh request.
GinoCanessa Aug 21, 2020
a6427a9
Cleaning warnings.
GinoCanessa Aug 21, 2020
c39f57a
Improved scope handing and user information.
GinoCanessa Aug 24, 2020
94bf3b0
Default load of resource panels with IDs working.
GinoCanessa Aug 25, 2020
b8a38a1
Refactoring scopes.
GinoCanessa Aug 26, 2020
c4860e0
Added new scope parsing to lib.js for auth screen.
GinoCanessa Aug 26, 2020
f793f8e
Refactored common properties.
GinoCanessa Aug 27, 2020
853586e
Add Markdown and HTML to data panels.
GinoCanessa Aug 28, 2020
2e39c76
Scenarios complete pass.
GinoCanessa Sep 2, 2020
67ea76d
Simple-proxy parsing graunlar scopes
GinoCanessa Sep 2, 2020
ed2cf36
Pass of granular scopes pass/failing requests.
GinoCanessa Sep 4, 2020
683bcea
Fixed error messaging.
GinoCanessa Sep 7, 2020
b06046e
Fixed issue with multi-parameter keys.
GinoCanessa Sep 8, 2020
dc22d81
Cleaning warnings.
GinoCanessa Sep 8, 2020
03d38a2
Updating deployment
GinoCanessa Sep 9, 2020
a7eeaa4
Updates for deployment
GinoCanessa Sep 9, 2020
5cf1b4b
Update for CI
GinoCanessa Sep 10, 2020
fbb8582
Hide granular launch on non-standalone launches for now
GinoCanessa Sep 10, 2020
0f6fc9e
Allow env var to customize redirect URL during dev
jmandel Sep 10, 2020
82f760e
Merge pull request #1 from microsoft-healthcare-madison/customize-red…
GinoCanessa Sep 10, 2020
aed5667
Label FHIR server more intuitively, I hope
jmandel Sep 10, 2020
4e1abe8
Merge pull request #2 from microsoft-healthcare-madison/rename-aud-ui
GinoCanessa Sep 10, 2020
824b3ea
Added V1 scopes for testing.
GinoCanessa Sep 10, 2020
13272b2
Add appId config
jmandel Sep 10, 2020
ac999b9
Merge pull request #3 from microsoft-healthcare-madison/add-app-id-co…
GinoCanessa Sep 10, 2020
d92539b
Require auth during connectathon
GinoCanessa Sep 10, 2020
0858b0b
Disable forced auth for connectathon - side effect of disabling the p…
GinoCanessa Sep 10, 2020
9494762
Added handling for format 'patient={id}'.
GinoCanessa Sep 10, 2020
cabf3c8
Added category=laboratory for testing
GinoCanessa Sep 11, 2020
8fa7e09
Added patient/Observation.read for Cerner testing.
GinoCanessa Sep 11, 2020
3d99e3d
Add token introspection to fix #7
jmandel Jan 7, 2021
4148064
Update api.js
jmandel Jan 8, 2021
97d4c1b
Update index.js
jmandel Jan 8, 2021
8f379e7
Update smart-auth.js
jmandel Jan 8, 2021
424cc00
Update src/index.js
jmandel Jan 8, 2021
1e02db0
Update api.js
jmandel Jan 8, 2021
e86eeb9
Add POST-based authorize to fix #5
jmandel Jan 8, 2021
a5a3e8c
Add permission-v2 capability to fix #4
jmandel Jan 8, 2021
e617e83
Merge pull request #10 from microsoft-healthcare-madison/update-disco…
jmandel Jan 8, 2021
7092dca
Merge branch 'master' into add-post-authorization
jmandel Jan 8, 2021
b5c7408
Merge pull request #9 from microsoft-healthcare-madison/add-post-auth…
jmandel Jan 8, 2021
422c736
Merge pull request #8 from microsoft-healthcare-madison/add-token-int…
jmandel Jan 8, 2021
f70c484
Add PKCE support
jmandel Jan 8, 2021
0b1bf8d
Exit when tests finish
jmandel Jan 8, 2021
760239a
Update test/api.js
jmandel Jan 8, 2021
259a034
Merge pull request #12 from microsoft-healthcare-madison/add-pkce-sup…
jmandel Jan 8, 2021
1656636
Add code_challenge_methods_supported to dsicovery
jmandel Jan 8, 2021
f7eb438
SMART Config and Introspection Working
GinoCanessa Jan 13, 2021
f9b8914
Introspection working.
GinoCanessa Jan 13, 2021
b04676f
POST-based auth working.
GinoCanessa Jan 13, 2021
8096dc5
Remove extra build folder.
GinoCanessa Jan 13, 2021
6b97008
Removed module info from client-js files for production build.
GinoCanessa Jan 13, 2021
66e4950
Fixes for 'debug' error (introduced in module fixes)
GinoCanessa Jan 13, 2021
badbd35
One more 'debug' found.
GinoCanessa Jan 13, 2021
e8f18fd
Added 'accept' header to well-known config fetch.
GinoCanessa Jan 14, 2021
c48892f
Added authorization header to token introspection
GinoCanessa Jan 14, 2021
00955dd
Update k8s for 2021 certmanager
jmandel May 3, 2021
25244df
Update cluster details
jmandel May 3, 2021
eb25c9d
Merge upstream
jmandel May 11, 2021
5299541
de-duplicate introspection
jmandel May 11, 2021
fbc369d
Use CI locked deps for granular build
jmandel May 11, 2021
bd1074b
Update env var names in GH Actions
jmandel Aug 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy SMART Launcher master branch to argo.run ci
# Basics from https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: azure/docker-login@v1
with:
login-server: ${{ secrets.CONTAINER_REGISTRY }}
username: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientId }}
password: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientSecret }}

- uses: azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: ${{ secrets.CLUSTER_NAME }}
resource-group: ${{ secrets.RESOURCE_GROUP }}

- name: Build and rollout to CI
run: |
docker build . \
-t ${{ secrets.CONTAINER_REGISTRY }}/smart:$GITHUB_SHA \
-t ${{ secrets.CONTAINER_REGISTRY }}/smart:latest
docker push ${{ secrets.CONTAINER_REGISTRY }}/smart
kubectl -n smart rollout restart deployment/smart
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app

ENV NODE_ENV "production"
ENV LAUNCHER_PORT "80"
ENV BASE_URL "http://localhost:9009"
ENV BASE_URL "https://smart.argo.run/"

# Which FHIR servers to use
ENV FHIR_SERVER_R2 "https://r2.smarthealthit.org"
Expand All @@ -30,7 +30,17 @@ RUN mv /tmp/node_modules /app/node_modules

COPY . .

# Granular app
# RUN pwd -L
# RUN ls -al .
# RUN ls -dl ../*
# RUN ls -dl ../app
# RUN ls -al ../tmp
RUN cd granular-scopes-app && npm ci
RUN cd granular-scopes-app && npm run-script build
RUN mv granular-scopes-app/build static/granular

# You must use -p 9009:80 when running the image
EXPOSE 80

CMD ["node", "./src/index.js"]
CMD ["node", "./src/index.js"]
12 changes: 12 additions & 0 deletions env/development.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set NODE_ENV=development
set LOG_TIMES=0
set DISABLE_SANDBOXES=1
set DISABLE_BACKEND_SERVICES=0
set FHIR_SERVER_R2=https://r2.smarthealthit.org
set FHIR_SERVER_R3=https://r3.smarthealthit.org
set FHIR_SERVER_R4=https://r4.smarthealthit.org
set PICKER_CONFIG_R2=r2
set PICKER_CONFIG_R3=r3
set PICKER_CONFIG_R4=r4
set CDS_SANDBOX_URL=http://localhost:8080
REM set SSL_PORT=9443
23 changes: 23 additions & 0 deletions granular-scopes-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
44 changes: 44 additions & 0 deletions granular-scopes-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
Loading