-
Notifications
You must be signed in to change notification settings - Fork 9
Auth0
Sean McIlvenna edited this page Dec 10, 2019
·
2 revisions
Auth0 requires creating an account, first. ToF works fine using their free-to-use services. Their paid services allow for integrating with enterprise level authentication providers, such as "Microsoft Accounts" and "Microsoft Azure AD". This, however, is not required for ToF.
Create an application for ToF with the following:
- Application Type: Single Page Application
- Advanced Setings
- OAuth
- JsonWebToken Signature Algorithm: RS256
- OAuth
- Redirect URIs
- <root url>/login (ex: https://trifolia-fhir-dev.lantanagroup.com/silent-refresh.html)
- <root url>/silent-refresh.html (ex: https://trifolia-fhir-dev.lantanagroup.com/silent-refresh.html)
- Do not select "OIDC Conformant" under "Show Advanced Settings" if you are using the "admin" role as described below. If "OIDC Conformant" is selected, the "roles" information is not returned as part of the JWT.
- auth.clientId = keycloak clientId
- auth.domain = <public url that tof is hosted at>
- auth.scope = openid profile name email
- auth.secret = keycloak app > credentials tab > "Secret"
- auth.issuer =
- auth.jwksUri = <auth0 domain url>/.well-known/jwks.json
The easiest way to setup authorization with Auth0 is to use the "Auth0 Authorization" extension.
- Login to your Auth0 dashboard and select "Extensions" on the left
- Under "All Extensions" search for "Auth0"
- Click on "Auth0 Authorization" and click "Install"
- Once installed, click "Authorization" below "Extensions" in the left nav bar
- Click the account drop-down menu item in the top-right
- Turn on "Roles" in the "Authorization information in the user object in Rules" section
- Click "Publish Rule"
Add an "admin" role to auth0:
- From the "Authorization" extension, select "Roles" in the top-left
- Click "Create Role"
- Select the ToF application and click "Next"
- Specify a name of "admin" and a description of your liking.
- Click save.
- From the "Authorization" extension, select "Users"
- Select a user that you want to be an admin
- Select "Roles"
- Click "Add role to user", select the "admin" role
- Click "Save"