Code Monkey home page Code Monkey logo

auth-portal's Introduction

auth-portal

Central Authentication plus Authorization Portal for PEC University of Technology.

The main aim of this project is automation and digitalization of day-to-day work of college, which are at present done manually. We aim to build a central authorization service which can be scaled and will help in development of various other modules to be made under PEC Automation and Digitalization initiative.

Authorization portal is based on OAuth 2.0 framework (Not all features are supported till now).

Building

To build and run this project, you will need following packages

  1. Java 8
  2. gradle
  3. Node.js (v4.6.0 or higher)

Building this project,

  1. First create some environment variables as described below,
$ export ADMIN_ACCOUNT_ID=YOUR_ACCOUNT_ID
$ export ADMIN_PASSWORD=YOUR_SECRET_PASSWORD
$ export ADMIN_EMAIL=YOUR_EMAIL_ID
$ export THIS_CLIENT_ID=example
$ export THIS_CLIENT_SECRET=YOUR_SECRET

(For debugging purposes, you can set these values to anything)

  1. Install npm dependencies,
$ npm install
# npm install -g webpack
  1. Run webpack to render React Components,
$ webpack --watch --progress
  1. In another terminal, run following command to start server,
$ ./gradlew bootRun
  1. Now open the browser and hit http://localhost:8080/home, Enter your username and password as filled above.

auth-portal's People

Contributors

crypton3535 avatar dhaliwalx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dhaliwalx

auth-portal's Issues

Roles in OAuth framework

OAuth defines four roles:

resource owner
An entity capable of granting access to a protected resource.
When the resource owner is a person, it is referred to as an
end-user.

resource server
The server hosting the protected resources, capable of accepting
and responding to protected resource requests using access tokens.

client
An application making protected resource requests on behalf of the
resource owner and with its authorization. The term "client" does
not imply any particular implementation characteristics (e.g.,
whether the application executes on a server, a desktop, or other
devices).

authorization server
The server issuing access tokens to the client after successfully
authenticating the resource owner and obtaining authorization.

The interaction between the authorization server and resource server
is beyond the scope of this specification. The authorization server
may be the same server as the resource server or a separate entity.
A single authorization server may issue access tokens accepted by
multiple resource servers.

Reference: https://tools.ietf.org/html/rfc6749#section-1.1
@akshayarora2009 @crypton3535

SSH access to your server on college wifi

SSH works on port 22 by default. However, this port is blocked by the college firewall by default.

The solution is to SSH on port 443, which is not blocked.

In the file /etc/ssh/sshd_config , add the following line:

Port 443

To connect over port 443, just use the -p 443 flag. eg. ssh -p 443 <user>@<host>
Let me know if you have any problems.

FYI: @Princedhaliwal @crypton3535 @pola07 @kvibhore

Setting up server on Digital Ocean

Let's set up our servers on Digital Ocean.

@crypton3535 , I hope you have the credits set up in your account.

Steps: Just log in to digital ocean, click on create droplet and then choose the following options:

OS: Ubuntu 16.04 X64
Size: $10/month plan (don't worry, we'll delete it much earlier and will be charged less)
Data Center region: Bangalore, India
Leave everything else as it is, but choose a suitable hostname. (eg: auth-portal)

Create your droplet. You will get a mail telling you your root password.

Then create users. Do not work everytime with root user. You should work with your own user with sudo privileges.

Here's how to do that: https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart

Cheers. Let me know when you are done.

How services will register themselves to auth-portal?

Currently I have not written code for registration of services. We can't hard code them into the database. Instead there should be a registration portal where new services can request themselves and admin can approve or disapprove requests. Or there should be a portal for admin, where he can add new service to the database.

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.