This repository was archived by the owner on Aug 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Setting up authentication with Okta
Ryan Newington edited this page Jul 7, 2018
·
5 revisions
The following guide will assist you in configuring your application to use Okta for authentication.
- Open IIS Manager, expand the
Siteslist, and select the Lithnet LAPS web site you created at installation time. - In the app setting pane, click
Authentication - Ensure
Anonymous authenticationis enabled, and all other options are disabled.
- Log into to the Okta admin console with administrative credentials, select
ApplicationsthenApplications - Click
Add application, thenCreate new app - Select
Webas the platform, andOpen ID Connectas the sign on method - Enter
Lithnet LAPSor another suitable application name and optionally provide a logo - For the login redirect URI, enter the base URL where your Lithnet LAPS Web app is hosted (eg https://laps.lithnet.local/)
- On the general settings page, click
Edit - Select the
Implicit (Hybrid)click box underClient acting on behalf of user, and ensureAllow ID token with implicit grant typeis selected. ClickSave. - Set the logout URL to your base URL, and append
/Home/LogOutto the end of it (eghttps://laps.lithnet.local/Home/LogOut) - Copy the
client IDvalue for use later. You do not need theclient secret. - Assign the appropriate users to the app
- Select
Directoryfrom the main menu bar, and selectProfile editor. Find the Lithnet LAPS Web app in the list, and click theProfilebutton - Click
Add attributeand create a new attribute calledupn, of data typestring. Select both theattribute requiredandUser personalcheck boxes - Click the
Map attributesbutton. Find the UPN value, and map it to the okta attribute that contains the Active Directory UPN (eg aduser.userPrincipalName)
- Open the
web.configfile in the root of the application folder. Ensure no otherowin:appStartupkey is present - Substitute the value for
oidc:ClientIdwith theClient IDobtained in step 7 above - Substitute the value for
oidc:RedirectUriwith the base URL of your application - Substitute the value for
oidc:Authorityfor the URL of your Okta tenant
<add key="owin:appStartup" value="Lithnet.Laps.Web.Startup.ConfigureOpenIDConnect" />
<add key="oidc:ClientId" value="0oaffr1ov5sl3NXff7h0" />
<add key="oidc:RedirectUri" value="https://laps.lithnet.local/" />
<add key="oidc:Authority" value="https://lithnet.okta.com" />For further security, you can modify your application sign-on policy to require multifactor authentication for the app