User management system (UMS), has the primary purpose of connecting to an Active Directory (AD)

Related tags

Miscellaneous SGU
Overview

💿 Sistema de Gerenciamento de Usuário (SGU)

📚 Sobre o projeto

Sistema de gerenciamento de usuários (SGU), tem o objetivo primário de se conectar a um Active Directory (AD). A motivação do projeto é justamente para ambientes que possuem algum tipo de AD e possuem outros sistemas web's internos. Afim de evitar um número alto de diferentes login's e senhas, nessa ocasião, é interessante utilizar as mesmas informações do AD para a autenticação. O projeto está em formato de API básica, sem as métricas avançadas de segurança, pois o foco desse projeto é apenas demonstrar uma conexão básica entre um sistema em Django e o AD.


💻 Tecnologias

O sistema foi desenvolvido em python com a framework Django. Além disso, utilizei a biblioteca "Django Auth Ldap", onde a mesma faz uso da biblioteca "ldap3", porém, ja modificada especificamente para fazer as métricas de autenticação com o AD. Por fim, utilizei a framework "Django rest framework", para configurar com facilidade uma API.


Funcionamento

Através de uma requisição tipo POST, é passado no corpo da requisição o usuário e senha.

Após o sistema receber essa requisição, ele consultará o AD para verificar se esse usuário existe. Caso o usuário exista e a senha esteja correta , ele cadastra no próprio banco de dados do Django, ele retorna os dados em formato JSON. Caso o usuário ja exista, ele não cadastra no banco de dados e retorna os dados em JSON. Mas caso não exista ou a senha esteja incorreta, ele apenas retorna um Not Found 404.

A cada requisição de autenticação, o sistema verifica se houve alguma modificação do setor do usuário. Caso o setor tenha sido mudado no AD, o sistema alterará no banco de dados do Django. Para a alteração de setor automática funcionar, é necessário que o nome do setor no banco de dados do Django seja exatamente igual ao grupo no AD


🎨 Algumas imagens


⚠️ Atenção

Provavelmente você irá utilizar o arquivo "requeriments.txt" para fazer a instalação dos pacotes. Porém, caso esteja utilizando o Windows, provavelmente irá ocorrer um erro com a biblioteca "ldap3". Caso ocorra esse erro, no repositório tem um arquivo chamado "python_ldap-3.2.0-cp36-cp36m-win_amd64.whl", onde é o instalador manual para windows 64 bits. Poderá ser instalado através do comando "pip install python_ldap-3.2.0-cp36-cp36m-win_amd64".

🔗 Links úteis

https://techexpert.tips/pt-br/django-pt-br-2/django-autenticacao-ldap-no-diretorio-ativo/

https://ldap3.readthedocs.io/en/latest/

https://django-auth-ldap.readthedocs.io/en/latest/

https://www.django-rest-framework.org/

You might also like...
A student information management system in Python
A student information management system in Python

Student-information-management-system 本项目是一个学生信息管理系统,这个项目是用Python语言实现的,也实现了图形化界面的显示,同时也实现了管理员端,学生端两个登陆入口,同时底层使用的是Redis做的数据持久化。 This project is a stude

Open Source Management System for Botanic Garden Collections.

BotGard 3.0 Open Source Management System for Botanic Garden Collections built and maintained by netzkolchose.de in cooperation with the Botanical Gar

A Company Management System For Python

campany-management Getting started To make it easy for you to get started with GitLab, here's a list of recommended next steps. Already a pro? Just ed

MySQL Connectivity based project. Contains various functions of a Store-Management-System

An Intermediate Level Python - MySQL Connectivity based project. Contains various functions of a Store-Management-System.

Student Result Management System Project in tkinter created based on python, tkinter, and SQLITE3 Database
Student Result Management System Project in tkinter created based on python, tkinter, and SQLITE3 Database

Student-Result-Management-System This Student Result Management System Project in tkinter created based on python, tkinter, and SQLITE3 Database. The

Python plugin/extra to load data files from an external source (such as AWS S3) to a local directory

Data Loader Plugin - Python Table of Content (ToC) Data Loader Plugin - Python Table of Content (ToC) Overview References Python module Python virtual

This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json object is then used to post data to a specified table in a local MySQL database, credentials of which the user must set.

Navigate to your directory of choice the proceed as follows

Installation 🚀 Navigate to your directory of choice the proceed as follows; 1 .Clone the git repo and create a virtual environment Depending on your

Get a link to the web version of a git-tracked file or directory

githyperlink Get a link to the web version of a git-tracked file or directory. Applies to GitHub and GitLab remotes (and maybe others but those are no

Owner
Patrick Viegas
Patrick Viegas
Python implementation for Active Directory certificate abuse

Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS). Based on the C# variant Ce

Oliver Lyak 1.3k Jan 9, 2023
Demo of connecting Rasa with Zalo

Demo of connecting Rasa with Zalo

null 6 Jul 25, 2022
An example of Connecting a MySQL Database with Python Code

An example of Connecting a MySQL Database with Python Code And How to install Table of contents General info Technologies Setup General info In this p

Mohammad Hosseinzadeh 1 Nov 23, 2021
An example of Connecting a MySQL Database with Python Code

An example of Connecting And Query Data a MySQL Database with Python Code And How to install Table of contents General info Technologies Setup General

Mohammad Hosseinzadeh 1 Nov 23, 2021
The purpose of this tool is to check RDP capabilities of a user on specific targets.

RDPChecker The purpose of this tool is to check RDP capabilities of a user on specific targets. Programming concept was taken from RDPassSpray and thu

Hypnoze57 57 Aug 4, 2022
Student Management System Built With Python

Student-Management-System Group Members 19BCE183 - Patel Sarthak 19BCE195 - Patel Jinil 19BCE220 - Rana Yash Project Description In our project Studen

Sarthak Patel 6 Oct 20, 2022
Allow you to create you own custom decentralize job management system.

ants Allow you to create you own custom decentralize job management system. Install $> git clone https://github.com/hvuhsg/ants.git Run monitor exampl

null 1 Feb 15, 2022
This is a simple bank management system based on Python.

Python Bank Management This is a simple bank management system based on Python. It's able to do basic operations of simple bank management. Outcome: W

Md. Rakibul Islam 3 Jan 6, 2022
Public Management System for ACP's 24H TT Fronteira 2021

CROWD MANAGEMENT SYSTEM 24H TT Vila de Froteira 2021 This python script creates a dashboard with realtime updates regarding the capacity of spectactor

VOST Portugal 1 Nov 24, 2021
A self contained invitation management system for gatekeeping.

Invitease Description A self contained invitation management system for gatekeeping. Purpose Serves as a focal point for inviting guests to a venue pr

מעגן מיכאל 7 Jul 19, 2022