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

Related tags

MiscellaneousSGU
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/

Owner
Patrick Viegas
Patrick Viegas
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
A simple calculator made with tkinter.

Simple Calculator A simple calculator made with tkinter. Requirements None, only you need to have windows 😉 ...Enjoy! Installation Clone this reposit

Abhyush 2 Jan 11, 2022
Open source tools to allow working with ESP devices in the browser

ESP Web Tools Allow flashing ESPHome or other ESP-based firmwares via the browser. Will automatically detect the board type and select a supported fir

ESPHome 195 Dec 31, 2022
A collection of simple tools that proved to be needed for hadling large periodic calculations with the VASP software package.

VESTA-tools A collection of simple tools that proved to be needed for handling large periodic calculations with the VASP software package. distTotCalc

Ilia Kichev 2 Dec 14, 2021
Simple python bot, that notifies about new manga chapters through Telegram.

Simple python bot, that notifies about new manga chapters through Telegram.

Dmitry Kopturov 1 Dec 05, 2021
2 Way Sync Between Notion Database and Google Calendar

Notion-and-Google-Calendar-2-Way-Sync 2 Way Sync Between a Notion Database and Google Calendar WARNING: This repo will be undergoing a good bit of cha

248 Dec 26, 2022
Experimental Brawl Stars v36.218 server emulator written in Python.

Brawl Stars v36 Experimental Brawl Stars v36.218 server emulator written in Python. Requirements: Python 3.7 or higher colorama Running the server In

8 Oct 31, 2021
This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021.

BrightNetworkUK-GCC-2021 This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021. Language used here is py

Dareer Ahmad Mufti 28 May 23, 2022
Like Docker, but for Squeak. You know, for kids.

Squeaker Like Docker, but for Smalltalk images. You know, for kids. It's a small program that helps in automated derivation of configured Smalltalk im

Tony Garnock-Jones 14 Sep 11, 2022
Python code for YouTube videos.

#This is a open source project. Python 3 These files are mainly intended to accompany my series of YouTube tutorial videos here, https://www.youtube.c

Joe James 1.3k Dec 26, 2022
Random Programming Language Project

Crastle Random Programming Language Project Freedom of expression Are you a fan of curly brace languages? Then use curly braces! Not a fan of curly br

DevNugget 2 Dec 23, 2021
Telegram bot to upload media to telegra.ph

Telegraph @StarkTelegraphBot A star ⭐ from you means a lot to us ! Telegram bot to upload media to telegra.ph Usage Deploy to Heroku Tap on above butt

Stark Bots 24 Dec 29, 2022
Jarvis Python BOT acts like Google-assistance

Jarvis-Python-BOT Jarvis Python BOT acts like Google-assistance Setup Add Mail ID (Gmail) in the file at line no 82.

Ishan Jogalekar 1 Jan 08, 2022
Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero.

Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal.

Shruti Dhave 2 Nov 29, 2021
An app that mirrors your phone to your compute and maps controller input to the screen

What is 'Dragalia Control'? An app that mirrors your phone to your compute and maps controller input to the screen. Inputs are mapped specifically for

1 May 03, 2022
Async Python Circuit Breaker implementation

aiocircuitbreaker This is an async Python implementation of the circuitbreaker library. Installation The project is available on PyPI. Simply run: $ p

5 Sep 05, 2022
Sentiment Based Product Recommendation System

Sentiment Based Product Recommendation System The e-commerce business is quite p

Sumit Sahay 2 Jan 15, 2022
3x+1 recreated in Python

3x-1 3x+1 recreated in Python If a number is odd it is multiplied by 3 and 1 is added to the product. If a number is even it is divided by 2. These ru

4 Aug 19, 2022
This repo is a collection of programs and websites templates too

📢 Register here for Hacktoberfest and make four pull requests (PRs) between October 1st-31st to grab free SWAGS 🔥 . IMPORTANT While making pull requ

Binayak Jha - 2 7 Oct 03, 2022
A micro-service that can be extended to help in monitoring systems

A micro-service that can be extended to help in monitoring systems. Be extensible to be incorporated in any of the systems to facilitate timely interventions.

Peter Kagwe 1 Feb 06, 2022