GithubHelp home page GithubHelp logo

rbac's Introduction

Role Based Access Control - Microservice Architecture


To create the project we use Spring Cloud Gateway, Hystrix Cloud Circuit Breaker, Eureka Service Discovery from the Spring Cloud Netflix technology stack.


Services Port


Architecture diagram of RBAC Microservices

RBAC_Architecture


Deliverables

  • Create User_Table (user_id, create_date, last_modified_date, user_name, first_name, last_name)
  • Create User_Group_Mapping_Table (user_group_id, user_id, group_id)
  • Create Group_Table (group_id, create_date, last_modified_date, group_name, group_description)
  • Create Group_Role_Mapping_Table (group_role_id, group_id, role_id)
  • Create Roles_Table (role_id, create_date, last_modified_date, role_name, role_description)
  • Modify basic profile of a User based on user_name
  • Modify basic details of a Group based on group_id
  • Modify basic details of a Role based on role_id
  • Delete a User, Group, Role
  • Add one or more Roles to a Group
  • Remove one or more Roles from a Group
  • Add a User to one or more Groups
  • Remove a User from one or more Groups
  • Get all Users, Groups, Roles
  • Given a user_name, return the basic profile
  • Given a user_name/userid, return the basic profile & list of group names
  • Given a group_id, return the basic group details
  • Given a group_id, return the basic group details & the list of role names
  • Given a role_id, return the basic role details
  • Given a user_name and group_id return true or false depending on whether the group is assigned to user
  • Given a user_name and role_id, return true or false depending on whether the role is assigned to user

Database configuration

  • User Table :

create table user_table (user_id bigint not null auto_increment, create_date datetime, first_name varchar(255), last_modified_date datetime, last_name varchar(255), user_name varchar(255), primary key (user_id)) engine=InnoDB;
alter table user_table add constraint UK_p50irg6kthpq3f33xu9r1kw4x unique (user_name);
  • User Group Mapping Table :

create table user_group_mapping_table (user_group_id bigint not null auto_increment, group_id bigint, user_id bigint, primary key (user_group_id)) engine=InnoDB;
alter table user_group_mapping_table add constraint UK5rhnboke9fcw3ok6rfpvfeda4 unique (user_id, group_id);
  • Group Table :

create table group_table (group_id bigint not null auto_increment, create_date datetime, group_description varchar(255), group_name varchar(255), last_modified_date datetime, primary key (group_id)) engine=InnoDB;
alter table group_table add constraint UK_5awb2k4ure0fi6kk52ui3hyvk unique (group_name);
  • Group Role Mapping Table :

create table group_role_mapping_table (group_role_id bigint not null auto_increment, group_id bigint, role_id bigint, primary key (group_role_id)) engine=InnoDB;
alter table group_role_mapping_table add constraint UKi8npy666oxm10heecsn6vusah unique (group_id, role_id);
  • Role Table :

create table role_table (role_id bigint not null auto_increment, create_date datetime, last_modified_date datetime, role_description varchar(255), role_name varchar(255), primary key (role_id)) engine=InnoDB;
alter table role_table add constraint UK_kqtgs1ar590vxi6vvfti5sej9 unique (role_name);

Database Schema

RBAC_DB_Schema


rbac's People

Contributors

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