Code Monkey home page Code Monkey logo

sso's Introduction

README

The setup procedure in this document assumes the system supports Docker and Postgres. For demonstration purposes, I am building the docker container for this project by mapping TCP port 80 inside the container to port 4435 on my host.

Ruby and Rails version

This project uses Rails version 6.0.2.2 with Ruby version 2.6.5.

System dependencies

The system needs to support Postgres and Docker.

Configuration

Navigate to the project folder. Buit the docker image using docker build --no-cache -t sso .. Navigate to /config/ folder and copy database.yml into a file database.local.yml file. Open database.local.yml file and enter the Postgres host and port on your computer.
Build a container for sso. As an example:


docker run -it -d \
  --name sso \
  -e RAILS_ENV=development \
  -e TERM=xterm \
  -e HOME=/root \
  -v /home/johnson/:/home/johnson/ \
  -v /home/johnson/projects/sso/:/home/app/www/ \
  -h sso-local \
  -p 4435:80 \
  -p 3004:3000 \
  sso
  

Set up your own IDP using an IDP of your choice. In my example, I used Onelogin SAML Test Connector (SP Shibboleth) and Okta SAML App Integration Wizard. If you use these 2 apps, you can follow settings in config/settings/development.yml to set up.

Go to app/assets/image folder and upload images of your IDP in PNG format. Name the images in the form of your IDP name (make sure it matches up with the keys in settings/identity_providers in config/settings/development.yml).

Enter the container docker exec -it sso /bin/bash and run bundle install.

While inside the container, run rake db:create and rake db:migrate.

Start the server with rails s -p 80 -b 0.0.0.0.

Features

On the login page, you can clik the link to Sign In, Sign Up, Sign-in Partners to perform logging in as a regular user managed by Devise, registering as a regular user managed by Devise, or signning in using one of the identity providers.

Once signed in, you will see a data table utilizing jQuery's dataTables library that shows the 24h, 7d, and 30d prices of bitcoin in different currencies.

If you are logged in using one of the IDPs, you can click the Exit to #{IDP name} on the top right corner of the header to be logged out of the app (no SLO request is sent) and redirected back to the IDP's homepage where you can see all your apps. You can log out of the IDP there.

Video Demo

https://www.youtube.com/watch?v=AUoJrUeLV0s

sso's People

Contributors

liujohnson118 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.