Coder Social home page Coder Social logo

toondc / auth0-authorization-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from auth0/auth0-authorization-extension

0.0 1.0 0.0 605 KB

Auth0 Extension that adds authorization features to your account

Home Page: https://manage.auth0.com/#/extensions

JavaScript 98.03% CSS 1.97%

auth0-authorization-extension's Introduction

Auth0 Groups

Introduction

Use Cases:

  • Coarse Grained Authorization: Only members of group X can access application Y
  • Fine Grained Authorization: Permissions and roles can be exposed to applications
  • Helpdesk: Search for users, block users, unblock users, remove MFA, view user activity, ...

Supports:

  • Heroku deployments
  • Docker deployments
  • Different storage providers:
  • S3
  • MongoDB
  • Simple json file

Todos:

  • Use uuid as unique identifier for permissions/roles/groups
  • Contextual groups/roles/permissions (only for application X)
  • Assign permissions to roles
  • Assign roles to groups
  • Assign groups or roles to applications
  • Calculate effective permissions for a user
  • Calculate effective permissions for a role
  • Calculate effective permissions for a group
  • Calculate effective permissions for an application
  • Push to Auth0 (1 big rule that contains authz/permissions/roles/groups)
  • Secure all endpoints with permissions
  • Export logs button
  • Delete device credentials
  • Impersonation + application configuration (SAML/WSFed/OIDC + scopes)
  • Use Auth0 OAuth2-as-a-service
  • Webtaskify
  • Reset passwords
  • Create users (with group memberships)
  • "Session Expired" if JWT is expired or server returns not authenticated
  • Handle login errors (eg: user blocked)
  • Store permissions/roles/groups in the user profile also (in addition to having it in the token)

Configuration

Configure you settings in /server/config.json or as environment variables:

  • AUTH0_DOMAIN: Your Auth0 domain
  • AUTH0_CLIENT_ID: The client_id of your application
  • AUTH0_CLIENT_SECRET: The client_secret of your application
  • AUTH0_APIV2_TOKEN: The API v2 token for interacting with API v2. Needs the following permissions: read:clients read:connections read:rules create:rules update:rules read:users update:users read:device_credentials read:logs

Data Providers

Json Database File

The permissions/roles/groups can be stored in a Json Database File with the following settings:

  • JSONDB_PATH: Path to the database file, defaults to server/db.json'
  • DATA_PROVIDER: jsondb

MongoDB

The permissions/roles/groups can be stored in a MongoDB with the following settings:

  • MONGODB_CONNECTION_STRING: mongodb://...
  • DATA_PROVIDER: mongodb

S3

The permissions/roles/groups can be stored in S3 with the following settings:

  • AWS_S3_BUCKET: MY_BUCKET,
  • AWS_ACCESS_KEY_ID: MY_KEY,
  • AWS_SECRET_ACCESS_KEY: MY_SECRET_ACCESS_KEY,

Deployment

Running locally

Client:

nvm use 4
npm install
npm run client:dev

Server:

nvm use 4
npm install
npm run server:dev

Running in production

Client:

nvm use 4
npm install
npm run client:build

Server:

nvm use 4
npm install
npm run server:prod

Docker

Building:

docker build -t auth0/auth0-authz .

Start interactive:

docker rm auth0-authz
docker run -it --name "auth0-authz" -p 5000:3000 auth0/auth0-authz

Start in the background:

docker run -d --name "auth0-authz" -p 5000:3000 auth0/auth0-authz

auth0-authorization-extension's People

Contributors

jcenturion avatar sandrinodimattia avatar twistedstream 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.