alphaeusmote 628e9b6ac1 Add LDAP authentication and dynamic group membership rules.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/3dbf05fe-5071-4ef8-b5a9-67982811a801.jpg
2025-04-10 03:24:50 +00:00
2025-04-08 01:35:07 +00:00
2025-04-08 01:35:07 +00:00
2025-04-08 01:28:37 +00:00
2025-04-08 01:35:07 +00:00
2025-04-08 01:35:07 +00:00
2025-04-08 01:35:07 +00:00
2025-04-08 01:35:07 +00:00

Active Directory Management Platform

A comprehensive REST API and admin interface for Active Directory management, designed for efficient user and resource management with advanced configuration and monitoring capabilities.

Table of Contents

Features

The Active Directory Management Platform provides the following key features:

Core Functionality

  • User Management: Create, read, update, and delete Active Directory users with comprehensive attribute support
  • Group Management: Manage security and distribution groups, including nested group structures
  • Organizational Unit (OU) Management: Create and manage the hierarchical OU structure
  • Computer Management: Manage computer accounts with detailed property configuration
  • Domain Management: View and configure domain controllers and settings

Administration

  • API Token Management: Create and manage API tokens for secure programmatic access
  • LDAP Connection Management: Configure and test multiple LDAP server connections
  • Role-Based Access Control: Granular permissions system for secure delegation of administrative tasks
  • User Management: Admin interface for managing platform users and their permissions

Advanced Features

  • LDAP Query Builder: Visual interface for building, testing, and saving complex LDAP queries
    • Filter version history with revision control
    • Revert to previous filter versions
    • Test filters against live Active Directory data
    • Save frequently used filters for reuse
  • API Filtering: Dynamic property filtering on all API endpoints
  • Bulk Operations: Efficient batch processing for operations on multiple directory objects
  • Audit Logging: Comprehensive audit trail for all directory changes
  • Caching: Redis-based caching for improved performance

Technology Stack

Backend

  • Express.js: Fast, unopinionated, minimalist web framework for Node.js
  • PostgreSQL: Advanced open-source relational database with JSON support
  • Drizzle ORM: Type-safe SQL query builder and ORM for TypeScript
  • Redis: In-memory data structure store used for caching
  • Passport.js: Authentication middleware for Node.js
  • Swagger/OpenAPI: API documentation and specification

Frontend

  • React: JavaScript library for building user interfaces
  • Material UI: React components that implement Google's Material Design
  • React Query: Powerful data synchronization for React applications
  • Recharts: Composable charting library built on React components
  • React Hook Form: Performant forms with easy-to-use validation

DevOps

  • Docker: Containerization platform for consistent deployment

Architecture

The application follows a modern web architecture with clear separation of concerns:

  1. Client Layer: React-based SPA that provides the user interface
  2. API Layer: Express.js REST API with comprehensive endpoint coverage
  3. Service Layer: Business logic implementation with domain-specific services
  4. Data Access Layer: Database interaction through Drizzle ORM
  5. Infrastructure Layer: PostgreSQL database, Redis cache, and LDAP connectivity

Installation

Prerequisites

  • Node.js v18 or later
  • PostgreSQL v13 or later
  • Redis v6 or later
  • Docker and Docker Compose (for containerized deployment)

Development Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/ad-management-platform.git
    cd ad-management-platform
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file from the example:

    cp .env.example .env
    # Edit .env with your configuration
    
  4. Set up the database:

    npm run db:push
    
  5. Start the development server:

    npm run dev
    
  6. The application will be available at:

Production Deployment

Using Docker Compose

  1. Clone the repository:

    git clone https://github.com/yourusername/ad-management-platform.git
    cd ad-management-platform
    
  2. Create a .env file from the example:

    cp .env.example .env
    # Edit .env with your production configuration
    
  3. Set up environment variables for production:

    # Make sure to set appropriate values in your .env file
    # For production deployments, ensure secure values for SESSION_SECRET and other security settings
    
  4. Start the application stack:

    docker-compose up -d
    
  5. The application will be available at:

Manual Deployment

For manual deployment instructions, refer to the Deployment Guide.

API Documentation

The API is thoroughly documented using the OpenAPI specification (Swagger):

  • Interactive Documentation: Available at /api/docs when the application is running
  • Downloadable Specification: Available at /api/docs/download
  • Advanced Usage Guide: Available at /api/docs/more-info

API Standards

  • Authentication: JWT tokens via Authorization header
  • Request Format: JSON with proper content-type headers
  • Response Format: Consistent JSON structure with appropriate status codes
  • Error Handling: Descriptive error messages and appropriate HTTP status codes

Filterable Endpoints

All list endpoints support filtering with a flexible query syntax:

GET /api/users?filter[firstName]=John&filter[lastName]=Doe
GET /api/groups?filter[description]=contains:Marketing

Configuration

Configuration is managed through environment variables. See .env.example for a complete list of available options.

Key Configuration Options

  • Database: PostgreSQL connection settings
  • Redis: Caching configuration
  • Session: Security settings for user sessions
  • JWT: Settings for API tokens
  • LDAP: Connection parameters for Active Directory
  • Rate Limiting: API request restrictions
  • Logging: Debug and audit log configuration

LDAP Query Builder

The LDAP Query Builder is an advanced feature that helps administrators construct complex LDAP queries through a visual interface.

Features

  • Visual Query Construction: Build LDAP filters without knowing the exact syntax
  • Object Class Selection: Pre-configured attribute lists based on Active Directory object classes
  • Condition Groups: Create complex queries with nested AND/OR logic
  • Live Preview: See the generated LDAP filter syntax as you build
  • Testing: Execute the query against your Active Directory to validate results
  • Saving: Store frequently used queries for later use
  • Version History: Track changes to queries with full revision history
  • Rollback: Revert to previous versions if needed

Usage

  1. Navigate to the LDAP Query Builder page from the main navigation
  2. Select a connection and object class
  3. Build your filter by adding conditions or groups
  4. Test the filter to see results
  5. Save the filter with a descriptive name
  6. Access saved filters for later use or sharing

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

S
Description
A comprehensive REST API and admin interface for Active Directory management, designed for efficient user and resource management with advanced configuration and monitoring capabilities.
Readme 2.1 MiB
Languages
TypeScript 98.6%
PowerShell 0.4%
CSS 0.4%
Shell 0.4%
Dockerfile 0.1%