Coder Social home page Coder Social logo

org-stack's Introduction

Org Stack

Inspired by complex IAM and RBAC, multi-tenant to multi-org relationships.

Goals

  • Create organisation flow which creates a default admin user as the person filling in the form
    • Admin user, and only the admin user, can add more users to the organisation
  • An admin for an Organisation can add a user that already belongs to an organisation

Reading

Design

Auth service

An authentication service should sit in front of a single cognito user pool.

The cognito user pool will store users login credentials.

Each user will belong to a parent organization parent_org_id, which is immutable, in the JWT claim.

The user would have a role, and those roles would need to be specific to each organisation, therefore using cognito groups would not be possible, as Admin role for the parent organisation, would override a readonly role for a child organisation.

Role Description
Admin Can do everything and add new user to the organisation
User Can do everything in that organisation
ReadOnlyUser Can read everything in that organisation

POST /organisation/create

Create an organisation and an admin user.

Store the parent_org_id in the JWT claims and put it into a dynamoDB record for ORGANISATION.

Redirect to sign-in on success.

POST /organisation/{}/user

Create a user inside the organisation with the chosen role.

How to handle existing user at this stage?
  1. This user exists, invite them to join your organisation instead.

PATCH /organisation/{}/user

Add an existing user to the organisation.

This should create a token that suppresses claims for the other organisation.

org-stack's People

Contributors

simonireilly avatar

Watchers

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