Giter Site home page Giter Site logo

cern-oauth2-sso-node-proxy's Introduction

CERN OAuth 2.0 SSO NodeJS Proxy

This will run on OpenShift as a proxy to your application (which can run on OpenStack).

It takes care of authenticating users using OAuth 2.0 and in the headers you get the egroups the user belongs to, the id and the displayname.

If you include an API_URL environment variable, it will also route /api/* to the API_URL (with all HTTP possible methods, GET, POST, PUT, ...)

Instructions

  1. Request a webpage in: CERN Web Services.
  2. Set up the visibility to Internet in 'Site Access & Permissions'.
  3. Go to 'manage your site', under OpenShift application tools, it will open on OpenShift.
  4. Click on Nodejs instance nodejs instance selection
  5. Input the address of this exact repo in Git Repository git repository
  6. After your project shows up in the Overview panel, click on it and under the Environment tab, add the info you got from CERN OAuth Registration as environment variables, as shown in the image: Open Shift env variables
  7. Wait until the container runs again, and it should be working.

Environment Variables

Environment Variable Required Explanation
CLIENT_URL true The URL you want to proxy
clientID true The client id you get from CERN AUTH
clientSecret true The client secret you get from CERN AUTH
callbackURL true The name of your proxy with '/callback' in the end. The proxy will handle this route, no need to set it up yourself
authorizationURL false You might not need to change this, it defaults to https://oauth.web.cern.ch/OAuth/Authorize
tokenURL false You might not need to change this, it defaults to https://oauth.web.cern.ch/OAuth/Token
API_URL false If you're also running an API and you want to re-use this proxy, passing this environment variable will make all requests that go to the proxy/api/* go to the API_URL you provided.

cern-oauth2-sso-node-proxy's People

Contributors

fabioespinosa avatar pmandrik 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.