OpenID¶
Using these settings we can add OpenID configuration to allow logging into the FAIR Wizard via external identity provider.
FAIR Wizard supports Microsoft Azure, ORCID, as well as any other OpenID providers. Following are detailed description of the setups for these options.
Note
After setting a new OpenID service, we should directly test it and verify that the configuration works well. For that, we can simply open our FAIR Wizard in a new anonymous window of the web browser.
Microsoft Azure Setup¶
Go to https://portal.azure.com/.
Go to
App registrations.Click on
New registration.Fill in a name.
Select
Single tenant only - ....Keep
Redirect URIempty.Click on
Register.Copy and store
Directory (tenant) IDandApplication (client) ID.Click on
Managein the left menu →Certificates & Secrets.Click on
New client secret.Fill description, set
Expiresand note it somewhere, then click onAdd.Copy
Valueand store it somewhere. You will not able to view it again.Go to OpenID in FAIR Wizard:
Admin Center→Settings→Organization OpenID→Create.Fill in a
Nameof the service. This name will be used to identify the service in the list of login options, so it should be something descriptive.- Open the
Microsofttab and fill in : Application (client) IDDirectory (tenant) IDClient Secret→<stored secret value>
- Open the
(optional) fill Icon (
fab fa-microsoft, or some other from Font Awesome),Background ColorandText Color.Click on
Save.Go back to Microsoft Azure.
Click on
Managein the left menu →Authentication (Preview).Click on
Add Redirect URI.Click on
Web.Copy
Redirect URIandFront-channel logout URLfrom FAIR Wizard.Do not check any checkbox.
Click on
Configure.Click on
Managein the left menu →API permissions.Click on
Add a permission.Click on
Microsoft Graph→Delegated permissions.Under
OpenId permissionscheckemail,openidandprofile. UnderUserkeep checkedUser.Read.Click on
Add permissions.Click on
Managein the left menu →Token configuration.Click on
Add optional claim.Select
IDand checkemail,family_nameandgiven_name.Click on
Add.Test your OpenID configuration in FAIR Wizard (You might need to refresh the login page for the login button to appear).
ORCID Setup¶
ORCID requires a redirect URI before it allows us to save the application and obtain credentials. Because FAIR Wizard generates the callback URL only after the OpenID configuration is saved, we first create the FAIR Wizard configuration with temporary credentials and then return to ORCID.
Go to OpenID in FAIR Wizard:
Admin Center→Settings→Organization OpenID→Create.Fill in a
Nameof the service, for exampleORCID.Open the
Customtab.- Fill in temporary values:
Client ID→placeholderClient Secret→placeholderURL→https://orcid.org
Leave
Parametersempty.(optional) fill Icon (
fab fa-orcid),Background Color(#A6CE39), andText Color.Click on
Save.Copy
Callback URLfrom FAIR Wizard. It will look similar tohttps://example.fair-wizard.com/admin/open-id/<uuid>/callback.Go to https://orcid.org/signin and sign in to ORCID.
Open
Developer Toolsfrom the account menu.If this is the first application, register for ORCID Public API credentials.
- Fill in the application details:
Name→ name of the FAIR Wizard instance or organization.Application URL→ public URL of the FAIR Wizard instance.Application Description→ short description of the FAIR Wizard instance.Redirect URI→ paste theCallback URLcopied from FAIR Wizard.
Save the application and generate credentials.
Copy
Client IDandClient Secret.Go back to the ORCID OpenID configuration in FAIR Wizard.
- Replace temporary credentials:
Client ID→ ORCIDClient IDClient Secret→ ORCIDClient SecretURL→ keephttps://orcid.org
Click on
Save.Test your OpenID configuration in FAIR Wizard (You might need to refresh the login page for the login button to appear).
Note
ORCID uses the term Redirect URI for the FAIR Wizard Callback URL. The FAIR Wizard Logout URL does not need to be entered in ORCID Public API credentials.
Note
For ORCID sandbox testing, use https://sandbox.orcid.org/ for ORCID registration and use https://sandbox.orcid.org as the FAIR Wizard URL.
Custom Setup¶
Go to OpenID in FAIR Wizard:
Admin Center→Settings→Organization OpenID→Create.Fill in a
Nameof the service. This name will be used to identify the service in the list of login options, so it should be something descriptive.Open the
Customtab.Prepare the OpenID endpoint
URL. This is usually the issuer URL of the provider. If the provider gives us a URL ending with/.well-known/openid-configuration, use only the part before this suffix.- Prepare the client application on the side of the OpenID provider:
If the provider allows creating the client without redirect URLs, create it and obtain
Client IDandClient Secret.If the provider requires redirect URLs before it creates credentials, use temporary values in FAIR Wizard first, for example
placeholderforClient IDandClient Secret. Fill in the real OpenID endpointURLand click onSave. Then copy the generatedCallback URLfrom FAIR Wizard and use it in the provider.
- In the OpenID provider, configure redirect URLs:
Use FAIR Wizard
Callback URLas the provider redirect URI, callback URL, reply URL, or sign-in redirect URI.If the provider supports logout URLs, use FAIR Wizard
Logout URLas the provider logout URL.
- Configure the client in the OpenID provider:
Allow the
authorization_codeflow, if this is configurable.Configure the client to have the following scopes or claims:
openid,profile,email.Configure the client to provide the following details in ID tokens:
email,given_name,family_name.
Go back to FAIR Wizard and fill in the real
Client ID,Client Secret, andURLfrom the OpenID provider.Leave
Parametersempty unless the provider documentation requires an additional parameter.(optional) fill Icon (some from Font Awesome),
Background ColorandText Color.Click on
Save.Test your OpenID configuration in FAIR Wizard (You might need to refresh the login page for the login button to appear).
Advanced Configuration¶
In the Advanced dropdown of the OpenID configuration, we can set up additional options.
Registration enabled - if enabled, users will be able to register a new FAIR Wizard account using this OpenID service. If disabled, only existing FAIR Wizard OpenID accounts can log in.
- Scopes - scopes requested from the OpenID provider.
Email - some services (such as ORCID) do not provide an email address. By disabling this option, we can enable email completion upon the user’s first login. This means that if the OpenID provider does not return an email address, the user will be prompted to enter it manually after the first login. FAIR Wizard requires an email address to send password reset instructions and other notifications, so it is required for the user account.
Profile - if the provider does not return profile information, the user will be prompted to enter their first and last name manually after the first login.