Skip to content

Sundaraj0828/access_management

Repository files navigation

Access Management 🔐

Access Management is a specialized security framework designed to handle user authentication, role-based access control (RBAC), and permission management. This project provides a centralized backend to manage who can access specific resources, ensuring that organizational data remains secure and accessible only to authorized personnel.


🛠️ Tech Stack

  • Backend: Python with Flask (REST API architecture)
  • Database: MongoDB (for flexible user profiles and permission schemas)
  • Security: JWT (JSON Web Tokens) for stateless authentication
  • Environment Management: python-dotenv for securing secret keys and database URIs
  • Validation: Marshmallow / Cerberus for strict request body validation

✨ Key Features

  • Role-Based Access Control (RBAC): Define granular permissions for different user levels (e.g., Admin, Manager, Viewer).
  • Token-Based Authentication: Secure login system using JWT with configurable expiration.
  • Resource Protection: Middleware-driven decorators to protect specific API routes.
  • User Lifecycle Management: Full CRUD operations for managing user accounts and assigned roles.
  • Audit Ready: Structured logging of access attempts and permission changes.

🚀 Getting Started

1. Prerequisites

  • Python 3.10+
  • MongoDB (Local or Atlas)

2. Installation

Clone the repository:

git clone https://github.com/Sundaraj0828/access_management_nfs.git
cd access_management_nfs

3. Setup Environment

Create a .env file in the root directory:

MONGO_URI=mongodb://localhost:27017/access_mgmt_db
JWT_SECRET_KEY=your_secure_secret_key
DEBUG=True

4. Install Dependencies

pip install -r requirements.txt

5. Run the Application

flask run

📁 Project Structure

├── app/
│   ├── auth/            # JWT and Login logic
│   ├── routes/          # Access control endpoints
│   ├── models/          # User and Role schemas (MongoDB)
│   └── middleware/      # Permission check decorators
├── .env                 # Configuration
├── app.py               # Application entry point
├── requirements.txt     # Dependencies
└── README.md            # Documentation

🔗 Core API Endpoints

Method Endpoint Description
POST /api/auth/login Authenticate user and receive JWT
GET /api/users List all users (Admin only)
POST /api/roles Create a new permission role
PATCH /api/access/grant Update permissions for a specific user

📄 License

Distributed under the MIT License.


Developed with ❤️ by [Sundaraj0828]

About

Access Management is a specialized security framework designed to handle user authentication, role-based access control (RBAC), and permission management. This project provides a centralized backend to manage who can access specific resources, ensuring that organizational data remains secure and accessible only to authorized personnel.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors