Coder Social home page Coder Social logo

hachi's Introduction

Hachi

Instructions

  1. Setup for Development (Mac OS X)
  • Clone the repository

  • Install Ruby 2.2.3 - See instructions to install Ruby using RVM

  • Install vagrant Install vagrant by following installation instructions at http://docs.vagrantup.com/v2/installation/

    Once vagrant is installed, add the ubuntu14 box by running following command

    vagrant box add ubuntu14 http://cloud-images.ubuntu.com/vagrant/trusty/trusty-server-cloudimg-amd64-juju-vagrant-disk1.box
    

    Doing vagrant up should bring up your dev environment`

  1. Auth Flow
  • Register the Seed User as follows:

    • Visit https://192.168.33.10/
    • Click on Register
    • In the email field, enter the email as [email protected] and click on Sign Up
    • In order to register the user, use the link confirmation email from the development logs
      • ssh into the vagrant machine using vagrant ssh hachi_auth_provider
      • cd into Hachi Directory using cd /home/vagrant/hachi
      • see the logs using tail -100f log/development.log in order to get the authorization code
  • Get the authorization code as follows:

    • Visit https://192.168.33.10/oauth/authorize?client_id=seed_test_app&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code
    • Click on Authorize
    • Fetch the Authorization Code
  • Fetch the access token for the Seed User using the following command

    curl -k  -F grant_type=authorization_code \
             -F client_id=seed_test_app \
             -F client_secret=seed_test_app \
             -F code=4543dede2419bf6f784eda156ef7d44f1a85fd42c54e0c3662459bce352a471c \
             -F redirect_uri=urn:ietf:wg:oauth:2.0:oob \
             -X POST https://192.168.33.10/oauth/token
    
  • Gain access to the resource server using the following command

    curl 192.168.33.11 -H 'Authorization: Bearer replace_your_access_token_here_without_quotes'
    

hachi's People

Contributors

abhinandankothari avatar ajeygore avatar mehakdeep avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hachi's Issues

Authentication on Hachi

Once user clicks register

System needs to lookup user's email in ldap, if email address is found, then copy other attributes from LDAP and then send email for resetting the password.

User model

User model should have following attributes

  1. mail - user email attribute
  2. name - user name (short name, everything before @ symbol )
  3. dn - this will be looked up from ldap and setup here to position it later.
  4. sshPublicKey - this will be looked up from and set to ldap
  5. uid - same as name
  6. uidNumber - this will be number starting from 10001
  7. userPassword - this will be the password which we sync to ldap
  8. gidNumber - group id number - this will be an array

LDAP Settings model

When system comes up first time, we should have a LDAPServer model in the system with a view, if this model does not exist then system should present ldap server setup view with following parameters

  1. ldap server host
  2. ldap server port
  3. ldap server dn
  4. ldap server search base
  5. email address field
  6. ssh public key field
  7. hachi_admin username - comma separated
  8. ldap_admin username
  9. ldap_admin password

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.