3pillarlabs/SSO-ID3

Name: SSO-ID3

Owner: 3Pillar Global Open Source

Description: Simple example demonstrating identity server capabilities for SSO and token based authentication and authorization

Created: 2015-12-09 07:32:04.0

Updated: 2016-07-18 10:03:46.0

Pushed: 2016-01-06 07:09:51.0

Homepage: null

Size: 434

Language: C#

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

SSO with Identity Server3

Simple example demonstrating identity server capabilities for SSO and token based authentication and authorization

Setup
Database setup
  1. Create a database with name ?idsvr3?
  2. Run the script available at https://github.com/3pillarlabs/SSO-ID3/blob/master/sql/Create_db.sql
IIS Setup
Identity Server 3
  1. Clone the repository
  2. Create a X509Certificate2 with name idsrv3test
  3. Configure ?Default Web Site? on SSL. Refer https://technet.microsoft.com/en-us/library/cc732230(v=ws.10).aspx
  4. Keep the certificate in following certificate store
    1. Current User
      1. Personal
      2. Trusted Root Certification Authority
    2. Local Computer
      1. Personal
      2. Trusted Root Certification Authority
  5. Extract the certificate into idsrv3test.pfx file. Keep the password idsrv3test
  6. Copy the certificate to https://github.com/3pillarlabs/SSO-ID3/blob/master/IdentityServer3/Host/Configuration/idsrv3test.pfx
  7. Create a new Web Application ?idsvr3? under ?Default Web Site? and point it to https://github.com/3pillarlabs/SSO-ID3/tree/master/IdentityServer3/Host
  8.  Make sure all the configuration entries web.config for "host" are correctly setup as per the local settings.
    
  9. Access https://localhost/idsvr3/Admin or https://machine-name/idsvr3/Admin
  10. Configure clients on IdentityServer3
  11. Now under ?cli? project, make sure app.config entries are all correctly setup as per your local settings. Also local.json entries to be updated for RedirectUris
  12. Build the cli project. Browse to its build folder.
  13. Configure IdentityServer database with clients and scopes by running following command from command promt
    1. IdSvr3EfCli.exe -c IdSvr3Config -f local.json
WebClient
  1. Create a new Web Application ?WebClient? under ?Default Web Site? and point it to https://github.com/3pillarlabs/SSO-ID3/tree/master/WebClient/WebClient
  2. SSL is already setup of ?Default Web Site?
  3. Make sure to setup the web.config settings appropriately
WebApi
  1. Create a new Web Application ?WebApi? under ?Default Web Site? and point it to https://github.com/3pillarlabs/SSO-ID3/tree/master/WebClient/WebApi
  2. SSL is already setup of ?Default Web Site?
  3. Make sure to setup the web.config settings appropriately
Environment
  1. SQL Server 2008 R2
  2. IIS 7.5
  3. MS Visual Studio 2013
Run the application
Identity Server 3
  1. Access the ID3 https:///idsvr3/admin
  2. Login with username=admin and password=India@123
  3. Create 2 different roles
    1. ExternalUsers
    2. InternalUsers
  4. Create 2 different Users
    1. ExternalSiteUser
      1. Assign role to ExternalUsers
    2. InternalSiteUser
      1. Assign role to InternalUsers

c. Run WebClient and WebApi and browse different section with ExternalSiteUser and InternalSiteUser

About this project

3Pillar Global

SSO-ID3 is developed and maintained by 3Pillar Global.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.